diff --git a/.github/workflows/go-checks.yaml b/.github/workflows/go-checks.yaml index 5cfd1eaea5..825c9f8fff 100644 --- a/.github/workflows/go-checks.yaml +++ b/.github/workflows/go-checks.yaml @@ -39,4 +39,4 @@ jobs: go-version: '1.21' cache: false - name: Integration Tests with the Go CLI - run: go test ./tests -race \ No newline at end of file + run: go test ./integration -race \ No newline at end of file diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 0000000000..b723ba2973 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,12 @@ +issues: + # Show only new issues: if there are unstaged changes or untracked files, + # only those changes are analyzed, else only changes in HEAD~ are analyzed. + # It's a super-useful option for integration of golangci-lint into existing large codebase. + # It's not practical to fix all existing issues at the moment of integration: + # much better don't allow issues in new code. + # + # Default: false + new: true + # Show only new issues created after git revision `REV`. + # Default: "" + new-from-rev: HEAD \ No newline at end of file diff --git a/README.md b/README.md index 124cabaa23..6915d44a96 100644 --- a/README.md +++ b/README.md @@ -35,25 +35,32 @@ This should bring up a grpc server on port **9000** and http server on port **80 ```bash grpcurl -plaintext localhost:9000 list - acre.v1.ResourcEncodingService - attributes.v1.AttributesService + attributes.AttributesService grpc.reflection.v1.ServerReflection grpc.reflection.v1alpha.ServerReflection - - grpcurl -plaintext localhost:9000 list attributes.v1.AttributesService - - attributes.v1.AttributesService.CreateAttribute - attributes.v1.AttributesService.DeleteAttribute - attributes.v1.AttributesService.GetAttribute - attributes.v1.AttributesService.ListAttributes - attributes.v1.AttributesService.UpdateAttribute - + kasregistry.KeyAccessServerRegistryService + namespaces.NamespaceService + resourcemapping.ResourceMappingService + subjectmapping.SubjectMappingService + + grpcurl -plaintext localhost:9000 list attributes.AttributesService + + attributes.AttributesService.CreateAttribute + attributes.AttributesService.CreateAttributeValue + attributes.AttributesService.DeleteAttribute + attributes.AttributesService.DeleteAttributeValue + attributes.AttributesService.GetAttribute + attributes.AttributesService.GetAttributeValue + attributes.AttributesService.ListAttributeValues + attributes.AttributesService.ListAttributes + attributes.AttributesService.UpdateAttribute + attributes.AttributesService.UpdateAttributeValue ``` Create Attribute ```bash -grpcurl -plaintext -d @ localhost:9000 attributes.v1.AttributesService/CreateAttribute < 0 { + sql += "," + } + sql += " (" + strings.Join(v, ",") + ")" + } + pconn, err := d.Client.Exec(context.Background(), sql) + if err != nil { + return 0, err + } + return pconn.RowsAffected(), err +} + +func (d *DBInterface) DropSchema() error { + sql := "DROP SCHEMA IF EXISTS " + d.schema + " CASCADE" + _, err := d.Client.Exec(context.Background(), sql) + if err != nil { + return err + } + return nil +} diff --git a/integration/fixtures.go b/integration/fixtures.go new file mode 100644 index 0000000000..85b75316a0 --- /dev/null +++ b/integration/fixtures.go @@ -0,0 +1,338 @@ +package integration + +import ( + "encoding/json" + "fmt" + "log/slog" + "os" + + "gopkg.in/yaml.v2" +) + +var ( + fixtureFilename = "fixtures.yaml" + fixtureData FixtureData +) + +type FixtureMetadata struct { + TableName string `yaml:"table_name"` + Columns []string `yaml:"columns"` +} + +type FixtureDataNamespace struct { + Id string `yaml:"id"` + Name string `yaml:"name"` +} + +type FixtureDataAttribute struct { + Id string `yaml:"id"` + NamespaceId string `yaml:"namespace_id"` + Name string `yaml:"name"` + Rule string `yaml:"rule"` +} + +type FixtureDataAttributeKeyAccessServer struct { + AttributeID string `yaml:"attribute_id"` + KeyAccessServerID string `yaml:"key_access_server_id"` +} + +type FixtureDataAttributeValue struct { + Id string `yaml:"id"` + AttributeDefinitionId string `yaml:"attribute_definition_id"` + Value string `yaml:"value"` + Members []string `yaml:"members"` +} + +type FixtureDataAttributeValueKeyAccessServer struct { + ValueID string `yaml:"value_id"` + KeyAccessServerID string `yaml:"key_access_server_id"` +} + +type FixtureDataSubjectMapping struct { + Id string `yaml:"id"` + AttributeValueId string `yaml:"attribute_value_id"` + Operator string `yaml:"operator"` + SubjectAttribute string `yaml:"subject_attribute"` + SubjectAttributeValues []string `yaml:"subject_attribute_values"` +} + +type FixtureDataResourceMapping struct { + Id string `yaml:"id"` + AttributeValueId string `yaml:"attribute_value_id"` + Terms []string `yaml:"terms"` +} + +type FixtureDataKasRegistry struct { + Id string `yaml:"id"` + Uri string `yaml:"uri"` + PubKey struct { + Remote string `yaml:"remote" json:"remote,omitempty"` + Local string `yaml:"local" json:"local,omitempty"` + } `yaml:"public_key" json:"public_key"` +} + +type FixtureData struct { + Namespaces struct { + Metadata FixtureMetadata `yaml:"metadata"` + Data map[string]FixtureDataNamespace `yaml:"data"` + } `yaml:"attribute_namespaces"` + Attributes struct { + Metadata FixtureMetadata `yaml:"metadata"` + Data map[string]FixtureDataAttribute `yaml:"data"` + } `yaml:"attributes"` + AttributeKeyAccessServer []FixtureDataAttributeKeyAccessServer `yaml:"attribute_key_access_servers"` + AttributeValues struct { + Metadata FixtureMetadata `yaml:"metadata"` + Data map[string]FixtureDataAttributeValue `yaml:"data"` + } `yaml:"attribute_values"` + AttributeValueKeyAccessServer []FixtureDataAttributeValueKeyAccessServer `yaml:"attribute_value_key_access_servers"` + SubjectMappings struct { + Metadata FixtureMetadata `yaml:"metadata"` + Data map[string]FixtureDataSubjectMapping `yaml:"data"` + } `yaml:"subject_mappings"` + ResourceMappings struct { + Metadata FixtureMetadata `yaml:"metadata"` + Data map[string]FixtureDataResourceMapping `yaml:"data"` + } `yaml:"resource_mappings"` + KasRegistries struct { + Metadata FixtureMetadata `yaml:"metadata"` + Data map[string]FixtureDataKasRegistry `yaml:"data"` + } `yaml:"kas_registry"` +} + +func loadFixtureData() { + c, err := os.ReadFile(fixtureFilename) + if err != nil { + slog.Error("could not read "+fixtureFilename, slog.String("error", err.Error())) + panic(err) + } + + if err := yaml.Unmarshal(c, &fixtureData); err != nil { + slog.Error("could not unmarshal "+fixtureFilename, slog.String("error", err.Error())) + panic(err) + } + fmt.Println(fixtureData) +} + +type Fixtures struct { + db DBInterface +} + +func NewFixture(db DBInterface) Fixtures { + return Fixtures{ + db: db, + } +} + +func (f *Fixtures) GetNamespaceKey(key string) FixtureDataNamespace { + if fixtureData.Namespaces.Data[key].Id == "" { + slog.Error("could not find namespace", slog.String("id", key)) + panic("could not find namespace") + } + return fixtureData.Namespaces.Data[key] +} + +func (f *Fixtures) GetAttributeKey(key string) FixtureDataAttribute { + if fixtureData.Attributes.Data[key].Id == "" { + slog.Error("could not find attributes", slog.String("id", key)) + panic("could not find attributes") + } + return fixtureData.Attributes.Data[key] +} + +func (f *Fixtures) GetAttributeValueKey(key string) FixtureDataAttributeValue { + if fixtureData.AttributeValues.Data[key].Id == "" { + slog.Error("could not find attribute-values", slog.String("id", key)) + panic("could not find attribute-values") + } + return fixtureData.AttributeValues.Data[key] +} + +func (f *Fixtures) GetSubjectMappingKey(key string) FixtureDataSubjectMapping { + if fixtureData.SubjectMappings.Data[key].Id == "" { + slog.Error("could not find subject-mappings", slog.String("id", key)) + panic("could not find subject-mappings") + } + return fixtureData.SubjectMappings.Data[key] +} + +func (f *Fixtures) GetResourceMappingKey(key string) FixtureDataResourceMapping { + if fixtureData.ResourceMappings.Data[key].Id == "" { + slog.Error("could not find resource-mappings", slog.String("id", key)) + panic("could not find resource-mappings") + } + return fixtureData.ResourceMappings.Data[key] +} + +func (f *Fixtures) GetKasRegistryKey(key string) FixtureDataKasRegistry { + if fixtureData.KasRegistries.Data[key].Id == "" { + slog.Error("could not find kas-registry", slog.String("id", key)) + panic("could not find kas-registry") + } + return fixtureData.KasRegistries.Data[key] +} + +func (f *Fixtures) Provision() { + slog.Info("📦 running migrations in schema", slog.String("schema", f.db.schema)) + f.db.Client.RunMigrations() + + slog.Info("📦 provisioning namespace data") + n := f.provisionNamespace() + slog.Info("📦 provisioning attribute data") + a := f.provisionAttribute() + slog.Info("📦 provisioning attribute value data") + aV := f.provisionAttributeValues() + slog.Info("📦 provisioning subject mapping data") + sM := f.provisionSubjectMappings() + slog.Info("📦 provisioning resource mapping data") + rM := f.provisionResourceMappings() + slog.Info("📦 provisioning kas registry data") + kas := f.provisionKasRegistry() + slog.Info("📦 provisioning attribute key access server data") + akas := f.provisionAttributeKeyAccessServer() + slog.Info("📦 provisioning attribute value key access server data") + avkas := f.provisionAttributeValueKeyAccessServer() + + slog.Info("📦 provisioned fixtures data", + slog.Int64("namespaces", n), + slog.Int64("attributes", a), + slog.Int64("attribute_values", aV), + slog.Int64("subject_mappings", sM), + slog.Int64("resource_mappings", rM), + slog.Int64("kas_registry", kas), + slog.Int64("attribute_key_access_server", akas), + slog.Int64("attribute_value_key_access_server", avkas), + ) +} + +func (f *Fixtures) TearDown() { + slog.Info("🗑 dropping schema", slog.String("schema", f.db.schema)) + if err := f.db.DropSchema(); err != nil { + slog.Error("could not truncate tables", slog.String("error", err.Error())) + panic(err) + } +} + +func (f *Fixtures) provisionNamespace() int64 { + var values [][]string + for _, d := range fixtureData.Namespaces.Data { + values = append(values, + []string{ + f.db.StringWrap(d.Id), + f.db.StringWrap(d.Name), + }, + ) + } + return f.provision(fixtureData.Namespaces.Metadata.TableName, fixtureData.Namespaces.Metadata.Columns, values) +} + +func (f *Fixtures) provisionAttribute() int64 { + var values [][]string + for _, d := range fixtureData.Attributes.Data { + values = append(values, []string{ + f.db.StringWrap(d.Id), + f.db.StringWrap(d.NamespaceId), + f.db.StringWrap(d.Name), + f.db.StringWrap(d.Rule), + }) + } + return f.provision(fixtureData.Attributes.Metadata.TableName, fixtureData.Attributes.Metadata.Columns, values) +} + +func (f *Fixtures) provisionAttributeValues() int64 { + var values [][]string + for _, d := range fixtureData.AttributeValues.Data { + values = append(values, []string{ + f.db.StringWrap(d.Id), + f.db.StringWrap(d.AttributeDefinitionId), + f.db.StringWrap(d.Value), + f.db.UUIDArrayWrap(d.Members), + }) + } + return f.provision(fixtureData.AttributeValues.Metadata.TableName, fixtureData.AttributeValues.Metadata.Columns, values) +} + +func (f *Fixtures) provisionSubjectMappings() int64 { + var values [][]string + for _, d := range fixtureData.SubjectMappings.Data { + values = append(values, []string{ + f.db.StringWrap(d.Id), + f.db.UUIDWrap(d.AttributeValueId), + f.db.StringWrap(d.Operator), + f.db.StringWrap(d.SubjectAttribute), + f.db.StringArrayWrap(d.SubjectAttributeValues), + }) + } + return f.provision(fixtureData.SubjectMappings.Metadata.TableName, fixtureData.SubjectMappings.Metadata.Columns, values) +} + +func (f *Fixtures) provisionResourceMappings() int64 { + var values [][]string + for _, d := range fixtureData.ResourceMappings.Data { + values = append(values, []string{ + f.db.StringWrap(d.Id), + f.db.StringWrap(d.AttributeValueId), + f.db.StringArrayWrap(d.Terms), + }) + } + return f.provision(fixtureData.ResourceMappings.Metadata.TableName, fixtureData.ResourceMappings.Metadata.Columns, values) +} + +func (f *Fixtures) provisionKasRegistry() int64 { + var values [][]string + for _, d := range fixtureData.KasRegistries.Data { + v := []string{ + f.db.StringWrap(d.Id), + f.db.StringWrap(d.Uri), + } + + if pubKeyJson, err := json.Marshal(d.PubKey); err != nil { + slog.Error("⛔️ 📦 issue with KAS registry public key JSON - check fixtures.yaml for issues") + panic("issue with KAS registry public key JSON") + } else { + v = append(v, f.db.StringWrap(string(pubKeyJson))) + } + values = append(values, v) + } + return f.provision(fixtureData.KasRegistries.Metadata.TableName, fixtureData.KasRegistries.Metadata.Columns, values) +} + +func (f *Fixtures) provisionAttributeKeyAccessServer() int64 { + var values [][]string + for _, d := range fixtureData.AttributeKeyAccessServer { + values = append(values, []string{ + f.db.StringWrap(d.AttributeID), + f.db.StringWrap(d.KeyAccessServerID), + }) + } + return f.provision("attribute_definition_key_access_grants", []string{"attribute_definition_id", "key_access_server_id"}, values) +} + +func (f *Fixtures) provisionAttributeValueKeyAccessServer() int64 { + var values [][]string + for _, d := range fixtureData.AttributeValueKeyAccessServer { + values = append(values, []string{ + f.db.StringWrap(d.ValueID), + f.db.StringWrap(d.KeyAccessServerID), + }) + } + return f.provision("attribute_value_key_access_grants", []string{"attribute_value_id", "key_access_server_id"}, values) +} + +func (f *Fixtures) provision(t string, c []string, v [][]string) (rows int64) { + var err error + rows, err = f.db.ExecInsert(t, c, v...) + if err != nil { + slog.Error("⛔️ 📦 issue with insert into table - check fixtures.yaml for issues", slog.String("table", t)) + panic("issue with insert into table") + } + if rows == 0 { + slog.Error("⛔️ 📦 no rows provisioned - check fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v))) + panic("no rows provisioned") + } + if rows != int64(len(v)) { + slog.Error("⛔️ 📦 incorrect number of rows provisioned - check fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v)), slog.Int64("actual", rows)) + panic("incorrect number of rows provisioned") + } + return rows +} diff --git a/integration/fixtures.yaml b/integration/fixtures.yaml new file mode 100644 index 0000000000..7039f4bfaf --- /dev/null +++ b/integration/fixtures.yaml @@ -0,0 +1,218 @@ +## +# Namespaces +## +attribute_namespaces: + metadata: + table_name: attribute_namespaces + columns: + - id + - name + data: + example.com: + id: 00000000-0000-0000-0000-000000000000 + name: example.com + example.net: + id: 00000000-0000-0000-0000-000000000001 + name: example.net + example.org: + id: 00000000-0000-0000-0000-000000000002 + name: example.org + +## +# Attributes +# +# Attribute Rule Enum: UNSPECIFIED, ANY_OF, ALL_OF, HIERARCHY +## +attributes: + metadata: + table_name: attribute_definitions + columns: + - id + - namespace_id + - name + - rule + data: + example.com/attr/attr1: + id: 00000000-0000-0000-0000-000000000000 + namespace_id: 00000000-0000-0000-0000-000000000000 + name: attr1 + rule: ANY_OF + example.com/attr/attr2: + id: 00000000-0000-0000-0000-000000000001 + namespace_id: 00000000-0000-0000-0000-000000000000 + name: attr2 + rule: ALL_OF + + example.net/attr/attr1: + id: 00000000-0000-0000-0000-000000000002 + namespace_id: 00000000-0000-0000-0000-000000000001 + name: attr1 + rule: ANY_OF + example.net/attr/attr2: + id: 00000000-0000-0000-0000-000000000003 + namespace_id: 00000000-0000-0000-0000-000000000001 + name: attr2 + rule: ALL_OF + example.net/attr/attr3: + id: 00000000-0000-0000-0000-000000000004 + namespace_id: 00000000-0000-0000-0000-000000000001 + name: attr3 + rule: HIERARCHY + + example.org/attr/attr1: + id: 00000000-0000-0000-0000-000000000005 + namespace_id: 00000000-0000-0000-0000-000000000002 + name: attr1 + rule: ANY_OF + example.org/attr/attr2: + id: 00000000-0000-0000-0000-000000000006 + namespace_id: 00000000-0000-0000-0000-000000000002 + name: attr2 + rule: ALL_OF + example.org/attr/attr3: + id: 00000000-0000-0000-0000-000000000007 + namespace_id: 00000000-0000-0000-0000-000000000002 + name: attr3 + rule: HIERARCHY + +attribute_key_access_servers: + - attribute_id: 00000000-0000-0000-0000-000000000000 + key_access_server_id: 00000000-0000-0000-0000-000000000000 + - attribute_id: 00000000-0000-0000-0000-000000000000 + key_access_server_id: 00000000-0000-0000-0000-000000000001 + +## +# Attribute Values +## +attribute_values: + metadata: + table_name: attribute_values + columns: + - id + - attribute_definition_id + - value + - members + data: + example.com/attr/attr1/value/value1: + id: 00000000-0000-0000-0000-000000000000 + attribute_definition_id: 00000000-0000-0000-0000-000000000000 + value: value1 + example.com/attr/attr1/value/value2: + id: 00000000-0000-0000-0000-000000000001 + attribute_definition_id: 00000000-0000-0000-0000-000000000000 + value: value2 + members: + # example.com/attr/attr2/value/value1 + - 00000000-0000-0000-0000-000000000002 + # example.net/attr/attr1/value/value1 + - 00000000-0000-0000-0000-000000000004 + + example.com/attr/attr2/value/value1: + id: 00000000-0000-0000-0000-000000000002 + attribute_definition_id: 00000000-0000-0000-0000-000000000001 + value: value1 + example.com/attr/attr2/value/value2: + id: 00000000-0000-0000-0000-000000000003 + attribute_definition_id: 00000000-0000-0000-0000-000000000001 + value: value2 + + example.net/attr/attr1/value/value1: + id: 00000000-0000-0000-0000-000000000004 + attribute_definition_id: 00000000-0000-0000-0000-000000000002 + value: value1 + example.net/attr/attr1/value/value2: + id: 00000000-0000-0000-0000-000000000005 + attribute_definition_id: 00000000-0000-0000-0000-000000000002 + value: value2 + +attribute_value_key_access_servers: + - value_id: 00000000-0000-0000-0000-000000000000 + key_access_server_id: 00000000-0000-0000-0000-000000000000 + - value_id: 00000000-0000-0000-0000-000000000000 + key_access_server_id: 00000000-0000-0000-0000-000000000001 + +## +# Subject Mappings +# +# Operator Enum: UNSPECIFIED, IN, NOT_IN +## +subject_mappings: + metadata: + table_name: subject_mappings + columns: + - id + - attribute_value_id + - operator + - subject_attribute + - subject_attribute_values + data: + subject_mapping_subject_attribute1: + id: 00000000-0000-0000-0000-000000000000 + attribute_value_id: 00000000-0000-0000-0000-000000000000 + operator: IN + subject_attribute: subject_attribute1 + subject_attribute_values: + - value1 + - value2 + + subject_mapping_subject_attribute2: + id: 00000000-0000-0000-0000-000000000001 + attribute_value_id: 00000000-0000-0000-0000-000000000001 + operator: NOT_IN + subject_attribute: subject_attribute2 + subject_attribute_values: + - value1 + - value2 + - value3 + +## +# Resource Mappings +# +## +resource_mappings: + metadata: + table_name: resource_mappings + columns: + - id + - attribute_value_id + - terms + data: + resource_mapping_to_attribute_value1: + id: 00000000-0000-0000-0000-000000000000 + attribute_value_id: 00000000-0000-0000-0000-000000000000 + terms: + - TS + - TOPSECRET + resource_mapping_to_attribute_value2: + id: 00000000-0000-0000-0000-000000000001 + attribute_value_id: 00000000-0000-0000-0000-000000000001 + terms: + - test0 + resource_mapping_to_attribute_value3: + id: 00000000-0000-0000-0000-000000000002 + attribute_value_id: 00000000-0000-0000-0000-000000000005 + terms: + - helloworld + +## +# KAS Registry (key access server registry) +# +## +kas_registry: + metadata: + table_name: key_access_servers + columns: + - id + - uri + - public_key + data: + key_access_server_1: + id: 00000000-0000-0000-0000-000000000000 + uri: kas.example.com + public_key: + remote: https://kas.example.com/public_key + key_access_server_2: + id: 00000000-0000-0000-0000-000000000001 + uri: https://local.kas.com:3000 + public_key: + local: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ6ekNDQVhXZ0F3SUJBZ0lVT1J1VjNhdlU5QUU2enNCNlp4eWxsSHBpNWQ0d0NnWUlLb1pJemowRUF3SXcKUFRFTE1Ba0dBMVVFQmhNQ2RYTXhDekFKQmdOVkJBZ01BbU4wTVNFd0h3WURWUVFLREJoSmJuUmxjbTVsZENCWAphV1JuYVhSeklGQjBlU0JNZEdRd0hoY05NalF3TVRBeU1UWTFOalUyV2hjTk1qVXdNVEF4TVRZMU5qVTJXakE5Ck1Rc3dDUVlEVlFRR0V3SjFjekVMTUFrR0ExVUVDQXdDWTNReElUQWZCZ05WQkFvTUdFbHVkR1Z5Ym1WMElGZHAKWkdkcGRITWdVSFI1SUV4MFpEQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJMVjlmQ0pIRC9rYwpyWHJVSFF3QVp4ME1jMGRQdkxqc0ovb2pFdE1NbjBST2RlT3g4eWd4Z2NRVEZGQXh5Q3RCdWFkaEFkbS9pVkh0CjhnMkVNejVkTzNXalV6QlJNQjBHQTFVZERnUVdCQlFZTmt1aytKSXVSV3luK2JFOHNCaFJ3MjdPVlRBZkJnTlYKSFNNRUdEQVdnQlFZTmt1aytKSXVSV3luK2JFOHNCaFJ3MjdPVlRBUEJnTlZIUk1CQWY4RUJUQURBUUgvTUFvRwpDQ3FHU000OUJBTUNBMGdBTUVVQ0lRQ0FCMmppWWU4QVk2TUo0QURQU1FHRTQ3K2Eza1dGTGNHc0pob1pieHRnClV3SWdjZklJdVBmaDRmYmN2OGNUaTJCbEkzazdzV1B1QW1JRlZyaUkyZDNVeDVRPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg== diff --git a/integration/kas_registry_test.go b/integration/kas_registry_test.go new file mode 100644 index 0000000000..7016c20f76 --- /dev/null +++ b/integration/kas_registry_test.go @@ -0,0 +1,245 @@ +package integration + +import ( + "context" + "log/slog" + "testing" + + "github.com/opentdf/opentdf-v2-poc/sdk/common" + kasr "github.com/opentdf/opentdf-v2-poc/sdk/kasregistry" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" +) + +var nonExistentKasRegistryId = "78909865-8888-9999-9999-000000654321" + +type KasRegistrySuite struct { + suite.Suite + schema string + f Fixtures + db DBInterface + ctx context.Context +} + +func (s *KasRegistrySuite) SetupSuite() { + slog.Info("setting up db.KasRegistry test suite") + s.ctx = context.Background() + s.schema = "test_opentdf_kas_registry" + s.db = NewDBInterface(s.schema) + s.f = NewFixture(s.db) + s.f.Provision() +} + +func (s *KasRegistrySuite) TearDownSuite() { + slog.Info("tearing down db.KasRegistry test suite") + s.f.TearDown() +} + +func getKasRegistryFixtures() []FixtureDataKasRegistry { + return []FixtureDataKasRegistry{ + fixtures.GetKasRegistryKey("key_access_server_1"), + fixtures.GetKasRegistryKey("key_access_server_2"), + } +} + +func (s *KasRegistrySuite) Test_ListKeyAccessServers() { + fixtures := getKasRegistryFixtures() + list, err := s.db.Client.ListKeyAccessServers(s.ctx) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), list) + for _, fixture := range fixtures { + for _, item := range list { + if item.Id == fixture.Id { + assert.Equal(s.T(), fixture.Id, item.Id) + if item.PublicKey.GetRemote() != "" { + assert.Equal(s.T(), fixture.PubKey.Remote, item.PublicKey.GetRemote()) + } else { + assert.Equal(s.T(), fixture.PubKey.Local, item.PublicKey.GetLocal()) + } + assert.Equal(s.T(), fixture.Uri, item.Uri) + } + } + } +} + +func (s *KasRegistrySuite) Test_GetKeyAccessServer() { + remoteFixture := fixtures.GetKasRegistryKey("key_access_server_1") + localFixture := fixtures.GetKasRegistryKey("key_access_server_2") + + remote, err := s.db.Client.GetKeyAccessServer(s.ctx, remoteFixture.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), remote) + assert.Equal(s.T(), remoteFixture.Id, remote.Id) + assert.Equal(s.T(), remoteFixture.Uri, remote.Uri) + assert.Equal(s.T(), remoteFixture.PubKey.Remote, remote.PublicKey.GetRemote()) + + local, err := s.db.Client.GetKeyAccessServer(s.ctx, localFixture.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), local) + assert.Equal(s.T(), localFixture.Id, local.Id) + assert.Equal(s.T(), localFixture.Uri, local.Uri) + assert.Equal(s.T(), localFixture.PubKey.Local, local.PublicKey.GetLocal()) +} + +func (s *KasRegistrySuite) Test_GetKeyAccessServerWithNonExistentIdFails() { + resp, err := s.db.Client.GetKeyAccessServer(s.ctx, nonExistentKasRegistryId) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), resp) +} + +func (s *KasRegistrySuite) Test_CreateKeyAccessServer_Remote() { + metadata := &common.MetadataMutable{ + Labels: map[string]string{ + "name": "this is the test name of my key access server", + }, + Description: "test create key access server description", + } + + pubKey := &kasr.PublicKey{ + PublicKey: &kasr.PublicKey_Remote{ + Remote: "https://remote.com/key", + }, + } + + kasRegistry := &kasr.KeyAccessServerCreateUpdate{ + Uri: "kas.uri", + PublicKey: pubKey, + Metadata: metadata, + } + createdKasRegistry, err := s.db.Client.CreateKeyAccessServer(s.ctx, kasRegistry) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdKasRegistry) + assert.Equal(s.T(), kasRegistry.Uri, createdKasRegistry.Uri) + assert.Equal(s.T(), kasRegistry.PublicKey.GetRemote(), createdKasRegistry.PublicKey.GetRemote()) + assert.Equal(s.T(), createdKasRegistry.PublicKey.GetLocal(), "") + assert.Equal(s.T(), kasRegistry.Metadata.Description, createdKasRegistry.Metadata.Description) + assert.EqualValues(s.T(), kasRegistry.Metadata.Labels, createdKasRegistry.Metadata.Labels) + assert.NotEqual(s.T(), "", createdKasRegistry.Id) +} + +func (s *KasRegistrySuite) Test_CreateKeyAccessServer_Local() { + metadata := &common.MetadataMutable{ + Labels: map[string]string{ + "name": "local KAS", + }, + Description: "this KAS has a locally provided key", + } + + pubKey := &kasr.PublicKey{ + PublicKey: &kasr.PublicKey_Local{ + Local: "some_local_public_key_in_base64", + }, + } + + kasRegistry := &kasr.KeyAccessServerCreateUpdate{ + Uri: "testingCreation.uri.com", + PublicKey: pubKey, + Metadata: metadata, + } + createdKasRegistry, err := s.db.Client.CreateKeyAccessServer(s.ctx, kasRegistry) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdKasRegistry) + assert.Equal(s.T(), kasRegistry.Uri, createdKasRegistry.Uri) + assert.Equal(s.T(), kasRegistry.PublicKey.GetLocal(), createdKasRegistry.PublicKey.GetLocal()) + assert.Equal(s.T(), createdKasRegistry.PublicKey.GetRemote(), "") + assert.Equal(s.T(), kasRegistry.Metadata.Description, createdKasRegistry.Metadata.Description) + assert.EqualValues(s.T(), kasRegistry.Metadata.Labels, createdKasRegistry.Metadata.Labels) + assert.NotEqual(s.T(), "", createdKasRegistry.Id) +} + +func (s *KasRegistrySuite) Test_UpdateKeyAccessServer() { + // create a test KAS + pubKey := &kasr.PublicKey{ + PublicKey: &kasr.PublicKey_Remote{ + Remote: "https://remote.com/key", + }, + } + testKas := &kasr.KeyAccessServerCreateUpdate{ + Uri: "testingUpdateWithRemoteKey.com", + PublicKey: pubKey, + } + createdKas, err := s.db.Client.CreateKeyAccessServer(s.ctx, testKas) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdKas) + + // update it with new values and metadata + updatedMetadata := &common.MetadataMutable{ + Labels: map[string]string{ + "name": "updated name", + }, + Description: "updated description", + } + updatedKas := &kasr.KeyAccessServerCreateUpdate{ + Uri: "updatedUri.com", + PublicKey: pubKey, + Metadata: updatedMetadata, + } + updated, err := s.db.Client.UpdateKeyAccessServer(s.ctx, createdKas.Id, updatedKas) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updated) + + // get after update to validate changes were successful + got, err := s.db.Client.GetKeyAccessServer(s.ctx, createdKas.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), got) + assert.Equal(s.T(), createdKas.Id, got.Id) + assert.Equal(s.T(), updatedKas.Uri, got.Uri) + assert.Equal(s.T(), updatedKas.PublicKey.GetRemote(), got.PublicKey.GetRemote()) + assert.Equal(s.T(), updatedMetadata.Description, got.Metadata.Description) + assert.EqualValues(s.T(), updatedMetadata.Labels, got.Metadata.Labels) +} + +func (s *KasRegistrySuite) Test_UpdateKeyAccessServerWithNonExistentIdFails() { + pubKey := &kasr.PublicKey{ + PublicKey: &kasr.PublicKey_Local{ + Local: "this_is_a_local_key", + }, + } + updatedKas := &kasr.KeyAccessServerCreateUpdate{ + Uri: "someKasUri.com", + PublicKey: pubKey, + } + resp, err := s.db.Client.UpdateKeyAccessServer(s.ctx, nonExistentKasRegistryId, updatedKas) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), resp) +} + +func (s *KasRegistrySuite) Test_DeleteKeyAccessServer() { + // create a test KAS + pubKey := &kasr.PublicKey{ + PublicKey: &kasr.PublicKey_Remote{ + Remote: "https://remote.com/key", + }, + } + testKas := &kasr.KeyAccessServerCreateUpdate{ + Uri: "deleting.net", + PublicKey: pubKey, + } + createdKas, err := s.db.Client.CreateKeyAccessServer(s.ctx, testKas) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdKas) + + // delete it + deleted, err := s.db.Client.DeleteKeyAccessServer(s.ctx, createdKas.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), deleted) + + // get after delete to validate it's gone + resp, err := s.db.Client.GetKeyAccessServer(s.ctx, createdKas.Id) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), resp) +} + +func (s *KasRegistrySuite) Test_DeleteKeyAccessServerWithNonExistentIdFails() { + resp, err := s.db.Client.DeleteKeyAccessServer(s.ctx, nonExistentKasRegistryId) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), resp) +} + +func TestKasRegistrySuite(t *testing.T) { + if testing.Short() { + t.Skip("skipping db.KasRegistry integration tests") + } + suite.Run(t, new(KasRegistrySuite)) +} diff --git a/integration/main_test.go b/integration/main_test.go new file mode 100644 index 0000000000..2aa98430e5 --- /dev/null +++ b/integration/main_test.go @@ -0,0 +1,159 @@ +package integration + +import ( + "context" + "fmt" + "log/slog" + "os" + "testing" + "time" + + "github.com/creasty/defaults" + tc "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" +) + +var fixtures Fixtures + +func init() { + fmt.Println("====================================================================================") + fmt.Println("") + fmt.Println(" Integration Tests") + fmt.Println("") + fmt.Println(" Testcontainers is used to run these integration tests. To get this working please") + fmt.Println(" ensure you have Docker/Podman installed and running.") + fmt.Println("") + fmt.Println(" If using Podman, export these variables:") + fmt.Println(" export TESTCONTAINERS_PODMAN=true;") + fmt.Println(" export TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED=true;") + fmt.Println(" export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock;") + fmt.Println("") + fmt.Println(" For more information please see: https://www.testcontainers.org/") + fmt.Println("") + fmt.Println(" ---------------------------------------------------------------------------------") + fmt.Println("") + fmt.Println(" Test runner hanging at '📀 starting postgres container'?") + fmt.Println(" Try restarting Docker/Podman and running the tests again.") + fmt.Println("") + fmt.Println(" Docker: docker-machine restart") + fmt.Println(" Podman: podman machine stop;podman machine start") + fmt.Println("") + fmt.Println("====================================================================================") + fmt.Println("") +} + +func TestMain(m *testing.M) { + ctx := context.Background() + conf := Config + + if err := defaults.Set(conf); err != nil { + slog.Error("could not set defaults", slog.String("error", err.Error())) + os.Exit(1) + } + + /* + For podman + export TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED=true; # needed to run Reaper (alternative disable it TESTCONTAINERS_RYUK_DISABLED=true) + export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock; # needed to apply the bind with statfs + */ + + var providerType tc.ProviderType + + if os.Getenv("TESTCONTAINERS_PODMAN") == "true" { + providerType = tc.ProviderPodman + } else { + providerType = tc.ProviderDocker + } + + req := tc.GenericContainerRequest{ + ProviderType: providerType, + ContainerRequest: tc.ContainerRequest{ + Image: "postgres:13.3", + Name: "testcontainer-postgres", + ExposedPorts: []string{"5432/tcp"}, + + Env: map[string]string{ + "POSTGRES_USER": conf.DB.User, + "POSTGRES_PASSWORD": conf.DB.Password, + "POSTGRES_DB": conf.DB.Database, + }, + + WaitingFor: wait.ForExec([]string{"pg_isready", "-h", "localhost", "-U", conf.DB.User}).WithStartupTimeout(120 * time.Second), + }, + Started: true, + } + + slog.Info("📀 starting postgres container") + postgres, err := tc.GenericContainer(context.Background(), req) + if err != nil { + slog.Error("could not start postgres container", slog.String("error", err.Error())) + panic(err) + } + + // Cleanup the container + defer func() { + if err := postgres.Terminate(ctx); err != nil { + slog.Error("could not stop postgres container", slog.String("error", err.Error())) + return + } + + if err := recover(); err != nil { + os.Exit(1) + } + }() + + port, err := postgres.MappedPort(ctx, "5432/tcp") + if err != nil { + slog.Error("could not get postgres mapped port", slog.String("error", err.Error())) + panic(err) + } + + conf.DB.Port = port.Int() + + db := NewDBInterface("test_opentdf") + if err != nil { + slog.Error("issue creating database client", slog.String("error", err.Error())) + panic(err) + } + + slog.Info("🚚 applying migrations") + applied, err := db.Client.RunMigrations() + if err != nil { + slog.Error("issue running migrations", slog.String("error", err.Error())) + panic(err) + } + slog.Info("🚚 applied migrations", slog.Int("count", applied)) + + slog.Info("🏠 loading fixtures") + loadFixtureData() + + // otdf, err := server.NewOpenTDFServer(conf.Server) + // if err != nil { + // slog.Error("issue creating opentdf server", slog.String("error", err.Error())) + // panic(err) + // } + // defer otdf.Stop() + + // slog.Info("starting opa engine") + // // Start the opa engine + // conf.OPA.Embedded = true + // eng, err := opa.NewEngine(conf.OPA) + // if err != nil { + // slog.Error("could not start opa engine", slog.String("error", err.Error())) + // panic(err) + // } + // defer eng.Stop(context.Background()) + + // // Register the services + // err = cmd.RegisterServices(*conf, otdf, dbClient, eng) + // if err != nil { + // slog.Error("issue registering services", slog.String("error", err.Error())) + // panic(err) + // } + + // // Start the server + // slog.Info("starting opentdf server", slog.Int("grpcPort", conf.Server.Grpc.Port), slog.Int("httpPort", conf.Server.HTTP.Port)) + // otdf.Run() + + m.Run() +} diff --git a/integration/namespaces_test.go b/integration/namespaces_test.go new file mode 100644 index 0000000000..f1a69650a6 --- /dev/null +++ b/integration/namespaces_test.go @@ -0,0 +1,151 @@ +package integration + +import ( + "context" + "fmt" + "log/slog" + "strings" + "testing" + + "github.com/opentdf/opentdf-v2-poc/internal/db" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" +) + +type NamespacesSuite struct { + suite.Suite + schema string + f Fixtures + db DBInterface + ctx context.Context +} + +const nonExistentNamespaceId = "88888888-2222-3333-4444-999999999999" + +func (s *NamespacesSuite) SetupSuite() { + slog.Info("setting up db.Namespaces test suite") + s.ctx = context.Background() + s.schema = "test_opentdf_namespaces" + s.db = NewDBInterface(s.schema) + s.f = NewFixture(s.db) + s.f.Provision() +} + +func (s *NamespacesSuite) TearDownSuite() { + slog.Info("tearing down db.Namespaces test suite") + s.f.TearDown() +} + +func getNamespaceFixtures() []FixtureDataNamespace { + return []FixtureDataNamespace{ + fixtures.GetNamespaceKey("example.com"), + fixtures.GetNamespaceKey("example.net"), + fixtures.GetNamespaceKey("example.org"), + } +} + +func (s *NamespacesSuite) Test_CreateNamespace() { + testData := getNamespaceFixtures() + + for _, ns := range testData { + ns.Name = strings.Replace(ns.Name, "example", "test", 1) + createdNamespace, err := s.db.Client.CreateNamespace(s.ctx, ns.Name) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdNamespace) + } + + // Creating a namespace with a name conflict should fail + for _, ns := range testData { + _, err := s.db.Client.CreateNamespace(s.ctx, ns.Name) + assert.NotNil(s.T(), err) + assert.ErrorIs(s.T(), err, db.ErrUniqueConstraintViolation) + } +} + +func (s *NamespacesSuite) Test_GetNamespace() { + testData := getNamespaceFixtures() + + for _, test := range testData { + gotNamespace, err := s.db.Client.GetNamespace(s.ctx, test.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), gotNamespace) + // name retrieved by ID equal to name used to create + assert.Equal(s.T(), test.Name, gotNamespace.Name) + } + + // Getting a namespace with an nonExistent id should fail + _, err := s.db.Client.GetNamespace(s.ctx, nonExistentNamespaceId) + assert.NotNil(s.T(), err) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + +func (s *NamespacesSuite) Test_ListNamespaces() { + testData := getNamespaceFixtures() + + gotNamespaces, err := s.db.Client.ListNamespaces(s.ctx) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), gotNamespaces) + assert.GreaterOrEqual(s.T(), len(gotNamespaces), len(testData)) +} + +func (s *NamespacesSuite) Test_UpdateNamespace() { + testData := getNamespaceFixtures() + + for i, ns := range testData { + updatedName := fmt.Sprintf("%s-updated", ns.Name) + testData[i].Name = updatedName + updatedNamespace, err := s.db.Client.UpdateNamespace(s.ctx, ns.Id, updatedName) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updatedNamespace) + assert.Equal(s.T(), updatedName, updatedNamespace.Name) + } + + // Update when the namespace does not exist should fail + _, err := s.db.Client.UpdateNamespace(s.ctx, nonExistentNamespaceId, "new-namespace.com") + assert.NotNil(s.T(), err) + assert.ErrorIs(s.T(), err, db.ErrNotFound) + + // Update to a conflict should fail + gotNamespace, e := s.db.Client.UpdateNamespace(s.ctx, testData[0].Id, testData[1].Name) + assert.Nil(s.T(), gotNamespace) + assert.NotNil(s.T(), e) + assert.ErrorIs(s.T(), e, db.ErrUniqueConstraintViolation) +} + +func (s *NamespacesSuite) Test_DeleteNamespace() { + testData := getNamespaceFixtures() + + // Deletion should fail when the namespace is referenced as FK in attribute(s) + for _, ns := range testData { + err := s.db.Client.DeleteNamespace(s.ctx, ns.Id) + assert.NotNil(s.T(), err) + assert.ErrorIs(s.T(), err, db.ErrForeignKeyViolation) + } + + // Deletion should succeed when NOT referenced as FK in attribute(s) + newNamespaceId, err := s.db.Client.CreateNamespace(s.ctx, "new-namespace.com") + assert.Nil(s.T(), err) + assert.NotEqual(s.T(), "", newNamespaceId) + + err = s.db.Client.DeleteNamespace(s.ctx, newNamespaceId) + assert.Nil(s.T(), err) + + // Deleted namespace should not be found on List + gotNamespaces, err := s.db.Client.ListNamespaces(s.ctx) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), gotNamespaces) + for _, ns := range gotNamespaces { + assert.NotEqual(s.T(), newNamespaceId, ns.Id) + } + + // Deleted namespace should not be found on Get + _, err = s.db.Client.GetNamespace(s.ctx, newNamespaceId) + assert.NotNil(s.T(), err) +} + +func TestNamespacesSuite(t *testing.T) { + if testing.Short() { + t.Skip("skipping namespaces integration tests") + } + suite.Run(t, new(NamespacesSuite)) +} diff --git a/integration/resource_mappings_test.go b/integration/resource_mappings_test.go new file mode 100644 index 0000000000..09f60b6b8f --- /dev/null +++ b/integration/resource_mappings_test.go @@ -0,0 +1,269 @@ +package integration + +import ( + "context" + "fmt" + "log/slog" + "testing" + + "github.com/opentdf/opentdf-v2-poc/sdk/common" + resourcemapping "github.com/opentdf/opentdf-v2-poc/sdk/resourcemapping" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" +) + +var nonExistentResourceMappingUuid = "45674556-8888-9999-9999-000001230000" + +type ResourceMappingsSuite struct { + suite.Suite + schema string + f Fixtures + db DBInterface + ctx context.Context +} + +func (s *ResourceMappingsSuite) SetupSuite() { + slog.Info("setting up db.ResourceMappings test suite") + s.ctx = context.Background() + s.schema = "test_opentdf_resource_mappings" + s.db = NewDBInterface(s.schema) + s.f = NewFixture(s.db) + s.f.Provision() +} + +func (s *ResourceMappingsSuite) TearDownSuite() { + slog.Info("tearing down db.ResourceMappings test suite") + s.f.TearDown() +} + +func getResourceMappingFixtures() []FixtureDataResourceMapping { + return []FixtureDataResourceMapping{ + fixtures.GetResourceMappingKey("resource_mapping_to_attribute_value1"), + fixtures.GetResourceMappingKey("resource_mapping_to_attribute_value2"), + fixtures.GetResourceMappingKey("resource_mapping_to_attribute_value3"), + } +} + +func (s *ResourceMappingsSuite) Test_CreateResourceMapping() { + metadata := &common.MetadataMutable{ + Labels: map[string]string{ + "name": "this is the test name of my resource mapping", + }, + Description: "test create resource mapping description", + } + + attrValue := fixtures.GetAttributeValueKey("example.com/attr/attr1/value/value1") + mapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: attrValue.Id, + Metadata: metadata, + Terms: []string{"term1", "term2"}, + } + createdMapping, err := s.db.Client.CreateResourceMapping(s.ctx, mapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdMapping) +} + +func (s *ResourceMappingsSuite) Test_CreateResourceMappingWithUnknownAttributeValueFails() { + metadata := &common.MetadataMutable{} + + mapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: nonExistentAttributeValueUuid, + Metadata: metadata, + Terms: []string{"term1", "term2"}, + } + createdMapping, err := s.db.Client.CreateResourceMapping(s.ctx, mapping) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), createdMapping) +} + +func (s *ResourceMappingsSuite) Test_CreateResourceMappingWithEmptyTermsSucceeds() { + metadata := &common.MetadataMutable{} + + attrValue := fixtures.GetAttributeValueKey("example.com/attr/attr2/value/value2") + mapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: attrValue.Id, + Metadata: metadata, + Terms: []string{}, + } + createdMapping, err := s.db.Client.CreateResourceMapping(s.ctx, mapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdMapping) + assert.NotNil(s.T(), createdMapping.Terms) + assert.Equal(s.T(), len(createdMapping.Terms), 0) +} + +func (s *ResourceMappingsSuite) Test_ListResourceMappings() { + // make sure we can get all fixtures + testData := getResourceMappingFixtures() + mappings, err := s.db.Client.ListResourceMappings(s.ctx) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), mappings) + for _, testMapping := range testData { + found := false + for _, mapping := range mappings { + if testMapping.Id == mapping.Id { + found = true + break + } + } + assert.True(s.T(), found, fmt.Sprintf("expected to find mapping %s", testMapping.Id)) + } +} + +func (s *ResourceMappingsSuite) Test_GetResourceMapping() { + // make sure we can get all fixtures + testData := getResourceMappingFixtures() + for _, testMapping := range testData { + mapping, err := s.db.Client.GetResourceMapping(s.ctx, testMapping.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), mapping) + assert.Equal(s.T(), testMapping.Id, mapping.Id) + assert.Equal(s.T(), testMapping.AttributeValueId, mapping.AttributeValue.Id) + assert.Equal(s.T(), testMapping.Terms, mapping.Terms) + } +} + +func (s *ResourceMappingsSuite) Test_GetResourceMappingWithUnknownIdFails() { + mapping, err := s.db.Client.GetResourceMapping(s.ctx, nonExistentResourceMappingUuid) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), mapping) +} + +func (s *ResourceMappingsSuite) Test_GetResourceMappingOfCreatedSucceeds() { + metadata := &common.MetadataMutable{} + + attrValue := fixtures.GetAttributeValueKey("example.com/attr/attr1/value/value2") + mapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: attrValue.Id, + Metadata: metadata, + Terms: []string{"term1", "term2"}, + } + createdMapping, err := s.db.Client.CreateResourceMapping(s.ctx, mapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdMapping) + + got, err := s.db.Client.GetResourceMapping(s.ctx, createdMapping.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), mapping) + assert.Equal(s.T(), createdMapping.Id, got.Id) + assert.Equal(s.T(), createdMapping.AttributeValue.Id, got.AttributeValue.Id) + assert.Equal(s.T(), createdMapping.Terms, mapping.Terms) +} + +func (s *ResourceMappingsSuite) Test_UpdateResourceMapping() { + metadata := &common.MetadataMutable{ + Labels: map[string]string{ + "name": "some test resource mapping name", + }, + Description: "some description", + } + + attrValue := fixtures.GetAttributeValueKey("example.com/attr/attr2/value/value2") + mapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: attrValue.Id, + Metadata: metadata, + Terms: []string{"some term", "other term"}, + } + createdMapping, err := s.db.Client.CreateResourceMapping(s.ctx, mapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdMapping) + + updatedMetadata := &common.MetadataMutable{ + Labels: map[string]string{ + "name": "new name", + }, + Description: "new description", + } + + // update the created with new metadata and terms + updatedMapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: createdMapping.AttributeValue.Id, + Metadata: updatedMetadata, + Terms: []string{"updated term1", "updated term 2"}, + } + updated, err := s.db.Client.UpdateResourceMapping(s.ctx, createdMapping.Id, updatedMapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updated) + + // get after update to verify db reflects changes made + got, err := s.db.Client.GetResourceMapping(s.ctx, createdMapping.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), got) + assert.Equal(s.T(), createdMapping.Id, got.Id) + assert.Equal(s.T(), createdMapping.AttributeValue.Id, got.AttributeValue.Id) + assert.Equal(s.T(), updatedMapping.Terms, got.Terms) + assert.Equal(s.T(), updatedMetadata.Description, got.Metadata.Description) + assert.EqualValues(s.T(), updatedMetadata.Labels, got.Metadata.Labels) +} + +func (s *ResourceMappingsSuite) Test_UpdateResourceMappingWithUnknownIdFails() { + attrValue := fixtures.GetAttributeValueKey("example.com/attr/attr2/value/value2") + mapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: attrValue.Id, + Terms: []string{"asdf qwerty"}, + } + createdMapping, err := s.db.Client.CreateResourceMapping(s.ctx, mapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdMapping) + + // update the created with new metadata and terms + updatedMapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: createdMapping.AttributeValue.Id, + Terms: []string{"asdf updated term1"}, + } + updated, err := s.db.Client.UpdateResourceMapping(s.ctx, nonExistentResourceMappingUuid, updatedMapping) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), updated) +} + +func (s *ResourceMappingsSuite) Test_UpdateResourceMappingWithUnknownAttributeValueIdFails() { + attrValue := fixtures.GetAttributeValueKey("example.com/attr/attr2/value/value2") + mapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: attrValue.Id, + Terms: []string{"testing"}, + } + createdMapping, err := s.db.Client.CreateResourceMapping(s.ctx, mapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdMapping) + + // update the created with new metadata and terms + updatedMapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: nonExistentAttributeValueUuid, + Terms: []string{"testing-2"}, + } + updated, err := s.db.Client.UpdateResourceMapping(s.ctx, createdMapping.Id, updatedMapping) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), updated) +} + +func (s *ResourceMappingsSuite) Test_DeleteResourceMapping() { + attrValue := fixtures.GetAttributeValueKey("example.net/attr/attr1/value/value1") + mapping := &resourcemapping.ResourceMappingCreateUpdate{ + AttributeValueId: attrValue.Id, + Terms: []string{"term1", "term2"}, + } + createdMapping, err := s.db.Client.CreateResourceMapping(s.ctx, mapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdMapping) + + deleted, err := s.db.Client.DeleteResourceMapping(s.ctx, createdMapping.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), deleted) + + deletedMapping, err := s.db.Client.GetResourceMapping(s.ctx, createdMapping.Id) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), deletedMapping) +} + +func (s *ResourceMappingsSuite) Test_DeleteResourceMappingWithUnknownIdFails() { + deleted, err := s.db.Client.DeleteResourceMapping(s.ctx, nonExistentResourceMappingUuid) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), deleted) +} + +func TestResourceMappingsSuite(t *testing.T) { + if testing.Short() { + t.Skip("skipping resource mappings integration tests") + } + suite.Run(t, new(ResourceMappingsSuite)) +} diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go new file mode 100644 index 0000000000..501ec2475a --- /dev/null +++ b/integration/subject_mappings_test.go @@ -0,0 +1,75 @@ +package integration + +import ( + "context" + "log/slog" + "testing" + + "github.com/opentdf/opentdf-v2-poc/sdk/common" + "github.com/opentdf/opentdf-v2-poc/sdk/subjectmapping" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" +) + +type SubjectMappingsSuite struct { + suite.Suite + schema string + f Fixtures + db DBInterface + ctx context.Context +} + +func (s *SubjectMappingsSuite) SetupSuite() { + slog.Info("setting up db.SubjectMappings test suite") + s.ctx = context.Background() + s.schema = "test_opentdf_subject_mappings" + s.db = NewDBInterface(s.schema) + s.f = NewFixture(s.db) + s.f.Provision() +} + +func (s *SubjectMappingsSuite) TearDownSuite() { + slog.Info("tearing down db.SubjectMappings test suite") + s.f.TearDown() +} + +func (s *SubjectMappingsSuite) Test_CreateSubjectMapping() { + metadata := &common.MetadataMutable{} + + attrValue := fixtures.GetAttributeValueKey("example.com/attr/attr1/value/value1") + mapping := &subjectmapping.SubjectMappingCreateUpdate{ + AttributeValueId: attrValue.Id, + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, + SubjectAttribute: "subject_attribute--test", + SubjectValues: []string{"subject_attribute_values--test1", "subject_attribute_values--test2"}, + Metadata: metadata, + } + createdMapping, err := s.db.Client.CreateSubjectMapping(s.ctx, mapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdMapping) +} + +func (s *SubjectMappingsSuite) Test_GetSubjectMapping() { + attrValue := fixtures.GetAttributeValueKey("example.com/attr/attr1/value/value1") + mapping := &subjectmapping.SubjectMappingCreateUpdate{ + AttributeValueId: attrValue.Id, + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, + SubjectAttribute: "subject_attribute--test", + SubjectValues: []string{"subject_attribute_values--test1", "subject_attribute_values--test2"}, + Metadata: &common.MetadataMutable{}, + } + createdMapping, err := s.db.Client.CreateSubjectMapping(s.ctx, mapping) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), createdMapping) + + gotMapping, err := s.db.Client.GetSubjectMapping(s.ctx, createdMapping.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), gotMapping) +} + +func TestSubjectMappingSuite(t *testing.T) { + if testing.Short() { + t.Skip("skipping subject_mappings integration tests") + } + suite.Run(t, new(SubjectMappingsSuite)) +} diff --git a/internal/db/attribute_values.go b/internal/db/attribute_values.go new file mode 100644 index 0000000000..28bf28ac03 --- /dev/null +++ b/internal/db/attribute_values.go @@ -0,0 +1,274 @@ +package db + +import ( + "context" + + sq "github.com/Masterminds/squirrel" + "github.com/jackc/pgx/v5" + "github.com/opentdf/opentdf-v2-poc/sdk/attributes" + "github.com/opentdf/opentdf-v2-poc/sdk/common" + "google.golang.org/protobuf/encoding/protojson" +) + +var AttributeValueTable = tableName(TableAttributeValues) + +func attributeValueHydrateItem(row pgx.Row) (*attributes.Value, error) { + var ( + id string + value string + members []string + metadataJson []byte + attributeId string + ) + if err := row.Scan(&id, &value, &members, &metadataJson, &attributeId); err != nil { + return nil, err + } + + m := &common.Metadata{} + if metadataJson != nil { + if err := protojson.Unmarshal(metadataJson, m); err != nil { + return nil, err + } + } + + v := &attributes.Value{ + Id: id, + Value: value, + Members: members, + Metadata: m, + AttributeId: attributeId, + } + return v, nil +} + +/// +/// CRUD +/// + +func createAttributeValueSql( + attribute_id string, + value string, + members []string, + metadata []byte) (string, []interface{}, error) { + return newStatementBuilder(). + Insert(AttributeValueTable). + Columns( + "attribute_definition_id", + "value", + "members", + "metadata", + ). + Values( + attribute_id, + value, + members, + metadata, + ). + Suffix("RETURNING id"). + ToSql() +} +func (c Client) CreateAttributeValue(ctx context.Context, attributeId string, v *attributes.ValueCreateUpdate) (*attributes.Value, error) { + metadataJson, metadata, err := marshalCreateMetadata(v.Metadata) + if err != nil { + return nil, err + } + + sql, args, err := createAttributeValueSql( + attributeId, + v.Value, + v.Members, + metadataJson, + ) + if err != nil { + return nil, err + } + + var id string + if r, err := c.queryRow(ctx, sql, args, err); err != nil { + return nil, err + } else if err := r.Scan(&id); err != nil { + return nil, err + } + + rV := &attributes.Value{ + Id: id, + AttributeId: attributeId, + Value: v.Value, + Members: v.Members, + Metadata: metadata, + } + return rV, nil +} + +func getAttributeValueSql(id string) (string, []interface{}, error) { + return newStatementBuilder(). + Select( + tableField(AttributeValueTable, "id"), + tableField(AttributeValueTable, "value"), + tableField(AttributeValueTable, "members"), + tableField(AttributeValueTable, "metadata"), + tableField(AttributeValueTable, "attribute_definition_id"), + ). + From(AttributeValueTable). + Where(sq.Eq{tableField(AttributeValueTable, "id"): id}). + ToSql() +} +func (c Client) GetAttributeValue(ctx context.Context, id string) (*attributes.Value, error) { + sql, args, err := getAttributeValueSql(id) + row, err := c.queryRow(ctx, sql, args, err) + if err != nil { + return nil, err + } + + v, err := attributeValueHydrateItem(row) + if err != nil { + return nil, err + } + + return v, nil +} + +func listAttributeValuesSql(attribute_id string) (string, []interface{}, error) { + return newStatementBuilder(). + Select( + tableField(AttributeValueTable, "id"), + tableField(AttributeValueTable, "value"), + tableField(AttributeValueTable, "members"), + tableField(AttributeValueTable, "metadata"), + tableField(AttributeValueTable, "attribute_definition_id"), + ). + From(AttributeValueTable). + Where(sq.Eq{tableField(AttributeValueTable, "attribute_definition_id"): attribute_id}). + ToSql() +} +func (c Client) ListAttributeValues(ctx context.Context, attribute_id string) ([]*attributes.Value, error) { + sql, args, err := listAttributeValuesSql(attribute_id) + rows, err := c.query(ctx, sql, args, err) + if err != nil { + return nil, err + } + defer rows.Close() + + list := make([]*attributes.Value, 0) + for rows.Next() { + v, err := attributeValueHydrateItem(rows) + if err != nil { + return nil, err + } + list = append(list, v) + } + + return list, nil +} + +func updateAttributeValueSql( + id string, + value string, + members []string, + metadata []byte) (string, []interface{}, error) { + sb := newStatementBuilder(). + Update(AttributeValueTable). + Set("metadata", metadata) + + if value != "" { + sb = sb.Set("value", value) + } + if members != nil { + sb = sb.Set("members", members) + } + + return sb. + Where(sq.Eq{"id": id}). + ToSql() +} +func (c Client) UpdateAttributeValue(ctx context.Context, id string, v *attributes.ValueCreateUpdate) (*attributes.Value, error) { + prev, err := c.GetAttributeValue(ctx, id) + if err != nil { + return nil, err + } + + metadataJson, _, err := marshalUpdateMetadata(prev.Metadata, v.Metadata) + if err != nil { + return nil, err + } + + sql, args, err := updateAttributeValueSql( + id, + v.Value, + v.Members, + metadataJson, + ) + if err != nil { + return nil, err + } + + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return prev, nil +} + +func deleteAttributeValueSql(id string) (string, []interface{}, error) { + return newStatementBuilder(). + Delete(AttributeValueTable). + Where(sq.Eq{tableField(AttributeValueTable, "id"): id}). + ToSql() +} +func (c Client) DeleteAttributeValue(ctx context.Context, id string) (*attributes.Value, error) { + prev, err := c.GetAttributeValue(ctx, id) + if err != nil { + return nil, err + } + + sql, args, err := deleteAttributeValueSql(id) + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return prev, nil +} + +func assignKeyAccessServerToValueSql(valueID, keyAccessServerID string) (string, []interface{}, error) { + t := Tables.AttributeValueKeyAccessGrants + return newStatementBuilder(). + Insert(t.Name()). + Columns("attribute_value_id", "key_access_server_id"). + Values(valueID, keyAccessServerID). + ToSql() +} + +func (c Client) AssignKeyAccessServerToValue(ctx context.Context, k *attributes.ValueKeyAccessServer) (*attributes.ValueKeyAccessServer, error) { + sql, args, err := assignKeyAccessServerToValueSql(k.ValueId, k.KeyAccessServerId) + if err != nil { + return nil, err + } + + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return k, nil +} + +func removeKeyAccessServerFromValueSql(valueID, keyAccessServerID string) (string, []interface{}, error) { + t := Tables.AttributeValueKeyAccessGrants + return newStatementBuilder(). + Delete(t.Name()). + Where(sq.Eq{"attribute_value_id": valueID, "key_access_server_id": keyAccessServerID}). + Suffix("IS TRUE RETURNING *"). + ToSql() +} + +func (c Client) RemoveKeyAccessServerFromValue(ctx context.Context, k *attributes.ValueKeyAccessServer) (*attributes.ValueKeyAccessServer, error) { + sql, args, err := removeKeyAccessServerFromValueSql(k.ValueId, k.KeyAccessServerId) + if err != nil { + return nil, err + } + + if _, err := c.queryCount(ctx, sql, args); err != nil { + return nil, err + } + + return k, nil +} diff --git a/internal/db/attributes.go b/internal/db/attributes.go new file mode 100644 index 0000000000..c204bf416c --- /dev/null +++ b/internal/db/attributes.go @@ -0,0 +1,435 @@ +package db + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "log/slog" + "strings" + + sq "github.com/Masterminds/squirrel" + "github.com/jackc/pgx/v5" + "github.com/opentdf/opentdf-v2-poc/sdk/attributes" + "github.com/opentdf/opentdf-v2-poc/sdk/common" + "github.com/opentdf/opentdf-v2-poc/sdk/kasregistry" + "github.com/opentdf/opentdf-v2-poc/sdk/namespaces" + "github.com/opentdf/opentdf-v2-poc/services" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/protojson" +) + +var ( + AttributeTable = tableName(TableAttributes) + NamespacesTable = tableName(TableNamespaces) + AttributeRuleTypeEnumPrefix = "ATTRIBUTE_RULE_TYPE_ENUM_" +) + +func attributesRuleTypeEnumTransformIn(value string) string { + return strings.TrimPrefix(value, AttributeRuleTypeEnumPrefix) +} + +func attributesRuleTypeEnumTransformOut(value string) attributes.AttributeRuleTypeEnum { + return attributes.AttributeRuleTypeEnum(attributes.AttributeRuleTypeEnum_value[AttributeRuleTypeEnumPrefix+value]) +} + +func attributesValuesProtojson(valuesJson []byte) ([]*attributes.Value, error) { + var ( + raw []json.RawMessage + values []*attributes.Value + ) + if err := json.Unmarshal(valuesJson, &raw); err != nil { + return nil, err + } + + for _, r := range raw { + value := attributes.Value{} + if err := protojson.Unmarshal(r, &value); err != nil { + return nil, err + } + values = append(values, &value) + } + return values, nil +} + +func attributesSelect() sq.SelectBuilder { + return newStatementBuilder().Select( + tableField(AttributeTable, "id"), + tableField(AttributeTable, "name"), + tableField(AttributeTable, "rule"), + tableField(AttributeTable, "metadata"), + tableField(AttributeTable, "namespace_id"), + tableField(NamespacesTable, "name"), + "JSON_AGG("+ + "JSON_BUILD_OBJECT("+ + "'id', "+tableField(AttributeValueTable, "id")+", "+ + "'value', "+tableField(AttributeValueTable, "value")+","+ + "'members', "+tableField(AttributeValueTable, "members")+","+ + "'grants', ("+ + "SELECT JSON_AGG("+ + "JSON_BUILD_OBJECT("+ + "'id', kas.id, "+ + "'uri', kas.uri, "+ + "'public_key', kas.public_key"+ + ")"+ + ") "+ + "FROM "+KeyAccessServerTable+" kas "+ + "JOIN "+Tables.AttributeValueKeyAccessGrants.Name()+" avkag ON avkag.key_access_server_id = kas.id "+ + "WHERE avkag.attribute_value_id = "+AttributeValueTable+".id"+ + ")"+ + ")) AS values", + "JSON_AGG("+ + "JSON_BUILD_OBJECT("+ + "'id', "+tableField(KeyAccessServerTable, "id")+", "+ + "'uri', "+tableField(KeyAccessServerTable, "uri")+", "+ + "'public_key', "+tableField(KeyAccessServerTable, "public_key")+ + ")"+ + ") AS grants", + ). + LeftJoin(AttributeValueTable+" ON "+AttributeValueTable+".attribute_definition_id = "+AttributeTable+".id"). + LeftJoin(NamespacesTable+" ON "+NamespacesTable+".id = "+AttributeTable+".namespace_id"). + LeftJoin(Tables.AttributeKeyAccessGrants.Name()+" ON "+Tables.AttributeKeyAccessGrants.WithoutSchema().Name()+".attribute_definition_id = "+AttributeTable+".id"). + LeftJoin(KeyAccessServerTable+" ON "+KeyAccessServerTable+".id = "+Tables.AttributeKeyAccessGrants.WithoutSchema().Name()+".key_access_server_id"). + GroupBy(tableField(AttributeTable, "id"), tableField(NamespacesTable, "name")) + +} + +func attributesHydrateItem(row pgx.Row) (*attributes.Attribute, error) { + var ( + id string + name string + rule string + metadataJson []byte + namespaceId string + namespaceName string + valuesJson []byte + grants []byte + ) + err := row.Scan(&id, &name, &rule, &metadataJson, &namespaceId, &namespaceName, &valuesJson, &grants) + if err != nil { + if err == pgx.ErrNoRows { + return nil, err + } + return nil, err + } + + m := &common.Metadata{} + if metadataJson != nil { + if err := protojson.Unmarshal(metadataJson, m); err != nil { + return nil, err + } + } + + var v []*attributes.Value + if valuesJson != nil { + v, err = attributesValuesProtojson(valuesJson) + if err != nil { + return nil, err + } + } + var k []*kasregistry.KeyAccessServer + if grants != nil { + k, err = keyAccessServerProtojson(grants) + if err != nil { + return nil, err + } + } + + attr := &attributes.Attribute{ + Id: id, + Name: name, + Rule: attributesRuleTypeEnumTransformOut(rule), + Metadata: m, + Values: v, + Namespace: &namespaces.Namespace{Id: namespaceId, Name: namespaceName}, + Grants: k, + } + + return attr, nil +} + +func attributesHydrateList(rows pgx.Rows) ([]*attributes.Attribute, error) { + list := make([]*attributes.Attribute, 0) + for rows.Next() { + slog.Info("next") + var ( + id string + name string + rule string + metadataJson []byte + namespaceId string + namespaceName string + valuesJson []byte + grants []byte + ) + err := rows.Scan(&id, &name, &rule, &metadataJson, &namespaceId, &namespaceName, &valuesJson, &grants) + if err != nil { + return nil, err + } + + attribute := &attributes.Attribute{ + Id: id, + Name: name, + Rule: attributesRuleTypeEnumTransformOut(rule), + Namespace: &namespaces.Namespace{ + Id: namespaceId, + Name: namespaceName, + }, + } + + if metadataJson != nil { + m := &common.Metadata{} + if err := protojson.Unmarshal(metadataJson, m); err != nil { + return nil, err + } + attribute.Metadata = m + } + + if valuesJson != nil { + v, err := attributesValuesProtojson(valuesJson) + if err != nil { + return nil, err + } + attribute.Values = v + } + + if grants != nil { + k, err := keyAccessServerProtojson(grants) + if err != nil { + return nil, err + } + attribute.Grants = k + } + + list = append(list, attribute) + } + return list, nil +} + +/// +// CRUD operations +/// + +func listAllAttributesSql() (string, []interface{}, error) { + return attributesSelect(). + From(AttributeTable). + ToSql() +} + +func (c Client) ListAllAttributes(ctx context.Context) ([]*attributes.Attribute, error) { + sql, args, err := listAllAttributesSql() + rows, err := c.query(ctx, sql, args, err) + if err != nil { + return nil, err + } + defer rows.Close() + + list, err := attributesHydrateList(rows) + if err != nil { + slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrGettingResource) + } + slog.Info("list", slog.Any("list", list)) + + return list, nil +} + +func getAttributeSql(id string) (string, []interface{}, error) { + return attributesSelect(). + Where(sq.Eq{tableField(AttributeTable, "id"): id}). + From(AttributeTable). + ToSql() +} + +func (c Client) GetAttribute(ctx context.Context, id string) (*attributes.Attribute, error) { + sql, args, err := getAttributeSql(id) + row, err := c.queryRow(ctx, sql, args, err) + if err != nil { + slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrGettingResource) + } + + attribute, err := attributesHydrateItem(row) + if err != nil { + slog.Error("could not hydrate item", slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrGettingResource) + } + + return attribute, nil +} + +func getAttributesByNamespaceSql(namespaceId string) (string, []interface{}, error) { + return attributesSelect(). + Where(sq.Eq{tableField(AttributeTable, "namespace_id"): namespaceId}). + From(AttributeTable). + ToSql() +} + +func (c Client) GetAttributesByNamespace(ctx context.Context, namespaceId string) ([]*attributes.Attribute, error) { + sql, args, err := getAttributesByNamespaceSql(namespaceId) + + rows, err := c.query(ctx, sql, args, err) + if err != nil { + return nil, status.Error(codes.Internal, services.ErrListingResource) + } + defer rows.Close() + + list, err := attributesHydrateList(rows) + if err != nil { + slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrGettingResource) + } + + return list, nil +} + +func createAttributeSql(namespaceId string, name string, rule string, metadata []byte) (string, []interface{}, error) { + return newStatementBuilder(). + Insert(AttributeTable). + Columns("namespace_id", "name", "rule", "metadata"). + Values(namespaceId, name, rule, metadata). + Suffix("RETURNING \"id\""). + ToSql() +} + +func (c Client) CreateAttribute(ctx context.Context, attr *attributes.AttributeCreateUpdate) (*attributes.Attribute, error) { + metadataJson, metadata, err := marshalCreateMetadata(attr.Metadata) + if err != nil { + return nil, status.Error(codes.Internal, services.ErrCreatingResource) + } + + sql, args, err := createAttributeSql(attr.NamespaceId, attr.Name, attributesRuleTypeEnumTransformIn(attr.Rule.String()), metadataJson) + // TODO: abstract error checking to be DRY + // TODO: check for constraint violation + // - duplicate name + // - namespace id exists + var id string + if r, err := c.queryRow(ctx, sql, args, err); err != nil { + return nil, status.Error(codes.Internal, services.ErrCreatingResource) + } else if err := r.Scan(&id); err != nil { + return nil, status.Error(codes.Internal, services.ErrCreatingResource) + } + + a := &attributes.Attribute{ + Id: id, + Name: attr.Name, + Rule: attr.Rule, + Metadata: metadata, + Namespace: &namespaces.Namespace{ + Id: attr.NamespaceId, + }, + } + return a, nil +} + +func updateAttributeSql(id string, name string, rule string, metadata []byte) (string, []interface{}, error) { + sb := newStatementBuilder(). + Update(AttributeTable) + + if name != "" { + sb = sb.Set("name", name) + } + if rule != "" { + sb = sb.Set("rule", rule) + } + + return sb.Set("metadata", metadata). + Where(sq.Eq{tableField(AttributeTable, "id"): id}). + ToSql() +} + +func (c Client) UpdateAttribute(ctx context.Context, id string, attr *attributes.AttributeCreateUpdate) (*attributes.Attribute, error) { + // get attribute before updating + a, err := c.GetAttribute(ctx, id) + if err != nil { + slog.Error(services.ErrUpdatingResource, slog.String("scope", "getAttribute"), slog.String("error", err.Error())) + return nil, status.Error(status.Code(err), services.ErrUpdatingResource) + } + if a.Namespace.Id != attr.NamespaceId { + slog.Error(services.ErrUpdatingResource, + slog.String("scope", "namespaceId"), + slog.String("error", errors.Join(ErrRestrictViolation, fmt.Errorf("cannot change namespaceId")).Error()), + ) + return nil, status.Error(codes.InvalidArgument, services.ErrUpdatingResource) + } + + metadataJson, _, err := marshalUpdateMetadata(a.Metadata, attr.Metadata) + if err != nil { + return nil, status.Error(codes.Internal, services.ErrUpdatingResource) + } + + sql, args, err := updateAttributeSql(id, attr.Name, attributesRuleTypeEnumTransformIn(attr.Rule.String()), metadataJson) + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, status.Error(codes.Internal, services.ErrUpdatingResource) + } + + // TODO: see if returning the old is the behavior we should consistently implement throughout services + // return the attribute before updating + return a, nil +} + +func deleteAttributeSql(id string) (string, []interface{}, error) { + return newStatementBuilder(). + Delete(AttributeTable). + Where(sq.Eq{tableField(AttributeTable, "id"): id}). + ToSql() +} + +func (c Client) DeleteAttribute(ctx context.Context, id string) (*attributes.Attribute, error) { + // get attribute before deleting + a, err := c.GetAttribute(ctx, id) + if err != nil { + return nil, status.Error(status.Code(err), services.ErrDeletingResource) + } + + sql, args, err := deleteAttributeSql(id) + + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, status.Error(codes.Internal, services.ErrDeletingResource) + } + + // return the attribute before deleting + return a, nil +} + +func assignKeyAccessServerToAttributeSql(attributeID, keyAccessServerID string) (string, []interface{}, error) { + t := Tables.AttributeKeyAccessGrants + return newStatementBuilder(). + Insert(t.Name()). + Columns("attribute_definition_id", "key_access_server_id"). + Values(attributeID, keyAccessServerID). + ToSql() +} + +func (c Client) AssignKeyAccessServerToAttribute(ctx context.Context, k *attributes.AttributeKeyAccessServer) (*attributes.AttributeKeyAccessServer, error) { + sql, args, err := assignKeyAccessServerToAttributeSql(k.AttributeId, k.KeyAccessServerId) + + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return k, nil +} + +func removeKeyAccessServerFromAttributeSql(attributeID, keyAccessServerID string) (string, []interface{}, error) { + t := Tables.AttributeKeyAccessGrants + return newStatementBuilder(). + Delete(t.Name()). + Where(sq.Eq{"attribute_definition_id": attributeID, "key_access_server_id": keyAccessServerID}). + Suffix("IS TRUE RETURNING *"). + ToSql() +} + +func (c Client) RemoveKeyAccessServerFromAttribute(ctx context.Context, k *attributes.AttributeKeyAccessServer) (*attributes.AttributeKeyAccessServer, error) { + sql, args, err := removeKeyAccessServerFromAttributeSql(k.AttributeId, k.KeyAccessServerId) + if err != nil { + return nil, err + } + + if _, err := c.queryCount(ctx, sql, args); err != nil { + return nil, err + } + + return k, nil +} diff --git a/internal/db/db.go b/internal/db/db.go index 5f35bdaac2..c09667c27b 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -2,8 +2,6 @@ package db import ( "context" - "encoding/json" - "errors" "fmt" "log/slog" "net" @@ -12,12 +10,61 @@ import ( "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgconn" "github.com/jackc/pgx/v5/pgxpool" - "github.com/jackc/pgx/v5/stdlib" - "github.com/opentdf/opentdf-v2-poc/migrations" - "github.com/opentdf/opentdf-v2-poc/sdk/common" - "github.com/pressly/goose/v3" ) +var ( + TableAttributes = "attribute_definitions" + TableAttributeValues = "attribute_values" + TableNamespaces = "attribute_namespaces" + TableKeyAccessServerRegistry = "key_access_servers" + TableAttributeKeyAccessGrants = "attribute_definition_key_access_grants" + TableAttributeValueKeyAccessGrants = "attribute_value_key_access_grants" + TableResourceMappings = "resource_mappings" + TableSubjectMappings = "subject_mappings" +) + +var Tables struct { + Attributes Table + AttributeValues Table + Namespaces Table + KeyAccessServerRegistry Table + AttributeKeyAccessGrants Table + AttributeValueKeyAccessGrants Table + ResourceMappings Table + SubjectMappings Table +} + +type Table struct { + name string + schema string + withSchema bool +} + +func NewTable(name string, schema string) Table { + return Table{ + name: name, + schema: schema, + withSchema: true, + } +} + +func (t Table) WithoutSchema() Table { + nT := NewTable(t.name, t.schema) + nT.withSchema = false + return nT +} + +func (t Table) Name() string { + if t.withSchema { + return t.schema + "." + string(t.name) + } + return string(t.name) +} + +func (t Table) Field(field string) string { + return t.Name() + "." + field +} + // We can rename this but wanted to get mocks working. type PgxIface interface { Acquire(ctx context.Context) (*pgxpool.Conn, error) @@ -37,11 +84,22 @@ type Config struct { Password string `yaml:"password" default:"changeme"` RunMigrations bool `yaml:"runMigrations" default:"true"` SSLMode string `yaml:"sslmode" default:"prefer"` + Schema string `yaml:"schema" default:"opentdf"` } type Client struct { PgxIface config Config + Tables struct { + Attributes Table + AttributeValues Table + Namespaces Table + KeyAccessServerRegistry Table + AttributeKeyAccessGrants Table + AttributeValueKeyAccessGrants Table + ResourceMappings Table + SubjectMappings Table + } } func NewClient(config Config) (*Client, error) { @@ -49,6 +107,16 @@ func NewClient(config Config) (*Client, error) { if err != nil { return nil, fmt.Errorf("failed to create pgxpool: %w", err) } + + Tables.Attributes = NewTable(TableAttributes, config.Schema) + Tables.AttributeValues = NewTable(TableAttributeValues, config.Schema) + Tables.Namespaces = NewTable(TableNamespaces, config.Schema) + Tables.KeyAccessServerRegistry = NewTable(TableKeyAccessServerRegistry, config.Schema) + Tables.AttributeKeyAccessGrants = NewTable(TableAttributeKeyAccessGrants, config.Schema) + Tables.AttributeValueKeyAccessGrants = NewTable(TableAttributeValueKeyAccessGrants, config.Schema) + Tables.ResourceMappings = NewTable(TableResourceMappings, config.Schema) + Tables.SubjectMappings = NewTable(TableSubjectMappings, config.Schema) + return &Client{ PgxIface: pool, config: config, @@ -65,208 +133,69 @@ func (c Config) buildURL() string { ) } -func (c *Client) RunMigrations() (int, error) { - var ( - applied int - ) - - if !c.config.RunMigrations { - slog.Info("skipping migrations", - slog.String("reason", "runMigrations is false"), - slog.Bool("runMigrations", c.config.RunMigrations)) - return applied, nil - } - - pool, ok := c.PgxIface.(*pgxpool.Pool) - if !ok || pool == nil { - return applied, fmt.Errorf("failed to cast pgxpool.Pool") - } - - conn := stdlib.OpenDBFromPool(pool) - defer conn.Close() - - provider, err := goose.NewProvider(goose.DialectPostgres, conn, migrations.MigrationsFS) - if err != nil { - return applied, errors.Join(fmt.Errorf("failed to create goose provider"), err) - } - - res, err := provider.Up(context.Background()) +// Common function for all queryRow calls +func (c Client) queryRow(ctx context.Context, sql string, args []interface{}, err error) (pgx.Row, error) { + slog.Debug("sql", slog.String("sql", sql), slog.Any("args", args)) if err != nil { - return applied, errors.Join(fmt.Errorf("failed to run migrations"), err) - } - - for _, r := range res { - if r.Error != nil { - return applied, errors.Join(fmt.Errorf("failed to run migrations"), err) - } - if !r.Empty { - applied++ - } + return nil, err } - - return applied, nil + return c.QueryRow(ctx, sql, args...), nil } -func (c Client) CreateResource(ctx context.Context, - descriptor *common.ResourceDescriptor, resource []byte) error { - sql, args, err := createResourceSQL(descriptor, resource) +// Common function for all query calls +func (c Client) query(ctx context.Context, sql string, args []interface{}, err error) (pgx.Rows, error) { + slog.Debug("sql", slog.String("sql", sql), slog.Any("args", args)) if err != nil { - return fmt.Errorf("failed to create resource sql: %w", err) + return nil, err } - - slog.Debug("sql", slog.String("sql", sql), slog.Any("args", args)) - - _, err = c.Exec(ctx, sql, args...) - - return err + r, e := c.Query(ctx, sql, args...) + return r, WrapIfKnownInvalidQueryErr(e) } -func createResourceSQL(descriptor *common.ResourceDescriptor, - resource []byte) (string, []interface{}, error) { - psql := sq.StatementBuilder.PlaceholderFormat(sq.Dollar) - - builder := psql.Insert("opentdf.resources") - - builder = builder.Columns("name", "namespace", "version", "fqn", "labels", "description", "policytype", "resource") - - builder = builder.Values( - descriptor.Name, - descriptor.Namespace, - descriptor.Version, - descriptor.Fqn, - descriptor.Labels, - descriptor.Description, - descriptor.Type.String(), - resource, - ) - - //nolint:wrapcheck // Wrapped error in CreateResource - return builder.ToSql() -} - -func (c Client) ListResources(ctx context.Context, - policyType string, selectors *common.ResourceSelector) (pgx.Rows, error) { - sql, args, err := listResourceSQL(policyType, selectors) +func (c Client) queryCount(ctx context.Context, sql string, args []interface{}) (int, error) { + rows, err := c.query(ctx, sql, args, nil) if err != nil { - return nil, fmt.Errorf("failed to create list resource sql: %w", err) + return 0, err } + defer rows.Close() - slog.Debug("sql", slog.String("sql", sql), slog.Any("args", args)) - - //nolint:rowserrcheck // Rows error check should not flag this https://github.com/jingyugao/rowserrcheck/issues/32 - return c.Query(ctx, sql, args...) -} - -func listResourceSQL(policyType string, selectors *common.ResourceSelector) (string, []interface{}, error) { - psql := sq.StatementBuilder.PlaceholderFormat(sq.Dollar) - - builder := psql.Select("id", "resource").From("opentdf.resources") - - builder = builder.Where(sq.Eq{"policytype": policyType}) - - if selectors != nil { - // Set the namespace if it is not empty - if selectors.Namespace != "" { - builder = builder.Where(sq.Eq{"namespace": selectors.Namespace}) - } - - switch selector := selectors.Selector.(type) { - case *common.ResourceSelector_Name: - builder = builder.Where(sq.Eq{"name": selector.Name}) - case *common.ResourceSelector_LabelSelector_: - bLabels, err := json.Marshal(selector.LabelSelector.Labels) - if err != nil { - return "", nil, fmt.Errorf("failed to marshal labels: %w", err) - } - builder = builder.Where(sq.Expr("labels @> ?::jsonb", bLabels)) - } - // Set the version if it is not empty - if selectors.Version != 0 { - builder = builder.Where(sq.Eq{"version": selectors.Version}) + count := 0 + for rows.Next() { + if _, err := rows.Values(); err != nil { + return 0, err } + count++ } - - //nolint:wrapcheck // Wrapped error in ListResources - return builder.ToSql() -} - -func (c Client) GetResource(ctx context.Context, id int32, policyType string) (pgx.Row, error) { - sql, args, err := getResourceSQL(id, policyType) - if err != nil { - return nil, fmt.Errorf("failed to create get resource sql: %w", err) + if count == 0 { + return 0, pgx.ErrNoRows } - slog.Debug("sql", slog.String("sql", sql), slog.Any("args", args)) - - return c.QueryRow(ctx, sql, args...), nil -} - -func getResourceSQL(id int32, policyType string) (string, []interface{}, error) { - psql := sq.StatementBuilder.PlaceholderFormat(sq.Dollar) - - builder := psql.Select("id", "resource").From("opentdf.resources") - - builder = builder.Where(sq.Eq{"id": id, "policytype": policyType}) - - //nolint:wrapcheck // Wrapped error in GetResource - return builder.ToSql() + return count, nil } -func (c Client) UpdateResource(ctx context.Context, descriptor *common.ResourceDescriptor, - resource []byte, policyType string) error { - sql, args, err := updateResourceSQL(descriptor, resource, policyType) +// Common function for all exec calls +func (c Client) exec(ctx context.Context, sql string, args []interface{}, err error) error { + slog.Debug("sql", slog.String("sql", sql), slog.Any("args", args)) if err != nil { - return fmt.Errorf("failed to create update resource sql: %w", err) + return err } - - slog.Debug("sql", slog.String("sql", sql), slog.Any("args", args)) - _, err = c.Exec(ctx, sql, args...) - - return err + return WrapIfKnownInvalidQueryErr(err) } -func updateResourceSQL(descriptor *common.ResourceDescriptor, - resource []byte, policyType string) (string, []interface{}, error) { - psql := sq.StatementBuilder.PlaceholderFormat(sq.Dollar) - - builder := psql.Update("opentdf.resources") - - builder = builder.Set("name", descriptor.Name) - builder = builder.Set("namespace", descriptor.Namespace) - builder = builder.Set("version", descriptor.Version) - builder = builder.Set("description", descriptor.Description) - builder = builder.Set("fqn", descriptor.Fqn) - builder = builder.Set("labels", descriptor.Labels) - builder = builder.Set("policyType", policyType) - builder = builder.Set("resource", resource) +// +// Helper functions for building SQL +// - builder = builder.Where(sq.Eq{"id": descriptor.Id}) - - //nolint:wrapcheck // Wrapped error in UpdateResource - return builder.ToSql() +// Postgres uses $1, $2, etc. for placeholders +func newStatementBuilder() sq.StatementBuilderType { + return sq.StatementBuilder.PlaceholderFormat(sq.Dollar) } -func (c Client) DeleteResource(ctx context.Context, id int32, policyType string) error { - sql, args, err := deleteResourceSQL(id, policyType) - if err != nil { - return fmt.Errorf("failed to create delete resource sql: %w", err) - } - - slog.Debug("sql", slog.String("sql", sql), slog.Any("args", args)) - - _, err = c.Exec(ctx, sql, args...) - - return err +func tableName(table string) string { + return table } -func deleteResourceSQL(id int32, policyType string) (string, []interface{}, error) { - psql := sq.StatementBuilder.PlaceholderFormat(sq.Dollar) - - builder := psql.Delete("opentdf.resources") - - builder = builder.Where(sq.Eq{"id": id, "policytype": policyType}) - - //nolint:wrapcheck // Wrapped error in DeleteResource - return builder.ToSql() +func tableField(table string, field string) string { + return table + "." + field } diff --git a/internal/db/db_migration.go b/internal/db/db_migration.go new file mode 100644 index 0000000000..19c8003c77 --- /dev/null +++ b/internal/db/db_migration.go @@ -0,0 +1,101 @@ +package db + +import ( + "context" + "errors" + "fmt" + "log/slog" + + "github.com/jackc/pgx/v5/pgxpool" + "github.com/jackc/pgx/v5/stdlib" + "github.com/opentdf/opentdf-v2-poc/migrations" + "github.com/pressly/goose/v3" +) + +func (c *Client) RunMigrations() (int, error) { + var ( + applied int + ) + + // create the schema + c.Exec(context.Background(), fmt.Sprintf("CREATE SCHEMA IF NOT EXISTS %s", c.config.Schema)) + // set the search path + c.Exec(context.Background(), fmt.Sprintf("SET search_path TO %s", c.config.Schema)) + + if !c.config.RunMigrations { + slog.Info("skipping migrations", + slog.String("reason", "runMigrations is false"), + slog.Bool("runMigrations", c.config.RunMigrations)) + return applied, nil + } + + // create the schema + c.Exec(context.Background(), fmt.Sprintf("CREATE SCHEMA IF NOT EXISTS %s", c.config.Schema)) + // set the search path + c.Exec(context.Background(), fmt.Sprintf("SET search_path TO %s", c.config.Schema)) + + pool, ok := c.PgxIface.(*pgxpool.Pool) + if !ok || pool == nil { + return applied, fmt.Errorf("failed to cast pgxpool.Pool") + } + + conn := stdlib.OpenDBFromPool(pool) + defer conn.Close() + + provider, err := goose.NewProvider(goose.DialectPostgres, conn, migrations.MigrationsFS) + if err != nil { + return applied, errors.Join(fmt.Errorf("failed to create goose provider"), err) + } + + res, err := provider.Up(context.Background()) + if err != nil { + return applied, errors.Join(fmt.Errorf("failed to run migrations"), err) + } + + for _, r := range res { + if r.Error != nil { + return applied, errors.Join(fmt.Errorf("failed to run migrations"), err) + } + if !r.Empty { + applied++ + } + } + + return applied, nil +} + +func (c *Client) MigrationDown() (int, error) { + var ( + applied int + ) + + if !c.config.RunMigrations { + slog.Info("skipping migrations", + slog.String("reason", "runMigrations is false"), + slog.Bool("runMigrations", c.config.RunMigrations)) + return applied, nil + } + + pool, ok := c.PgxIface.(*pgxpool.Pool) + if !ok || pool == nil { + return applied, fmt.Errorf("failed to cast pgxpool.Pool") + } + + conn := stdlib.OpenDBFromPool(pool) + defer conn.Close() + + provider, err := goose.NewProvider(goose.DialectPostgres, conn, migrations.MigrationsFS) + if err != nil { + return applied, errors.Join(fmt.Errorf("failed to create goose provider"), err) + } + + res, err := provider.Down(context.Background()) + if err != nil { + return applied, errors.Join(fmt.Errorf("failed to run migrations"), err) + } + if res.Error != nil { + return applied, errors.Join(fmt.Errorf("failed to run migrations"), err) + } + + return applied, nil +} diff --git a/internal/db/db_test.go b/internal/db/db_test.go index 19d3f29d33..7c66c3e7ea 100644 --- a/internal/db/db_test.go +++ b/internal/db/db_test.go @@ -1,195 +1,88 @@ package db -import ( - "context" - "encoding/json" - "testing" - - "github.com/jackc/pgx/v5" - "github.com/jackc/pgx/v5/pgconn" - "github.com/jackc/pgx/v5/pgxpool" - "github.com/opentdf/opentdf-v2-poc/sdk/acre" - "github.com/opentdf/opentdf-v2-poc/sdk/common" - "github.com/stretchr/testify/assert" - "google.golang.org/protobuf/encoding/protojson" -) - -var ( - //nolint:gochecknoglobals // Test data and should be reintialized for each test - resourceDescriptor = &common.ResourceDescriptor{ - Name: "relto", - Namespace: "opentdf", - Version: 1, - Fqn: "http://opentdf.com/attr/relto", - Labels: map[string]string{"origin": "Country of Origin"}, - Description: "The relto attribute is used to describe the relationship of the resource to the country of origin.", - Type: common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM, - } - - //nolint:gochecknoglobals // Test data and should be reintialized for each test - testResource = &acre.Synonyms{ - Terms: []string{"relto", "rel-to", "rel_to"}, - } -) - -func Test_RunMigrations_Returns_Expected_Applied(t *testing.T) { - client := &Client{ - PgxIface: nil, - config: Config{ - RunMigrations: false, - }, - } - - applied, err := client.RunMigrations() - - assert.Nil(t, err) - assert.Equal(t, 0, applied) -} - -func Test_RunMigrations_Returns_Error_When_PGX_Iface_Is_Nil(t *testing.T) { - client := &Client{ - PgxIface: nil, - config: Config{ - RunMigrations: true, - }, - } - - applied, err := client.RunMigrations() - - assert.ErrorContains(t, err, "failed to cast pgxpool.Pool") - assert.Equal(t, 0, applied) -} - -type BadPGX struct{} - -func (b BadPGX) Acquire(_ context.Context) (*pgxpool.Conn, error) { return &pgxpool.Conn{}, nil } -func (b BadPGX) Exec(context.Context, string, ...any) (pgconn.CommandTag, error) { - return pgconn.CommandTag{}, nil -} -func (b BadPGX) QueryRow(context.Context, string, ...any) pgx.Row { return nil } -func (b BadPGX) Query(context.Context, string, ...any) (pgx.Rows, error) { return nil, nil } -func (b BadPGX) Ping(context.Context) error { return nil } -func (b BadPGX) Close() {} -func (b BadPGX) Config() *pgxpool.Config { return nil } - -func Test_RunMigrations_Returns_Error_When_PGX_Iface_Is_Wrong_Type(t *testing.T) { - client := &Client{ - PgxIface: &BadPGX{}, - config: Config{ - RunMigrations: true, - }, - } - - applied, err := client.RunMigrations() - - assert.ErrorContains(t, err, "failed to cast pgxpool.Pool") - assert.Equal(t, 0, applied) -} - -func Test_CreateResourceSQL_Returns_Expected_SQL_Statement(t *testing.T) { - // Copy the test data so we don't modify it - descriptor := resourceDescriptor - resource, err := protojson.Marshal(testResource) - - assert.Nil(t, err) - - sql, args, err := createResourceSQL(descriptor, resource) - - assert.Nil(t, err) - assert.Equal(t, "INSERT INTO opentdf.resources (name,namespace,version,fqn,labels,description,policytype,resource) VALUES ($1,$2,$3,$4,$5,$6,$7,$8)", sql) - assert.Equal(t, []interface{}{descriptor.Name, descriptor.Namespace, descriptor.Version, descriptor.Fqn, descriptor.Labels, descriptor.Description, descriptor.Type.String(), resource}, args) -} - -func Test_ListResourceSQL_Returns_Expected_SQL_Statement(t *testing.T) { - selector := &common.ResourceSelector{ - Namespace: "opentdf", - Version: 1, - } - sql, args, err := listResourceSQL(common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), selector) - - assert.Nil(t, err) - assert.Equal(t, "SELECT id, resource FROM opentdf.resources WHERE policytype = $1 AND namespace = $2 AND version = $3", sql) - assert.Equal(t, []interface{}{common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), selector.Namespace, int32(1)}, args) -} - -func Test_ListResourceSQL_Returns_Expected_SQL_Statement_With_Selector_Labels(t *testing.T) { - selector := &common.ResourceSelector{ - Namespace: "opentdf", - Selector: &common.ResourceSelector_LabelSelector_{ - LabelSelector: &common.ResourceSelector_LabelSelector{ - Labels: map[string]string{"origin": "Country of Origin"}, - }, - }, - } - - bLabels, err := json.Marshal(selector.Selector.(*common.ResourceSelector_LabelSelector_).LabelSelector.Labels) - if err != nil { - t.Errorf("marshal error was not expected: %s", err.Error()) - } - - sql, args, err := listResourceSQL(common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), selector) - - assert.Nil(t, err) - assert.Equal(t, "SELECT id, resource FROM opentdf.resources WHERE policytype = $1 AND namespace = $2 AND labels @> $3::jsonb", sql) - assert.Equal(t, []interface{}{common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), selector.Namespace, bLabels}, args) -} - -func Test_ListResourceSQL_Returns_Expected_SQL_Statement_With_Selector_Name(t *testing.T) { - selector := &common.ResourceSelector{ - Namespace: "opentdf", - Selector: &common.ResourceSelector_Name{ - Name: "relto", - }, - } - sql, args, err := listResourceSQL(common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), selector) - - assert.Nil(t, err) - assert.Equal(t, "SELECT id, resource FROM opentdf.resources WHERE policytype = $1 AND namespace = $2 AND name = $3", sql) - assert.Equal(t, []interface{}{common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), selector.Namespace, selector.Selector.(*common.ResourceSelector_Name).Name}, args) -} - -func Test_GetResourceSQL_Returns_Expected_SQL_Statement(t *testing.T) { - sql, args, err := getResourceSQL(1, common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String()) - - assert.Nil(t, err) - assert.Equal(t, "SELECT id, resource FROM opentdf.resources WHERE id = $1 AND policytype = $2", sql) - assert.Equal(t, []interface{}{int32(1), common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String()}, args) -} - -func Test_UpdateResourceSQL_Returns_Expected_SQL_Statement(t *testing.T) { - // Copy the test data so we don't modify it - descriptor := resourceDescriptor - resource, err := protojson.Marshal(testResource) - - assert.Nil(t, err) - - sql, args, err := updateResourceSQL(descriptor, resource, common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM.String()) - - assert.Nil(t, err) - assert.Equal(t, "UPDATE opentdf.resources SET name = $1, namespace = $2, version = $3, description = $4, fqn = $5, labels = $6, policyType = $7, resource = $8 WHERE id = $9", sql) - assert.Equal(t, []interface{}{descriptor.Name, descriptor.Namespace, descriptor.Version, descriptor.Description, descriptor.Fqn, - descriptor.Labels, common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM.String(), resource, descriptor.Id}, args) -} - -func Test_DeleteResourceSQL_Returns_Expected_SQL_Statement(t *testing.T) { - sql, args, err := deleteResourceSQL(1, common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String()) - - assert.Nil(t, err) - assert.Equal(t, "DELETE FROM opentdf.resources WHERE id = $1 AND policytype = $2", sql) - assert.Equal(t, []interface{}{int32(1), common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String()}, args) -} - -func Test_BuildURL_Returns_Expected_Connection_String(t *testing.T) { - c := Config{ - Host: "localhost", - Port: 5432, - Database: "opentdf", - User: "postgres", - Password: "postgres", - SSLMode: "require", - } - - url := c.buildURL() - - assert.Equal(t, "postgres://postgres:postgres@localhost:5432/opentdf?sslmode=require", url) -} +// var ( +// //nolint:gochecknoglobals // Test data and should be reintialized for each test +// resourceDescriptor = &common.ResourceDescriptor{ +// Name: "relto", +// Namespace: "opentdf", +// Version: 1, +// Fqn: "http://opentdf.com/attr/relto", +// Labels: map[string]string{"origin": "Country of Origin"}, +// Description: "The relto attribute is used to describe the relationship of the resource to the country of origin.", +// Type: common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM, +// } + +// //nolint:gochecknoglobals // Test data and should be reintialized for each test +// testResource = &acre.Synonyms{ +// Terms: []string{"relto", "rel-to", "rel_to"}, +// } +// ) + +// func Test_RunMigrations_Returns_Expected_Applied(t *testing.T) { +// client := &Client{ +// PgxIface: nil, +// config: Config{ +// RunMigrations: false, +// }, +// } + +// applied, err := client.RunMigrations() + +// assert.Nil(t, err) +// assert.Equal(t, 0, applied) +// } + +// func Test_RunMigrations_Returns_Error_When_PGX_Iface_Is_Nil(t *testing.T) { +// client := &Client{ +// PgxIface: nil, +// config: Config{ +// RunMigrations: true, +// }, +// } + +// applied, err := client.RunMigrations() + +// assert.ErrorContains(t, err, "failed to cast pgxpool.Pool") +// assert.Equal(t, 0, applied) +// } + +// type BadPGX struct{} + +// func (b BadPGX) Acquire(_ context.Context) (*pgxpool.Conn, error) { return &pgxpool.Conn{}, nil } +// func (b BadPGX) Exec(context.Context, string, ...any) (pgconn.CommandTag, error) { +// return pgconn.CommandTag{}, nil +// } +// func (b BadPGX) QueryRow(context.Context, string, ...any) pgx.Row { return nil } +// func (b BadPGX) Query(context.Context, string, ...any) (pgx.Rows, error) { return nil, nil } +// func (b BadPGX) Ping(context.Context) error { return nil } +// func (b BadPGX) Close() {} +// func (b BadPGX) Config() *pgxpool.Config { return nil } + +// func Test_RunMigrations_Returns_Error_When_PGX_Iface_Is_Wrong_Type(t *testing.T) { +// client := &Client{ +// PgxIface: &BadPGX{}, +// config: Config{ +// RunMigrations: true, +// }, +// } + +// applied, err := client.RunMigrations() + +// assert.ErrorContains(t, err, "failed to cast pgxpool.Pool") +// assert.Equal(t, 0, applied) +// } + +// func Test_BuildURL_Returns_Expected_Connection_String(t *testing.T) { +// c := Config{ +// Host: "localhost", +// Port: 5432, +// Database: "opentdf", +// User: "postgres", +// Password: "postgres", +// SSLMode: "require", +// } + +// url := c.buildURL() + +// assert.Equal(t, "postgres://postgres:postgres@localhost:5432/opentdf?sslmode=require", url) +// } diff --git a/internal/db/errors.go b/internal/db/errors.go new file mode 100644 index 0000000000..0780f472be --- /dev/null +++ b/internal/db/errors.go @@ -0,0 +1,84 @@ +package db + +import ( + "errors" + "fmt" + "log/slog" + "strings" + + "github.com/jackc/pgerrcode" + "github.com/jackc/pgx/v5/pgconn" +) + +type DbError string + +func (e DbError) Error() string { + return string(e) +} + +const ( + ErrUniqueConstraintViolation DbError = "ErrUniqueConstraintViolation: value must be unique" + ErrNotNullViolation DbError = "ErrNotNullViolation: value cannot be null" + ErrForeignKeyViolation DbError = "ErrForeignKeyViolation: value is referenced by another table" + ErrRestrictViolation DbError = "ErrRestrictViolation: value cannot be deleted due to restriction" + ErrNotFound DbError = "ErrNotFound: value not found" +) + +// Validate is a PostgreSQL constraint violation for specific table-column value +func IsConstraintViolationForColumnVal(err error, table string, column string) bool { + if e := WrapIfKnownInvalidQueryErr(err); e != nil { + if errors.Is(e, ErrUniqueConstraintViolation) && strings.Contains(err.Error(), getConstraintName(table, column)) { + return true + } + } + return false +} + +// Get helpful error message for PostgreSQL violation +func WrapIfKnownInvalidQueryErr(err error) error { + if e := isPgError(err); e != nil { + slog.Error("Encountered database error", slog.String("error", e.Error())) + switch e.Code { + case pgerrcode.UniqueViolation: + return errors.Join(ErrUniqueConstraintViolation, e) + case pgerrcode.NotNullViolation: + return errors.Join(ErrNotNullViolation, e) + case pgerrcode.ForeignKeyViolation: + return errors.Join(ErrForeignKeyViolation, e) + case pgerrcode.RestrictViolation: + return errors.Join(ErrRestrictViolation, e) + case pgerrcode.CaseNotFound: + return errors.Join(ErrNotFound, e) + default: + return e + } + } + return err +} + +func isPgError(err error) *pgconn.PgError { + if err == nil { + return nil + } + + var e *pgconn.PgError + if errors.As(err, &e) { + return e + } + // The error is not of type PgError if a SELECT query resulted in no rows + if strings.Contains(err.Error(), "no rows in result set") { + return &pgconn.PgError{ + Code: pgerrcode.CaseNotFound, + Message: "err: no rows in result set", + } + } + return nil +} + +func getConstraintName(table string, column string) string { + return fmt.Sprintf("%s_%s_key", table, column) +} + +func NewUniqueAlreadyExistsError(value string) error { + return errors.Join(fmt.Errorf("value [%s] already exists and must be unique", value), ErrUniqueConstraintViolation) +} diff --git a/internal/db/errors_test.go b/internal/db/errors_test.go new file mode 100644 index 0000000000..ab3f05b210 --- /dev/null +++ b/internal/db/errors_test.go @@ -0,0 +1,44 @@ +package db + +import ( + "errors" + "testing" + + "github.com/jackc/pgerrcode" + "github.com/jackc/pgx/v5/pgconn" + "gotest.tools/v3/assert" +) + +func Test_Get_Constraint_Name(t *testing.T) { + assert.Equal(t, "test_pk_key", getConstraintName("test", "pk")) + assert.Equal(t, "test_fk_key", getConstraintName("test", "fk")) + assert.Equal(t, "table_column_key", getConstraintName("table", "column")) +} + +func Test_Is_Constraint_Violation_For_Column_Val(t *testing.T) { + assert.Equal(t, true, IsConstraintViolationForColumnVal(&pgconn.PgError{Message: "duplicate key value violates unique constraint \"table_column_key\"", Code: pgerrcode.UniqueViolation}, "table", "column")) + assert.Equal(t, true, IsConstraintViolationForColumnVal(&pgconn.PgError{Message: "duplicate key value violates unique constraint \"attributes_namespaces_name_key\"", Code: pgerrcode.UniqueViolation}, "attributes_namespaces", "name")) + assert.Equal(t, false, IsConstraintViolationForColumnVal(&pgconn.PgError{Message: "duplicate key value violates unique constraint \"attributes_namespaces_name_key\"", Code: pgerrcode.UniqueViolation}, "attributes_namespaces", "id")) + assert.Equal(t, false, IsConstraintViolationForColumnVal(&pgconn.PgError{Message: "duplicate key value violates unique constraint \"attributes_namespaces_name_key\"", Code: pgerrcode.CaseNotFound}, "attributes_namespaces", "name")) +} + +func Test_Is_Postgres_Invalid_Query_Error(t *testing.T) { + // Known error types should be wrapped in internal error types + assert.ErrorIs(t, WrapIfKnownInvalidQueryErr(&pgconn.PgError{Code: pgerrcode.NotNullViolation}), ErrNotNullViolation) + assert.ErrorIs(t, WrapIfKnownInvalidQueryErr(&pgconn.PgError{Code: pgerrcode.UniqueViolation}), ErrUniqueConstraintViolation) + assert.ErrorIs(t, WrapIfKnownInvalidQueryErr(&pgconn.PgError{Code: pgerrcode.ForeignKeyViolation}), ErrForeignKeyViolation) + assert.ErrorIs(t, WrapIfKnownInvalidQueryErr(&pgconn.PgError{Code: pgerrcode.RestrictViolation}), ErrRestrictViolation) + assert.ErrorIs(t, WrapIfKnownInvalidQueryErr(&pgconn.PgError{Code: pgerrcode.CaseNotFound}), ErrNotFound) + + // Unknown error types should be passed through + e := &pgconn.PgError{Code: pgerrcode.DataException} + assert.Equal(t, WrapIfKnownInvalidQueryErr(e), e) + err := errors.New("test error") + assert.Equal(t, WrapIfKnownInvalidQueryErr(err), err) +} + +func Test_Is_Pg_Error(t *testing.T) { + pgError := &pgconn.PgError{Code: pgerrcode.UniqueViolation} + assert.ErrorIs(t, isPgError(pgError), pgError) + assert.Assert(t, isPgError(errors.New("test error")) == nil) +} diff --git a/internal/db/key_access_server_registry.go b/internal/db/key_access_server_registry.go new file mode 100644 index 0000000000..6f92f5a728 --- /dev/null +++ b/internal/db/key_access_server_registry.go @@ -0,0 +1,246 @@ +package db + +import ( + "context" + "encoding/json" + + sq "github.com/Masterminds/squirrel" + "github.com/jackc/pgx/v5" + "github.com/opentdf/opentdf-v2-poc/sdk/common" + kasr "github.com/opentdf/opentdf-v2-poc/sdk/kasregistry" + "google.golang.org/protobuf/encoding/protojson" +) + +var KeyAccessServerTable = tableName(TableKeyAccessServerRegistry) + +func keyAccessServerProtojson(keyAccessServerJSON []byte) ([]*kasr.KeyAccessServer, error) { + var ( + keyAccessServers []*kasr.KeyAccessServer + raw []json.RawMessage + ) + if err := json.Unmarshal(keyAccessServerJSON, &raw); err != nil { + return nil, err + } + for _, r := range raw { + kas := kasr.KeyAccessServer{} + if err := protojson.Unmarshal(r, &kas); err != nil { + return nil, err + } + keyAccessServers = append(keyAccessServers, &kas) + } + return keyAccessServers, nil +} + +func keyAccessServerSelect() sq.SelectBuilder { + return newStatementBuilder(). + Select( + "id", + "uri", + "public_key", + "metadata", + ) +} + +func listAllKeyAccessServersSql() (string, []interface{}, error) { + return keyAccessServerSelect(). + From(KeyAccessServerTable). + ToSql() +} + +func (c Client) ListKeyAccessServers(ctx context.Context) ([]*kasr.KeyAccessServer, error) { + sql, args, err := listAllKeyAccessServersSql() + + rows, err := c.query(ctx, sql, args, err) + if err != nil { + return nil, err + } + var keyAccessServers []*kasr.KeyAccessServer + + var ( + id string + uri string + publicKeyJSON []byte + metadataJSON []byte + ) + + _, err = pgx.ForEachRow(rows, []any{&id, &uri, &publicKeyJSON, &metadataJSON}, func() error { + var ( + keyAccessServer = new(kasr.KeyAccessServer) + publicKey = new(kasr.PublicKey) + metadata = new(common.Metadata) + ) + + if err := protojson.Unmarshal(publicKeyJSON, publicKey); err != nil { + return err + } + + if metadataJSON != nil { + if err := protojson.Unmarshal(metadataJSON, metadata); err != nil { + return err + } + } + + keyAccessServer.Id = id + keyAccessServer.Uri = uri + keyAccessServer.PublicKey = publicKey + keyAccessServer.Metadata = metadata + + keyAccessServers = append(keyAccessServers, keyAccessServer) + + return nil + }) + + if err != nil { + return nil, err + } + + return keyAccessServers, nil +} + +func getKeyAccessServerSql(id string) (string, []interface{}, error) { + return keyAccessServerSelect(). + Where(sq.Eq{"id": id}). + From(KeyAccessServerTable). + ToSql() +} + +func (c Client) GetKeyAccessServer(ctx context.Context, id string) (*kasr.KeyAccessServer, error) { + sql, args, err := getKeyAccessServerSql(id) + + row, err := c.queryRow(ctx, sql, args, err) + if err != nil { + return nil, err + } + + var ( + uri string + publicKeyJSON []byte + publicKey = new(kasr.PublicKey) + metadataJSON []byte + metadata = new(common.Metadata) + ) + err = row.Scan(&id, &uri, &publicKeyJSON, &metadataJSON) + if err != nil { + if err == pgx.ErrNoRows { + return nil, err + } + return nil, err + } + + if err := protojson.Unmarshal(publicKeyJSON, publicKey); err != nil { + return nil, err + } + + if metadataJSON != nil { + if err := protojson.Unmarshal(metadataJSON, metadata); err != nil { + return nil, err + } + } + + return &kasr.KeyAccessServer{ + Metadata: metadata, + Id: id, + Uri: uri, + PublicKey: publicKey, + }, nil +} + +func createKeyAccessServerSQL(uri string, publicKey, metadata []byte) (string, []interface{}, error) { + return newStatementBuilder(). + Insert(KeyAccessServerTable). + Columns("uri", "public_key", "metadata"). + Values(uri, publicKey, metadata). + Suffix("RETURNING \"id\""). + ToSql() +} + +func (c Client) CreateKeyAccessServer(ctx context.Context, keyAccessServer *kasr.KeyAccessServerCreateUpdate) (*kasr.KeyAccessServer, error) { + metadataBytes, newMetadata, err := marshalCreateMetadata(keyAccessServer.Metadata) + if err != nil { + return nil, err + } + + pkBytes, err := protojson.Marshal(keyAccessServer.PublicKey) + if err != nil { + return nil, err + } + + sql, args, err := createKeyAccessServerSQL(keyAccessServer.Uri, pkBytes, metadataBytes) + + row, err := c.queryRow(ctx, sql, args, err) + if err != nil { + return nil, err + } + + // Get ID of new resource + var id string + if err = row.Scan(&id); err != nil { + return nil, err + } + + return &kasr.KeyAccessServer{ + Metadata: newMetadata, + Id: id, + Uri: keyAccessServer.Uri, + PublicKey: keyAccessServer.PublicKey, + }, nil +} + +func updateKeyAccessServerSQL(id, keyAccessServer string, publicKey, metadata []byte) (string, []interface{}, error) { + return newStatementBuilder(). + Update(KeyAccessServerTable). + Set("uri", keyAccessServer). + Set("public_key", publicKey). + Set("metadata", metadata). + Where(sq.Eq{"id": id}). + ToSql() +} + +func (c Client) UpdateKeyAccessServer(ctx context.Context, id string, keyAccessServer *kasr.KeyAccessServerCreateUpdate) (*kasr.KeyAccessServer, error) { + k, err := c.GetKeyAccessServer(ctx, id) + if err != nil { + return nil, err + } + + metadataJSON, _, err := marshalUpdateMetadata(k.Metadata, keyAccessServer.Metadata) + if err != nil { + return nil, err + } + + publicKeyJSON, err := protojson.Marshal(keyAccessServer.PublicKey) + if err != nil { + return nil, err + } + + sql, args, err := updateKeyAccessServerSQL(id, keyAccessServer.Uri, publicKeyJSON, metadataJSON) + + if err = c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return k, nil +} + +func deleteKeyAccessServerSQL(id string) (string, []interface{}, error) { + return newStatementBuilder(). + Delete(KeyAccessServerTable). + Where(sq.Eq{"id": id}). + ToSql() +} + +func (c Client) DeleteKeyAccessServer(ctx context.Context, id string) (*kasr.KeyAccessServer, error) { + // get attribute before deleting + k, err := c.GetKeyAccessServer(ctx, id) + if err != nil { + return nil, err + } + + sql, args, err := deleteKeyAccessServerSQL(id) + + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + // return the attribute before deleting + return k, nil +} diff --git a/internal/db/metadata.go b/internal/db/metadata.go new file mode 100644 index 0000000000..10fa1e8eb1 --- /dev/null +++ b/internal/db/metadata.go @@ -0,0 +1,38 @@ +package db + +import ( + "github.com/opentdf/opentdf-v2-poc/sdk/common" + "google.golang.org/protobuf/encoding/protojson" + "google.golang.org/protobuf/types/known/timestamppb" +) + +// Marshal policy metadata is used by the marshalCreateMetadata and marshalUpdateMetadata functions to enable +// the creation and update of policy metadata without exposing it to developers. Take note of the immutableMetadata and +// mutableMetadata parameters. The mutableMetadata is the metadata that is passed in by the developer. The immutableMetadata +// is created by the service. +func marshalMetadata(mutableMetadata *common.MetadataMutable, immutableMetadata *common.Metadata) ([]byte, *common.Metadata, error) { + m := &common.Metadata{ + CreatedAt: immutableMetadata.GetCreatedAt(), + UpdatedAt: immutableMetadata.GetUpdatedAt(), + Labels: mutableMetadata.GetLabels(), + Description: mutableMetadata.GetDescription(), + } + mJson, err := protojson.Marshal(m) + return mJson, m, err +} + +func marshalCreateMetadata(metadata *common.MetadataMutable) ([]byte, *common.Metadata, error) { + m := &common.Metadata{ + CreatedAt: timestamppb.Now(), + UpdatedAt: timestamppb.Now(), + } + return marshalMetadata(metadata, m) +} + +func marshalUpdateMetadata(existingMetadata *common.Metadata, metadata *common.MetadataMutable) ([]byte, *common.Metadata, error) { + m := &common.Metadata{ + CreatedAt: existingMetadata.GetCreatedAt(), + UpdatedAt: timestamppb.Now(), + } + return marshalMetadata(metadata, m) +} diff --git a/internal/db/namespaces.go b/internal/db/namespaces.go new file mode 100644 index 0000000000..7295679770 --- /dev/null +++ b/internal/db/namespaces.go @@ -0,0 +1,171 @@ +package db + +import ( + "context" + "errors" + "log/slog" + + sq "github.com/Masterminds/squirrel" + "github.com/opentdf/opentdf-v2-poc/sdk/namespaces" + "github.com/opentdf/opentdf-v2-poc/services" +) + +func getNamespaceSql(id string) (string, []interface{}, error) { + t := Tables.Namespaces + return newStatementBuilder(). + Select("*"). + From(t.Name()). + Where(sq.Eq{t.Field("id"): id}). + ToSql() +} + +func (c Client) GetNamespace(ctx context.Context, id string) (*namespaces.Namespace, error) { + sql, args, err := getNamespaceSql(id) + if err != nil { + slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) + return nil, err + } + + row, err := c.queryRow(ctx, sql, args, err) + if err != nil { + slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) + return nil, err + } + + namespace := namespaces.Namespace{Id: "", Name: ""} + if err := row.Scan(&namespace.Id, &namespace.Name); err != nil { + if e := WrapIfKnownInvalidQueryErr(err); e != nil { + slog.Error(services.ErrNotFound, slog.String("error", e.Error())) + return nil, e + } + + slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) + return nil, err + } + + return &namespace, nil +} + +func listNamespacesSql() (string, []interface{}, error) { + t := Tables.Namespaces + return newStatementBuilder(). + Select("*"). + From(t.Name()). + ToSql() +} + +func (c Client) ListNamespaces(ctx context.Context) ([]*namespaces.Namespace, error) { + namespacesList := []*namespaces.Namespace{} + + sql, args, err := listNamespacesSql() + if err != nil { + slog.Error(services.ErrListingResource, slog.String("error", err.Error())) + return nil, err + } + + rows, err := c.query(ctx, sql, args, err) + if err != nil { + slog.Error(services.ErrListingResource, slog.String("error", err.Error())) + return nil, err + } + + for rows.Next() { + var namespace namespaces.Namespace + if err := rows.Scan(&namespace.Id, &namespace.Name); err != nil { + slog.Error(services.ErrListingResource, slog.String("error", err.Error())) + return nil, err + } + namespacesList = append(namespacesList, &namespace) + } + + return namespacesList, nil +} + +func createNamespaceSql(name string) (string, []interface{}, error) { + t := Tables.Namespaces + return newStatementBuilder(). + Insert(t.Name()). + Columns("name"). + Values(name). + Suffix("RETURNING \"id\""). + ToSql() +} + +func (c Client) CreateNamespace(ctx context.Context, name string) (string, error) { + sql, args, err := createNamespaceSql(name) + var id string + + if r, e := c.queryRow(ctx, sql, args, err); e != nil { + slog.Error(services.ErrCreatingResource, slog.String("error", e.Error())) + return "", e + } else if e := r.Scan(&id); e != nil { + if IsConstraintViolationForColumnVal(e, TableNamespaces, "name") { + e = errors.Join(NewUniqueAlreadyExistsError(name), e) + slog.Error(services.ErrConflict, slog.String("error", e.Error())) + return "", e + } + + slog.Error(services.ErrCreatingResource, slog.String("error", e.Error())) + return "", e + } + return id, nil +} + +func updateNamespaceSql(id string, name string) (string, []interface{}, error) { + t := Tables.Namespaces + return newStatementBuilder(). + Update(t.Name()). + Set("name", name). + Where(sq.Eq{t.Field("id"): id}). + ToSql() +} + +func (c Client) UpdateNamespace(ctx context.Context, id string, name string) (*namespaces.Namespace, error) { + sql, args, err := updateNamespaceSql(id, name) + + if e := c.exec(ctx, sql, args, err); e != nil { + if IsConstraintViolationForColumnVal(e, TableNamespaces, "name") { + e = errors.Join(NewUniqueAlreadyExistsError(name), e) + slog.Error(services.ErrConflict, slog.String("error", e.Error())) + return nil, e + } + + if err := WrapIfKnownInvalidQueryErr(e); err != nil { + if errors.Is(err, ErrNotFound) { + slog.Error(services.ErrNotFound, slog.String("error", err.Error())) + } + return nil, err + } + + slog.Error(services.ErrUpdatingResource, slog.String("error", e.Error())) + return nil, e + } + + return c.GetNamespace(ctx, id) +} + +func deleteNamespaceSql(id string) (string, []interface{}, error) { + t := Tables.Namespaces + // TODO: handle delete cascade, dangerous deletion via special rpc, or "soft-delete" status change + return newStatementBuilder(). + Delete(t.Name()). + Where(sq.Eq{t.Field("id"): id}). + Suffix("RETURNING \"id\""). + ToSql() +} + +func (c Client) DeleteNamespace(ctx context.Context, id string) error { + sql, args, err := deleteNamespaceSql(id) + + e := c.exec(ctx, sql, args, err) + if e != nil { + if errors.Is(e, ErrNotFound) { + slog.Error(services.ErrNotFound, slog.String("error", e.Error())) + } else if errors.Is(e, ErrForeignKeyViolation) { + slog.Error(services.ErrConflict, slog.String("error", e.Error())) + } else { + slog.Error(services.ErrDeletingResource, slog.String("error", e.Error())) + } + } + return e +} diff --git a/internal/db/resource_mapping.go b/internal/db/resource_mapping.go new file mode 100644 index 0000000000..99032eb407 --- /dev/null +++ b/internal/db/resource_mapping.go @@ -0,0 +1,256 @@ +package db + +import ( + "context" + + sq "github.com/Masterminds/squirrel" + "github.com/jackc/pgx/v5" + "github.com/opentdf/opentdf-v2-poc/sdk/attributes" + "github.com/opentdf/opentdf-v2-poc/sdk/common" + "github.com/opentdf/opentdf-v2-poc/sdk/resourcemapping" + "google.golang.org/protobuf/encoding/protojson" +) + +var ResourceMappingTable = tableName(TableResourceMappings) + +func resourceMappingHydrateList(rows pgx.Rows) ([]*resourcemapping.ResourceMapping, error) { + var list []*resourcemapping.ResourceMapping + + for rows.Next() { + rm, err := resourceMappingHydrateItem(rows) + if err != nil { + return nil, err + } + list = append(list, rm) + } + return list, nil +} + +func resourceMappingHydrateItem(row pgx.Row) (*resourcemapping.ResourceMapping, error) { + var ( + id string + metadataJSON []byte + metadata = new(common.Metadata) + terms []string + attributeValueJSON []byte + attributeValue = new(attributes.Value) + ) + + err := row.Scan( + &id, + &metadataJSON, + &terms, + &attributeValueJSON, + ) + if err != nil { + return nil, err + } + + if metadataJSON != nil { + err = protojson.Unmarshal(metadataJSON, metadata) + if err != nil { + return nil, err + } + } + + err = protojson.Unmarshal(attributeValueJSON, attributeValue) + if err != nil { + return nil, err + } + + return &resourcemapping.ResourceMapping{ + Id: id, + Metadata: metadata, + AttributeValue: attributeValue, + Terms: terms, + }, nil +} + +func resourceMappingSelect() sq.SelectBuilder { + return newStatementBuilder().Select( + tableField(ResourceMappingTable, "id"), + tableField(ResourceMappingTable, "metadata"), + tableField(ResourceMappingTable, "terms"), + "JSON_BUILD_OBJECT("+ + "'id', "+tableField(AttributeValueTable, "id")+", "+ + "'value', "+tableField(AttributeValueTable, "value")+","+ + "'members', "+tableField(AttributeValueTable, "members")+ + ")"+ + " AS attribute_value", + ). + LeftJoin(AttributeValueTable+" ON "+tableField(AttributeValueTable, "id")+" = "+tableField(ResourceMappingTable, "attribute_value_id")). + GroupBy(tableField(ResourceMappingTable, "id"), tableField(AttributeValueTable, "id")) +} + +/* + Resource Mapping CRUD +*/ + +func createResourceMappingSQL(attributeValueID string, metadata []byte, terms []string) (string, []interface{}, error) { + return newStatementBuilder(). + Insert(ResourceMappingTable). + Columns( + "attribute_value_id", + "metadata", + "terms", + ). + Values( + attributeValueID, + metadata, + terms, + ). + Suffix("RETURNING \"id\""). + ToSql() +} + +func (c Client) CreateResourceMapping(ctx context.Context, rm *resourcemapping.ResourceMappingCreateUpdate) (*resourcemapping.ResourceMapping, error) { + metadataJSON, metadata, err := marshalCreateMetadata(rm.Metadata) + if err != nil { + return nil, err + } + + sql, args, err := createResourceMappingSQL(rm.AttributeValueId, metadataJSON, rm.Terms) + if err != nil { + return nil, err + } + + row, err := c.queryRow(ctx, sql, args, err) + if err != nil { + return nil, err + } + + var id string + if err := row.Scan(&id); err != nil { + return nil, err + } + + av, err := c.GetAttributeValue(ctx, rm.AttributeValueId) + if err != nil { + return nil, err + } + + return &resourcemapping.ResourceMapping{ + Id: id, + Metadata: metadata, + AttributeValue: av, + Terms: rm.Terms, + }, nil +} + +func getResourceMappingSQL(id string) (string, []interface{}, error) { + return resourceMappingSelect(). + Where(sq.Eq{tableField(ResourceMappingTable, "id"): id}). + From(ResourceMappingTable). + ToSql() +} + +func (c Client) GetResourceMapping(ctx context.Context, id string) (*resourcemapping.ResourceMapping, error) { + sql, args, err := getResourceMappingSQL(id) + + row, err := c.queryRow(ctx, sql, args, err) + if err != nil { + return nil, err + } + + rm, err := resourceMappingHydrateItem(row) + if err != nil { + return nil, err + } + return rm, nil +} + +func listResourceMappingsSQL() (string, []interface{}, error) { + return resourceMappingSelect(). + From(ResourceMappingTable). + ToSql() +} + +func (c Client) ListResourceMappings(ctx context.Context) ([]*resourcemapping.ResourceMapping, error) { + sql, args, err := listResourceMappingsSQL() + if err != nil { + return nil, err + } + + rows, err := c.query(ctx, sql, args, err) + if err != nil { + return nil, err + } + defer rows.Close() + + list, err := resourceMappingHydrateList(rows) + if err != nil { + return nil, err + } + + return list, nil +} + +func updateResourceMappingSQL(id string, attribute_value_id string, metadata []byte, terms []string) (string, []interface{}, error) { + sb := newStatementBuilder(). + Update(ResourceMappingTable) + + if attribute_value_id != "" { + sb = sb.Set("attribute_value_id", attribute_value_id) + } + + if metadata != nil { + sb = sb.Set("metadata", metadata) + } + + if terms != nil { + sb = sb.Set("terms", terms) + } + + return sb. + Where(sq.Eq{"id": id}). + ToSql() +} + +func (c Client) UpdateResourceMapping(ctx context.Context, id string, rm *resourcemapping.ResourceMappingCreateUpdate) (*resourcemapping.ResourceMapping, error) { + prev, err := c.GetResourceMapping(ctx, id) + if err != nil { + return nil, err + } + + metadataJSON, _, err := marshalUpdateMetadata(prev.Metadata, rm.Metadata) + if err != nil { + return nil, err + } + + sql, args, err := updateResourceMappingSQL( + id, + rm.AttributeValueId, + metadataJSON, + rm.Terms, + ) + if err != nil { + return nil, err + } + + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return prev, nil +} + +func deleteResourceMappingSQL(id string) (string, []interface{}, error) { + return newStatementBuilder(). + Delete(ResourceMappingTable). + Where(sq.Eq{"id": id}). + ToSql() +} + +func (c Client) DeleteResourceMapping(ctx context.Context, id string) (*resourcemapping.ResourceMapping, error) { + prev, err := c.GetResourceMapping(ctx, id) + if err != nil { + return nil, err + } + + sql, args, err := deleteResourceMappingSQL(id) + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return prev, nil +} diff --git a/internal/db/subject_mappings.go b/internal/db/subject_mappings.go new file mode 100644 index 0000000000..dcec586e7b --- /dev/null +++ b/internal/db/subject_mappings.go @@ -0,0 +1,290 @@ +package db + +import ( + "context" + "strings" + + sq "github.com/Masterminds/squirrel" + "github.com/jackc/pgx/v5" + "github.com/opentdf/opentdf-v2-poc/sdk/attributes" + "github.com/opentdf/opentdf-v2-poc/sdk/common" + "github.com/opentdf/opentdf-v2-poc/sdk/subjectmapping" + "google.golang.org/protobuf/encoding/protojson" +) + +var SubjectMappingOperatorEnumPrefix = "SUBJECT_MAPPING_OPERATOR_ENUM_" + +func subjectMappingOperatorEnumTransformIn(value string) string { + return strings.TrimPrefix(value, SubjectMappingOperatorEnumPrefix) +} + +func subjectMappingOperatorEnumTransformOut(value string) subjectmapping.SubjectMappingOperatorEnum { + return subjectmapping.SubjectMappingOperatorEnum(subjectmapping.SubjectMappingOperatorEnum_value[SubjectMappingOperatorEnumPrefix+value]) +} + +func subjectMappingSelect() sq.SelectBuilder { + t := Tables.SubjectMappings + aT := Tables.AttributeValues + return newStatementBuilder().Select( + t.Field("id"), + t.Field("operator"), + t.Field("subject_attribute"), + t.Field("subject_attribute_values"), + t.Field("metadata"), + "JSON_BUILD_OBJECT("+ + "'id', "+aT.Field("id")+", "+ + "'value', "+aT.Field("value")+","+ + "'members', "+aT.Field("members")+ + ") AS attribute_value", + ). + LeftJoin(aT.Name() + " ON " + t.Field("id") + " = " + t.Field("id")). + GroupBy(t.Field("id")). + GroupBy(aT.Field("id")) +} + +func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, error) { + var ( + id string + operator string + subjectAttribute string + subjectAttributeValues []string + metadataJson []byte + attributeValueJson []byte + ) + + err := row.Scan( + &id, + &operator, + &subjectAttribute, + &subjectAttributeValues, + &metadataJson, + &attributeValueJson, + ) + if err != nil { + return nil, err + } + + m := &common.Metadata{} + if metadataJson != nil { + if err := protojson.Unmarshal(metadataJson, m); err != nil { + return nil, err + } + } + + v := &attributes.Value{} + if attributeValueJson != nil { + if err := protojson.Unmarshal(attributeValueJson, v); err != nil { + return nil, err + } + } + + s := &subjectmapping.SubjectMapping{ + Id: id, + Operator: subjectMappingOperatorEnumTransformOut(operator), + SubjectAttribute: subjectAttribute, + SubjectValues: subjectAttributeValues, + Metadata: m, + AttributeValue: v, + } + return s, nil +} + +func subjectMappingHydrateList(rows pgx.Rows) ([]*subjectmapping.SubjectMapping, error) { + list := make([]*subjectmapping.SubjectMapping, 0) + for rows.Next() { + s, err := subjectMappingHydrateItem(rows) + if err != nil { + return nil, err + } + list = append(list, s) + } + return list, nil +} + +/// +/// SubjectMapping CRUD +/// + +func createSubjectMappingSql(attribute_value_id string, operator string, subject_attribute string, subject_attribute_values []string, metadata []byte) (string, []interface{}, error) { + t := Tables.SubjectMappings + return newStatementBuilder(). + Insert(t.Name()). + Columns( + "attribute_value_id", + "operator", + "subject_attribute", + "subject_attribute_values", + "metadata", + ). + Values( + attribute_value_id, + operator, + subject_attribute, + subject_attribute_values, + metadata, + ). + Suffix("RETURNING \"id\""). + ToSql() +} +func (c *Client) CreateSubjectMapping(ctx context.Context, s *subjectmapping.SubjectMappingCreateUpdate) (*subjectmapping.SubjectMapping, error) { + metadataJson, metadata, err := marshalCreateMetadata(s.Metadata) + if err != nil { + return nil, err + } + + sql, args, err := createSubjectMappingSql( + s.AttributeValueId, + subjectMappingOperatorEnumTransformIn(s.Operator.String()), + s.SubjectAttribute, + s.SubjectValues, + metadataJson, + ) + + var id string + if r, err := c.queryRow(ctx, sql, args, err); err != nil { + return nil, err + } else if err := r.Scan(&id); err != nil { + return nil, err + } + + // a, err := c.GetAttributeValue(ctx, s.AttributeValueId) + + rS := &subjectmapping.SubjectMapping{ + Id: id, + // Attribute: a, + Operator: s.Operator, + SubjectAttribute: s.SubjectAttribute, + SubjectValues: s.SubjectValues, + Metadata: metadata, + } + return rS, nil +} + +func getSubjectMappingSql(id string) (string, []interface{}, error) { + t := Tables.SubjectMappings + return subjectMappingSelect(). + From(t.Name()). + Where(sq.Eq{t.Field("id"): id}). + ToSql() +} +func (c *Client) GetSubjectMapping(ctx context.Context, id string) (*subjectmapping.SubjectMapping, error) { + sql, args, err := getSubjectMappingSql(id) + + row, err := c.queryRow(ctx, sql, args, err) + if err != nil { + return nil, err + } + + s, err := subjectMappingHydrateItem(row) + if err != nil { + return nil, err + } + + return s, nil +} + +func listSubjectMappingsSql() (string, []interface{}, error) { + t := Tables.SubjectMappings + return subjectMappingSelect(). + From(t.Name()). + ToSql() +} +func (c *Client) ListSubjectMappings(ctx context.Context) ([]*subjectmapping.SubjectMapping, error) { + sql, args, err := listSubjectMappingsSql() + if err != nil { + return nil, err + } + + rows, err := c.query(ctx, sql, args, err) + if err != nil { + return nil, err + } + defer rows.Close() + + subjectMappings, err := subjectMappingHydrateList(rows) + if err != nil { + return nil, err + } + + return subjectMappings, nil +} + +func updateSubjectMappingSql(id string, attribute_value_id string, operator string, subject_attribute string, subject_attribute_values []string, metadata []byte) (string, []interface{}, error) { + t := Tables.SubjectMappings + sb := newStatementBuilder(). + Update(t.Name()) + + if attribute_value_id != "" { + sb.Set("attribute_value_id", attribute_value_id) + } + if operator != "" { + sb.Set("operator", operator) + } + if subject_attribute != "" { + sb.Set("subject_attribute", subject_attribute) + } + if subject_attribute_values != nil { + sb.Set("subject_attribute_values", subject_attribute_values) + } + if metadata != nil { + sb.Set("metadata", metadata) + } + + return sb. + Where(sq.Eq{"id": id}). + ToSql() +} +func (c *Client) UpdateSubjectMapping(ctx context.Context, id string, s *subjectmapping.SubjectMappingCreateUpdate) (*subjectmapping.SubjectMapping, error) { + prev, err := c.GetSubjectMapping(ctx, id) + if err != nil { + return nil, err + } + + metadataJson, _, err := marshalUpdateMetadata(prev.Metadata, s.Metadata) + if err != nil { + return nil, err + } + + sql, args, err := updateSubjectMappingSql( + id, + s.AttributeValueId, + subjectMappingOperatorEnumTransformIn(s.Operator.String()), + s.SubjectAttribute, + s.SubjectValues, + metadataJson, + ) + if err != nil { + return nil, err + } + + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return prev, nil +} + +func deleteSubjectMappingSql(id string) (string, []interface{}, error) { + t := Tables.SubjectMappings + return newStatementBuilder(). + Delete(t.Name()). + Where(sq.Eq{"id": id}). + ToSql() +} +func (c *Client) DeleteSubjectMapping(ctx context.Context, id string) (*subjectmapping.SubjectMapping, error) { + prev, err := c.GetSubjectMapping(ctx, id) + if err != nil { + return nil, err + } + + sql, args, err := deleteSubjectMappingSql(id) + if err != nil { + return nil, err + } + + if err := c.exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return prev, nil +} diff --git a/migrations/20230101000000_create_schema.sql b/migrations/20230101000000_create_schema.sql new file mode 100644 index 0000000000..34766eb21b --- /dev/null +++ b/migrations/20230101000000_create_schema.sql @@ -0,0 +1,12 @@ +-- +goose Up +-- +goose StatementBegin + +-- +-- schema creation is dynamic and is not included in this file +-- + +-- +goose StatementEnd + +-- +goose Down +-- +goose StatementBegin +-- +goose StatementEnd diff --git a/migrations/20231208092252_create_opentdf.sql b/migrations/20231208092252_create_opentdf.sql index 2379e8ad56..3dba7a8cca 100644 --- a/migrations/20231208092252_create_opentdf.sql +++ b/migrations/20231208092252_create_opentdf.sql @@ -2,9 +2,7 @@ -- +goose StatementBegin SELECT 'up SQL query'; -CREATE SCHEMA IF NOT EXISTS opentdf; - -CREATE TABLE IF NOT EXISTS opentdf.resources +CREATE TABLE IF NOT EXISTS resources ( id SERIAL PRIMARY KEY, name VARCHAR NOT NULL, @@ -21,5 +19,5 @@ CREATE TABLE IF NOT EXISTS opentdf.resources -- +goose Down -- +goose StatementBegin -SELECT 'down SQL query'; +DROP TABLE IF EXISTS resources; -- +goose StatementEnd diff --git a/migrations/20240131000000_create_new_tables.sql b/migrations/20240131000000_create_new_tables.sql new file mode 100644 index 0000000000..2c43c7c026 --- /dev/null +++ b/migrations/20240131000000_create_new_tables.sql @@ -0,0 +1,88 @@ +-- +goose Up +-- +goose StatementBegin + +CREATE TYPE attribute_definition_rule AS ENUM ('UNSPECIFIED', 'ALL_OF', 'ANY_OF', 'HIERARCHY'); +CREATE TYPE subject_mappings_operator AS ENUM ('UNSPECIFIED', 'IN', 'NOT_IN'); + +CREATE TABLE IF NOT EXISTS attribute_namespaces +( + -- generate on create + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + name VARCHAR NOT NULL UNIQUE +); + +CREATE TABLE IF NOT EXISTS attribute_definitions +( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + namespace_id UUID NOT NULL REFERENCES attribute_namespaces(id), + name VARCHAR NOT NULL, + rule attribute_definition_rule NOT NULL, + metadata JSONB, + UNIQUE (namespace_id, name) +); + +CREATE TABLE IF NOT EXISTS attribute_values +( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + attribute_definition_id UUID NOT NULL REFERENCES attribute_definitions(id), + value VARCHAR NOT NULL, + members UUID[], + metadata JSONB, + UNIQUE (attribute_definition_id, value) +); + +CREATE TABLE IF NOT EXISTS key_access_servers +( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + uri VARCHAR NOT NULL UNIQUE, + public_key JSONB NOT NULL, + metadata JSONB +); + +CREATE TABLE IF NOT EXISTS attribute_definition_key_access_grants +( + attribute_definition_id UUID NOT NULL REFERENCES attribute_definitions(id), + key_access_server_id UUID NOT NULL REFERENCES key_access_servers(id), + PRIMARY KEY (attribute_definition_id, key_access_server_id) +); + +CREATE TABLE IF NOT EXISTS attribute_value_key_access_grants +( + attribute_value_id UUID NOT NULL REFERENCES attribute_values(id), + key_access_server_id UUID NOT NULL REFERENCES key_access_servers(id), + PRIMARY KEY (attribute_value_id, key_access_server_id) +); + +CREATE TABLE IF NOT EXISTS resource_mappings +( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + attribute_value_id UUID NOT NULL REFERENCES attribute_values(id), + terms VARCHAR[], + metadata JSONB +); + +CREATE TABLE IF NOT EXISTS subject_mappings +( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + attribute_value_id UUID NOT NULL REFERENCES attribute_values(id), + operator subject_mappings_operator NOT NULL, + subject_attribute VARCHAR NOT NULL, + subject_attribute_values VARCHAR[], + metadata JSONB +); +-- +goose StatementEnd + +-- +goose Down +-- +goose StatementBegin +DROP TABLE IF EXISTS subject_mappings; +DROP TABLE IF EXISTS resource_mappings; +DROP TABLE IF EXISTS attribute_value_key_access_grants; +DROP TABLE IF EXISTS attribute_definition_key_access_grants; +DROP TABLE IF EXISTS key_access_servers; +DROP TABLE IF EXISTS attribute_values; +DROP TABLE IF EXISTS attribute_definitions; +DROP TABLE IF EXISTS attribute_namespaces; + +DROP TYPE attribute_definition_rule; +DROP TYPE subject_mappings_operator; +-- +goose StatementEnd \ No newline at end of file diff --git a/migrations/20240131000000_diagram.md b/migrations/20240131000000_diagram.md new file mode 100644 index 0000000000..4d8737f75d --- /dev/null +++ b/migrations/20240131000000_diagram.md @@ -0,0 +1,89 @@ +# Diagram for 20240118000000_create_new_tables.sql + +```mermaid +--- +title: Database Schema Mermaid Diagram +nodes: | + Metadata is a jsonb type which will hold a common structure + + To note OCI data we can utilize labels (i.e. map[string]string) + "labels": { + "oci:version": "1.0.0" + "oci:...": "..." + } + +--- + +erDiagram + + Namespace ||--|{ AttributeDefinition : has + AttributeDefinition ||--|{ AttributeValue : has + AttributeDefinition ||--o{ AttributeDefinitionKeyAccessGrant : has + + AttributeValue ||--o{ AttributeValueKeyAccessGrant: has + AttributeValue ||--o{ AttributeValue: "has group members" + + AttributeDefinitionKeyAccessGrant ||--|{ KeyAccessServer: has + AttributeValueKeyAccessGrant ||--|{ KeyAccessServer: has + + ResourceMapping }o--o{ AttributeValue: relates + + SubjectMapping }o--o{ AttributeValue: relates + + Namespace { + uuid id PK + varchar name UK + } + + AttributeDefinition { + uuid id PK + uuid namespace_id FK + varchar name + enum rule + jsonb metadata + compIdx comp_key UK "ns_id + name" + } + + AttributeDefinitionKeyAccessGrant { + uuid attribute_definition_id FK + uuid key_access_server_id FK + } + + AttributeValue { + uuid id PK + uuid namespace_id FK + uuid attribute_definition_id FK + varchar value + uuid[] members FK "Optional grouping of values" + jsonb metadata + compIdx comp_key UK "ns_id + ad_id + value" + } + + AttributeValueKeyAccessGrant { + uuid attribute_value_id FK + uuid key_access_server_id FK + } + + ResourceMapping { + uuid id PK + uuid attribute_value_id FK + varchar[] terms + jsonb metadata + } + + SubjectMapping { + uuid id PK + uuid attribute_value_id + enum operator + varchar subject_attribute + varchar[] subject_attribute_values + jsonb metadata + } + + KeyAccessServer { + uuid id PK + varchar uri UK + jsonb public_key + jsonb metadata + } +``` \ No newline at end of file diff --git a/proto/acre/acre.proto b/proto/acre/acre.proto deleted file mode 100644 index adee5b702a..0000000000 --- a/proto/acre/acre.proto +++ /dev/null @@ -1,270 +0,0 @@ -syntax = "proto3"; - -package acre; - -import "attributes/attributes.proto"; -import "buf/validate/validate.proto"; -import "common/common.proto"; -import "google/api/annotations.proto"; - -/* - Access Control Resource Encodings (ACRE). Structures supporting Resources and Attributes mappings - -*/ - -/* - A modular set of terms that are the "same". Could be used across resource mappings -*/ -message Synonyms { - common.ResourceDescriptor descriptor = 1; - repeated string terms = 2; -} - -/* - Map one or more domain specific terms (synonyms) to an attribute value by reference. - - Example: - attributeValueRef: ref http://demo.com/attr/Classification/value/Confidential - synonymRef: - terms: ["CONFIDENTIAL", "CONTROLLED UNCLASSIFIED", "OFFICIAL-SENSITIVE", "CUI", "C"] - - Example 2: - attributeValueRef: ref to http://demo.com/attr/Classification/Confidential - synonymRef: - terms: ["OFFICIAL-SENSITIVE"] - -*/ -message ResourceMapping { - common.ResourceDescriptor descriptor = 1; - attributes.AttributeValueReference attribute_value_ref = 2; - SynonymRef synonym_ref = 3; -} - -/* - represents modeling an resource code/tag as a group . Use if not in the bounds of an attribute - definition. Otherwise use attributes.AttributeGroup - - Example: - value: NATO - members: [USA, GBR, etc.] -*/ -message ResourceGroup { - common.ResourceDescriptor descriptor = 1; - //group value - string value = 2; - //List of member values - repeated string members = 3; -} - -// Reference to a ResourceMapping, one of descriptor or embedded value -message ResourceMappingRef { - oneof ref { - common.ResourceDescriptor descriptor = 1; - ResourceMapping resource_mapping = 2; - } -} - -// Reference to a Synonyms, one of descriptor or embedded value -message SynonymRef { - oneof ref { - common.ResourceDescriptor descriptor = 1; - Synonyms synonyms = 2; - } -} - -message ResourceEncodingRequestOptions { - common.ResourceDescriptor descriptor = 1; -} - -/* - Resource Mappings -*/ - -message ListResourceMappingsRequest { - common.ResourceSelector selector = 1; -} - -message ListResourceMappingsResponse { - repeated ResourceMapping mappings = 1; -} - -message GetResourceMappingRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} - -message GetResourceMappingResponse { - ResourceMapping mapping = 1; -} - -message CreateResourceMappingRequest { - ResourceMapping mapping = 1 [(buf.validate.field).required = true]; -} -message CreateResourceMappingResponse {} - -message UpdateResourceMappingRequest { - int32 id = 1 [(buf.validate.field).required = true]; - ResourceMapping mapping = 2 [(buf.validate.field).required = true]; -} -message UpdateResourceMappingResponse {} - -message DeleteResourceMappingRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} -message DeleteResourceMappingResponse {} - -/* - Synonyms -*/ - -message ListResourceSynonymsRequest { - common.ResourceSelector selector = 1; -} - -message ListResourceSynonymsResponse { - repeated Synonyms synonyms = 1; -} - -message GetResourceSynonymRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} - -message GetResourceSynonymResponse { - Synonyms synonym = 1; -} - -message CreateResourceSynonymRequest { - Synonyms synonym = 1 [(buf.validate.field).required = true]; -} -message CreateResourceSynonymResponse {} - -message UpdateResourceSynonymRequest { - int32 id = 1 [(buf.validate.field).required = true]; - Synonyms synonym = 2 [(buf.validate.field).required = true]; -} -message UpdateResourceSynonymResponse {} - -message DeleteResourceSynonymRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} -message DeleteResourceSynonymResponse {} - -/* - Resource Groups -*/ -message ListResourceGroupsRequest { - common.ResourceSelector selector = 1; -} - -message ListResourceGroupsResponse { - repeated ResourceGroup groups = 1; -} - -message GetResourceGroupRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} - -message GetResourceGroupResponse { - ResourceGroup group = 1; -} - -message CreateResourceGroupRequest { - ResourceGroup group = 1 [(buf.validate.field).required = true]; -} -message CreateResourceGroupResponse {} - -message UpdateResourceGroupRequest { - int32 id = 1 [(buf.validate.field).required = true]; - ResourceGroup group = 2 [(buf.validate.field).required = true]; -} -message UpdateResourceGroupResponse {} - -message DeleteResourceGroupRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} -message DeleteResourceGroupResponse {} - -service ResourceEncodingService { - /* - Resource Mappings - */ - rpc ListResourceMappings(ListResourceMappingsRequest) returns (ListResourceMappingsResponse) { - option (google.api.http) = {get: "/v1/encoding/resource/mappings"}; - } - rpc GetResourceMapping(GetResourceMappingRequest) returns (GetResourceMappingResponse) { - option (google.api.http) = {get: "/v1/encoding/resource/mappings/{id}"}; - } - - rpc CreateResourceMapping(CreateResourceMappingRequest) returns (CreateResourceMappingResponse) { - option (google.api.http) = { - post: "/v1/encoding/resource/mappings" - body: "mapping" - }; - } - - rpc UpdateResourceMapping(UpdateResourceMappingRequest) returns (UpdateResourceMappingResponse) { - option (google.api.http) = { - post: "/v1/encoding/resource/mappings/{id}" - body: "mapping" - }; - } - - rpc DeleteResourceMapping(DeleteResourceMappingRequest) returns (DeleteResourceMappingResponse) { - option (google.api.http) = {delete: "/v1/encoding/resource/mappings/{id}"}; - } - - /* - Synonyms - */ - rpc ListResourceSynonyms(ListResourceSynonymsRequest) returns (ListResourceSynonymsResponse) { - option (google.api.http) = {get: "/v1/encoding/resource/synonyms"}; - } - rpc GetResourceSynonym(GetResourceSynonymRequest) returns (GetResourceSynonymResponse) { - option (google.api.http) = {get: "/v1/encoding/resource/synonyms/{id}"}; - } - - rpc CreateResourceSynonym(CreateResourceSynonymRequest) returns (CreateResourceSynonymResponse) { - option (google.api.http) = { - post: "/v1/encoding/resource/synonyms" - body: "synonym" - }; - } - - rpc UpdateResourceSynonym(UpdateResourceSynonymRequest) returns (UpdateResourceSynonymResponse) { - option (google.api.http) = { - post: "/v1/encoding/resource/synonyms/{id}" - body: "synonym" - }; - } - - rpc DeleteResourceSynonym(DeleteResourceSynonymRequest) returns (DeleteResourceSynonymResponse) { - option (google.api.http) = {delete: "/v1/encoding/resource/synonyms/{id}"}; - } - - /* - Resource Groups - */ - rpc ListResourceGroups(ListResourceGroupsRequest) returns (ListResourceGroupsResponse) { - option (google.api.http) = {get: "/v1/encoding/resource/groups"}; - } - rpc GetResourceGroup(GetResourceGroupRequest) returns (GetResourceGroupResponse) { - option (google.api.http) = {get: "/v1/encoding/resource/groups/{id}"}; - } - - rpc CreateResourceGroup(CreateResourceGroupRequest) returns (CreateResourceGroupResponse) { - option (google.api.http) = { - post: "/v1/encoding/resource/groups" - body: "group" - }; - } - - rpc UpdateResourceGroup(UpdateResourceGroupRequest) returns (UpdateResourceGroupResponse) { - option (google.api.http) = { - post: "/v1/encoding/resource/groups/{id}" - body: "group" - }; - } - - rpc DeleteResourceGroup(DeleteResourceGroupRequest) returns (DeleteResourceGroupResponse) { - option (google.api.http) = {delete: "/v1/encoding/resource/groups/{id}"}; - } -} diff --git a/proto/acse/acse.proto b/proto/acse/acse.proto deleted file mode 100644 index 04ce2d7d8c..0000000000 --- a/proto/acse/acse.proto +++ /dev/null @@ -1,108 +0,0 @@ -syntax = "proto3"; - -package acse; - -import "attributes/attributes.proto"; -import "buf/validate/validate.proto"; -import "common/common.proto"; -import "google/api/annotations.proto"; - -/* - Access Control Subject Encoding (ACSE): Structures supporting the mapping of Subjects and Attributes (e.g. Entitlement) -*/ - -/** - Define a mapping of an subject attribute to subject using a rule: - [subjectValue] - - Example subject mapping of a subject with nationality = CZE entitled to attribute relto:ZCE - From Existing Policy: "http://demo.com/attr/relto/value/CZE": {"nationality": ["CZE"]} - To Subject Mapping Policy: - { - attributeValueFQN: "http://demo.com/attr/relto/value/CZE" - subjectAttribute: "nationality" - subjectValues: ["CZE"] - operator: "IN" - } - -*/ -message SubjectMapping { - common.ResourceDescriptor descriptor = 1; - - enum Operator { - OPERATOR_UNSPECIFIED = 0; - OPERATOR_IN = 1; - OPERATOR_NOT_IN = 2; - } - //TODO should this be a list of values? - // Attribute Value to be mapped to - attributes.AttributeValueReference attribute_value_ref = 2; - // Resource Attribute Key; NOT Attribute Definition Attribute name - string subject_attribute = 3; - // The list of comparison values for a resource's value - repeated string subject_values = 4; - // the operator - Operator operator = 5 [ - (buf.validate.field).enum.defined_only = true, - (buf.validate.field).required = true - ]; - //TODO future - add features or idea of pattern/regex like ACSE? like username regex to pull domain from subject attribute - // or treat the subject values as regex patterns applied to subject attribute -} - -message GetSubjectMappingRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} -message GetSubjectMappingResponse { - SubjectMapping subject_mapping = 1; -} - -message ListSubjectMappingsRequest { - common.ResourceSelector selector = 1; -} -message ListSubjectMappingsResponse { - repeated SubjectMapping subject_mappings = 1; -} - -message CreateSubjectMappingRequest { - SubjectMapping subject_mapping = 1 [(buf.validate.field).required = true]; -} -message CreateSubjectMappingResponse {} - -message UpdateSubjectMappingRequest { - int32 id = 1 [(buf.validate.field).required = true]; - SubjectMapping subject_mapping = 2 [(buf.validate.field).required = true]; -} -message UpdateSubjectMappingResponse {} - -message DeleteSubjectMappingRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} -message DeleteSubjectMappingResponse {} - -service SubjectEncodingService { - rpc ListSubjectMappings(ListSubjectMappingsRequest) returns (ListSubjectMappingsResponse) { - option (google.api.http) = {get: "/v1/encoding/subject/mappings"}; - } - rpc GetSubjectMapping(GetSubjectMappingRequest) returns (GetSubjectMappingResponse) { - option (google.api.http) = {get: "/v1/encoding/subject/mappings/{id}"}; - } - - rpc CreateSubjectMapping(CreateSubjectMappingRequest) returns (CreateSubjectMappingResponse) { - option (google.api.http) = { - post: "/v1/encoding/subject/mappings" - body: "subject_mapping" - }; - } - - rpc UpdateSubjectMapping(UpdateSubjectMappingRequest) returns (UpdateSubjectMappingResponse) { - option (google.api.http) = { - post: "/v1/encoding/subject/mappings/{id}" - body: "subject_mapping" - }; - } - - rpc DeleteSubjectMapping(DeleteSubjectMappingRequest) returns (DeleteSubjectMappingResponse) { - option (google.api.http) = {delete: "/v1/encoding/subjects/mappings/{id}"}; - } -} diff --git a/proto/attributes/attributes.proto b/proto/attributes/attributes.proto index 6cdeb6b96f..2b3c242d9c 100644 --- a/proto/attributes/attributes.proto +++ b/proto/attributes/attributes.proto @@ -5,194 +5,439 @@ package attributes; import "buf/validate/validate.proto"; import "common/common.proto"; import "google/api/annotations.proto"; +import "kasregistry/key_access_server_registry.proto"; +import "namespaces/namespaces.proto"; + +// buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package +enum AttributeRuleTypeEnum { + ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED = 0; + ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF = 1; + ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF = 2; + ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY = 3; +} + +message Attribute { + string id = 1; + + // Optional metadata for the attribute definition + common.Metadata metadata = 2; + + // namespace of the attribute + namespaces.Namespace namespace = 3; + + //attribute name + string name = 4; -// Just a set of attributes -message AttributeSet { - common.ResourceDescriptor descriptor = 1; - repeated AttributeDefinition definitions = 2; + // attribute rule enum + AttributeRuleTypeEnum rule = 5 [ + (buf.validate.field).enum.defined_only = true, + (buf.validate.field).required = true + ]; + + repeated Value values = 7; + + repeated kasregistry.KeyAccessServer grants = 8; } -// Attribute Definition -message AttributeDefinition { - enum AttributeRuleType { - ATTRIBUTE_RULE_TYPE_UNSPECIFIED = 0; - ATTRIBUTE_RULE_TYPE_ALL_OF = 1; - ATTRIBUTE_RULE_TYPE_ANY_OF = 2; - ATTRIBUTE_RULE_TYPE_HIERARCHICAL = 3; - } - common.ResourceDescriptor descriptor = 1; +message AttributeCreateUpdate { + // Optional metadata for the attribute definition + common.MetadataMutable metadata = 1; + + // namespace of the attribute + string namespace_id = 2 [(buf.validate.field).required = true]; + //attribute name - string name = 2 [(buf.validate.field).required = true]; + string name = 3 [(buf.validate.field).required = true]; + // attribute rule enum - AttributeRuleType rule = 3 [ + AttributeRuleTypeEnum rule = 4 [ (buf.validate.field).enum.defined_only = true, (buf.validate.field).required = true ]; - // possible values - repeated AttributeDefinitionValue values = 4; - //optional attribute group by filtering rules - repeated AttributeDefinitionValue group_by = 9; + // optional + repeated ValueCreateUpdate values = 5; } -// Reference to an attribute value, one of descriptor or embedded value -message AttributeDefinitionReference { - oneof ref { - common.ResourceDescriptor descriptor = 1; - AttributeDefinition definition = 2; - } +message Value { + // generated uuid in database + string id = 1; + + common.Metadata metadata = 2; + + string attribute_id = 3 [(buf.validate.field).required = true]; + + string value = 4; + + // list of attribute values that this value is related to (attribute group) + repeated string members = 5; + + // list of key access servers + repeated kasregistry.KeyAccessServer grants = 6; } -// Definition of a single attribute value -message AttributeDefinitionValue { - common.ResourceDescriptor descriptor = 1; +message ValueCreateUpdate { + common.MetadataMutable metadata = 1; + string value = 2; - //TODO - optional lock down pub key format if needed. Per ATTR KEY? - string attribute_public_key = 3; -} -// Reference to an attribute value, one of descriptor or embedded value -message AttributeValueReference { - oneof ref { - common.ResourceDescriptor descriptor = 1; - AttributeDefinitionValue attribute_value = 2; - } + // list of attribute values that this value is related to (attribute group) + repeated string members = 3; } /* - represent an attribute value as a group with other attribute values as members + Key Access Server Grants +*/ - Example for Org1 FVEY: - id: 1 - version: 1.0 - namespace: demo.com - groupValue: http://demo.com/attr/relTo/FVEY - members: [http://demo.com/attr/relTo/USA,http://demo.com/attr/relTo/GBR,...] +message AttributeKeyAccessServer { + string attribute_id = 1; + string key_access_server_id = 2; +} -*/ -message AttributeGroup { - common.ResourceDescriptor descriptor = 1; - AttributeValueReference group_value = 2; - repeated AttributeValueReference member_values = 3; +message ValueKeyAccessServer { + string value_id = 1; + string key_access_server_id = 2; } /* Attribute Service Definitions */ -message GetAttributeRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} -message GetAttributeResponse { - AttributeDefinition definition = 1; +message ListAttributesRequest {} +message ListAttributesResponse { + repeated Attribute attributes = 1; } -message ListAttributesRequest { - common.ResourceSelector selector = 1; +message GetAttributeRequest { + string id = 1 [(buf.validate.field).required = true]; } -message ListAttributesResponse { - repeated AttributeDefinition definitions = 1; +message GetAttributeResponse { + Attribute attribute = 1; } message CreateAttributeRequest { - AttributeDefinition definition = 1 [(buf.validate.field).required = true]; + AttributeCreateUpdate attribute = 1 [(buf.validate.field).required = true]; +} +message CreateAttributeResponse { + Attribute attribute = 1; } -message CreateAttributeResponse {} message UpdateAttributeRequest { - int32 id = 1 [(buf.validate.field).required = true]; - AttributeDefinition definition = 2 [(buf.validate.field).required = true]; + string id = 1 [(buf.validate.field).required = true]; + AttributeCreateUpdate attribute = 2 [(buf.validate.field).required = true]; +} +message UpdateAttributeResponse { + Attribute attribute = 1; } -message UpdateAttributeResponse {} message DeleteAttributeRequest { - int32 id = 1 [(buf.validate.field).required = true]; + string id = 1 [(buf.validate.field).required = true]; +} +message DeleteAttributeResponse { + Attribute attribute = 1; } -message DeleteAttributeResponse {} -message GetAttributeGroupRequest { - int32 id = 1 [(buf.validate.field).required = true]; +/// +/// Value RPC messages +/// +message GetAttributeValueRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message GetAttributeValueResponse { + Value value = 1; } -message GetAttributeGroupResponse { - AttributeGroup group = 1; +message ListAttributeValuesRequest { + string attribute_id = 1 [(buf.validate.field).required = true]; +} +message ListAttributeValuesResponse { + repeated Value values = 1; +} + +message CreateAttributeValueRequest { + string attribute_id = 1 [(buf.validate.field).required = true]; + ValueCreateUpdate value = 2 [(buf.validate.field).required = true]; +} +message CreateAttributeValueResponse { + Value value = 1; } -message ListAttributeGroupsRequest { - common.ResourceSelector selector = 1; +message UpdateAttributeValueRequest { + string attribute_id = 1 [(buf.validate.field).required = true]; + string id = 2 [(buf.validate.field).required = true]; + ValueCreateUpdate value = 3 [(buf.validate.field).required = true]; +} +message UpdateAttributeValueResponse { + Value value = 1; } -message ListAttributeGroupsResponse { - repeated AttributeGroup groups = 1; +message DeleteAttributeValueRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message DeleteAttributeValueResponse { + Value value = 1; } -message CreateAttributeGroupRequest { - AttributeGroup group = 1 [(buf.validate.field).required = true]; +/* + Assign Key Access Server to Attribute and Value +*/ + +message AssignKeyAccessServerToAttributeRequest { + AttributeKeyAccessServer attribute_key_access_server = 1; } -message CreateAttributeGroupResponse {} +message AssignKeyAccessServerToAttributeResponse { + AttributeKeyAccessServer attribute_key_access_server = 1; +} + +message RemoveKeyAccessServerFromAttributeRequest { + AttributeKeyAccessServer attribute_key_access_server = 1; +} + +message RemoveKeyAccessServerFromAttributeResponse { + AttributeKeyAccessServer attribute_key_access_server = 1; +} + +message AssignKeyAccessServerToValueRequest { + ValueKeyAccessServer value_key_access_server = 1; +} + +message AssignKeyAccessServerToValueResponse { + ValueKeyAccessServer value_key_access_server = 1; +} -message UpdateAttributeGroupRequest { - int32 id = 1 [(buf.validate.field).required = true]; - AttributeGroup group = 2 [(buf.validate.field).required = true]; +message RemoveKeyAccessServerFromValueRequest { + ValueKeyAccessServer value_key_access_server = 1; } -message UpdateAttributeGroupResponse {} -message DeleteAttributeGroupRequest { - int32 id = 1 [(buf.validate.field).required = true]; +message RemoveKeyAccessServerFromValueResponse { + ValueKeyAccessServer value_key_access_server = 1; } -message DeleteAttributeGroupResponse {} +/// +/// Attribute Service +/// service AttributesService { + /* + List Attributes + Example: + grpcurl -plaintext localhost:9000 attributes.AttributesService/ListAttributes + + Response: + { + "attributes": [ + { + "values": [ + { + "members": [], + "grants": [ + { + "id": "bb50eaac-0d95-4f28-9a36-9bbf412a7b95", + "metadata": null, + "uri": "kas10", + "public_key": { + "remote": "https://example.com/kas" + } + } + ], + "id": "e2140c39-f478-43cf-9559-0067d596654f", + "metadata": null, + "attribute_id": "", + "value": "value1" + } + ], + "grants": [ + { + "id": "bb50eaac-0d95-4f28-9a36-9bbf412a7b95", + "metadata": null, + "uri": "kas10", + "public_key": { + "remote": "https://example.com/kas" + } + } + ], + "id": "2dc75d97-f6a4-4036-9a6a-acc99171fff1", + "metadata": { + "labels": [], + "created_at": { + "seconds": "1706878441", + "nanos": 147178000 + }, + "updated_at": { + "seconds": "1706878441", + "nanos": 147178000 + }, + "description": "" + }, + "namespace": { + "id": "c85d126a-c2f2-4bb6-bc6d-a513015363cb", + "name": "demo.com" + }, + "name": "test", + "rule": "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF" + } + ] + } + */ + rpc ListAttributes(ListAttributesRequest) returns (ListAttributesResponse) {} + + /* + List Values + Example: + grpcurl -plaintext -d '{"attribute_id": "attribute_id"}' localhost:8080 attributes.AttributesService/ListValues + */ + rpc ListAttributeValues(ListAttributeValuesRequest) returns (ListAttributeValuesResponse) {} + rpc GetAttribute(GetAttributeRequest) returns (GetAttributeResponse) { - option (google.api.http) = {get: "/v1/attribute/definitions/{id}"}; + option (google.api.http) = {get: "/attributes/{id}"}; } - rpc GetAttributeGroup(GetAttributeGroupRequest) returns (GetAttributeGroupResponse) { - option (google.api.http) = {get: "/v1/attribute/groups/{id}"}; + // Create Attribute + // Example: + // grpcurl -plaintext -d '{"attribute": {"namespace_id": "namespace_id", "name": "attribute_name", "rule": "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF"}}' localhost:8080 attributes.AttributesService/CreateAttribute + rpc CreateAttribute(CreateAttributeRequest) returns (CreateAttributeResponse) { + option (google.api.http) = { + post: "/attributes" + body: "attribute" + }; } - rpc ListAttributes(ListAttributesRequest) returns (ListAttributesResponse) { - option (google.api.http) = {get: "/v1/attribute/definitions"}; + rpc UpdateAttribute(UpdateAttributeRequest) returns (UpdateAttributeResponse) { + option (google.api.http) = { + post: "/attributes/{id}" + body: "attribute" + }; } - rpc ListAttributeGroups(ListAttributeGroupsRequest) returns (ListAttributeGroupsResponse) { - option (google.api.http) = {get: "/v1/attribute/groups"}; + rpc DeleteAttribute(DeleteAttributeRequest) returns (DeleteAttributeResponse) { + option (google.api.http) = {delete: "/attributes/{id}"}; } - rpc CreateAttribute(CreateAttributeRequest) returns (CreateAttributeResponse) { + /** Attribute Value **/ + rpc GetAttributeValue(GetAttributeValueRequest) returns (GetAttributeValueResponse) { + option (google.api.http) = {get: "/attributes/_/values/{id}"}; + } + + // Create Attribute Value + // Example: + // grpcurl -plaintext -d '{"attribute_id": "attribute_id", "value": {"value": "value"}}' localhost:8080 attributes.AttributesService/CreateValue + rpc CreateAttributeValue(CreateAttributeValueRequest) returns (CreateAttributeValueResponse) { option (google.api.http) = { - post: "/v1/attributes/definitions" - body: "definition" + post: "/attributes/{attribute_id}/values" + body: "value" }; } - rpc CreateAttributeGroup(CreateAttributeGroupRequest) returns (CreateAttributeGroupResponse) { + rpc UpdateAttributeValue(UpdateAttributeValueRequest) returns (UpdateAttributeValueResponse) { option (google.api.http) = { - post: "/v1/attributes/groups" - body: "group" + post: "/attributes/{attribute_id}/values/{id}" + body: "value" }; } - rpc UpdateAttribute(UpdateAttributeRequest) returns (UpdateAttributeResponse) { + rpc DeleteAttributeValue(DeleteAttributeValueRequest) returns (DeleteAttributeValueResponse) { + option (google.api.http) = {delete: "/attributes/_/values/{id}"}; + } + + /* + Assign Key Access Server to Attribute + + grpcurl -plaintext -d '{"attribute_key_access_server": {"attribute_id": "attribute_id", "key_access_server_id": "key_access_server_id"}}' localhost:9000 attributes.AttributesService/AssignKeyAccessServerToAttribute + + Example Request: + { + "attribute_key_access_server": { + "attribute_id": "attribute_id", + "key_access_server_id + } + + Example Response: + { + "attribute_key_access_server": { + "attribute_id": "attribute_id", + "key_access_server_id: "key_access_server_id" + } + */ + rpc AssignKeyAccessServerToAttribute(AssignKeyAccessServerToAttributeRequest) returns (AssignKeyAccessServerToAttributeResponse) { option (google.api.http) = { - post: "/v1/attribute/definitions/{id}" - body: "definition" + post: "/attributes/keyaccessserver/assign" + body: "attribute_key_access_server" }; } - rpc UpdateAttributeGroup(UpdateAttributeGroupRequest) returns (UpdateAttributeGroupResponse) { + /* + Remove Key Access Server to Attribute + + grpcurl -plaintext -d '{"attribute_key_access_server": {"attribute_id": "attribute_id", "key_access_server_id": "key_access_server_id"}}' localhost:9000 attributes.AttributesService/RemeoveKeyAccessServerFromAttribute + + Example Request: + { + "attribute_key_access_server": { + "attribute_id": "attribute_id", + "key_access_server_id + } + + Example Response: + { + "attribute_key_access_server": { + "attribute_id": "attribute_id", + "key_access_server_id: "key_access_server_id" + } + */ + rpc RemoveKeyAccessServerFromAttribute(RemoveKeyAccessServerFromAttributeRequest) returns (RemoveKeyAccessServerFromAttributeResponse) { option (google.api.http) = { - post: "/v1/attribute/groups/{id}" - body: "group" + post: "/attributes/keyaccessserver/remove" + body: "attribute_key_access_server" }; } - rpc DeleteAttribute(DeleteAttributeRequest) returns (DeleteAttributeResponse) { - option (google.api.http) = {delete: "/v1/attribute/definitions/{id}"}; + /* + Assign Key Access Server to Value + + grpcurl -plaintext -d '{"attribute_key_access_server": {"attribute_id": "attribute_id", "key_access_server_id": "key_access_server_id"}}' localhost:9000 attributes.AttributesService/AssignKeyAccessServerToValue + + Example Request: + { + "attribute_key_access_server": { + "value_id": "attribute_id", + "key_access_server_id + } + + Example Response: + { + "attribute_key_access_server": { + "value_id": "attribute_id", + "key_access_server_id: "key_access_server_id" + } + */ + rpc AssignKeyAccessServerToValue(AssignKeyAccessServerToValueRequest) returns (AssignKeyAccessServerToValueResponse) { + option (google.api.http) = { + post: "/attributes/values/keyaccessserver/assign" + body: "value_key_access_server" + }; } - rpc DeleteAttributeGroup(DeleteAttributeGroupRequest) returns (DeleteAttributeGroupResponse) { - option (google.api.http) = {delete: "/v1/attribute/groups/{id}"}; + /* + Remove Key Access Server to Value + grpcurl -plaintext -d '{"value_key_access_server": {"value_id": "value_id", "key_access_server_id": "key_access_server_id"}}' localhost:9000 attributes.AttributesService/RemoveKeyAccessServerFromValue + + Example Request: + { + "value_key_access_server": { + "value_id": "value_id", + "key_access_server_id + } + + Example Response: + { + "value_key_access_server": { + "value_id": "value_id", + "key_access_server_id + */ + rpc RemoveKeyAccessServerFromValue(RemoveKeyAccessServerFromValueRequest) returns (RemoveKeyAccessServerFromValueResponse) { + option (google.api.http) = { + post: "/attributes/values/keyaccessserver/remove" + body: "value_key_access_server" + }; } } diff --git a/proto/authorization/authorization.proto b/proto/authorization/authorization.proto index b04ac18366..8d96585aaf 100644 --- a/proto/authorization/authorization.proto +++ b/proto/authorization/authorization.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package authorization; -import "attributes/attributes.proto"; import "google/api/annotations.proto"; import "google/protobuf/any.proto"; @@ -191,13 +190,13 @@ message GetEntitlementsRequest { message EntityEntitlements { string entity_id = 1; - repeated attributes.AttributeValueReference attribute_value_references = 2; + repeated string attribute_id = 2; } //A logical bucket of attributes belonging to a "Resource" message ResourceAttributes { string id = 1; - repeated attributes.AttributeValueReference attribute_value_references = 2; + repeated string attribute_id = 2; } /* diff --git a/proto/common/common.proto b/proto/common/common.proto index 4d1d110362..b74a3e3970 100644 --- a/proto/common/common.proto +++ b/proto/common/common.proto @@ -2,84 +2,23 @@ syntax = "proto3"; package common; -import "buf/validate/validate.proto"; - -enum PolicyResourceType { - POLICY_RESOURCE_TYPE_UNSPECIFIED = 0; - POLICY_RESOURCE_TYPE_RESOURCE_ENCODING = 1; - POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM = 2; - POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_MAPPING = 3; - POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_GROUP = 4; - POLICY_RESOURCE_TYPE_SUBJECT_ENCODING_MAPPING = 5; - POLICY_RESOURCE_TYPE_KEY_ACCESS = 6; - POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION = 7; - POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP = 8; - POLICY_RESOURCE_TYPE_KEY_ACCESS_GRANTS = 9; -} +import "google/protobuf/timestamp.proto"; // Struct to uniquely identify a resource with optional additional metadata -message ResourceDescriptor { - PolicyResourceType type = 1 [ - (buf.validate.field).enum.defined_only = true, - (buf.validate.field).required = true - ]; - // unique resource identifier - int32 id = 2; - // resource version - int32 version = 3; - // resource name - string name = 4 [(buf.validate.field).required = true]; - // resource namespace; used to partition resources, support by namespace AuthN and enable federation - string namespace = 5 [ - (buf.validate.field).required = true, - (buf.validate.field).string.max_len = 253, - (buf.validate.field).cel = { - id: "namespace_format", - message: "Namespace must be a valid hostname. It should include at least one dot, with each segment (label) starting and ending with an alphanumeric character. Each label must be 1 to 63 characters long, allowing hyphens but not as the first or last character. The top-level domain (the last segment after the final dot) must consist of at least two alphabetic characters.", - expression: "this.matches('^([a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?\\\\.)+[a-zA-Z]{2,}$')" - } - ]; - /* - optional fully qualified name of the resource. FQN is used to support direct references and to eliminate the need - for clients to compose an FQN at run time. - - the fqn may be specific to the resource type. - */ - string fqn = 6; - // optional short description / label - map labels = 7; +message Metadata { + // created_at set by server (entity who created will recorded in an audit event) + google.protobuf.Timestamp created_at = 1; + // updated_at set by server (entity who updated will recorded in an audit event) + google.protobuf.Timestamp updated_at = 2; + // optional short description + map labels = 3; // optional long description - string description = 8; - // optional list of resource dependencies - repeated ResourceDependency dependencies = 9; + string description = 4; } -// Define a resource dependency -message ResourceDependency { - // namespace of referenced resource - string namespace = 1; - // version of reference resource - string version = 2; - //type of dependency - PolicyResourceType type = 3; -} - -// Define a resource selector -message ResourceSelector { - // namespace of referenced resource - string namespace = 1; - // version of reference resource - int32 version = 2; - // Define a label selector - message LabelSelector { - // labels to match a against a resource - map labels = 1; - } - // You can select a resource by name or by labels - oneof selector { - // name of referenced resource - string name = 3; - // labels to match a against a resource - LabelSelector label_selector = 4; - } +message MetadataMutable { + // optional short description + map labels = 3; + // optional long description + string description = 4; } diff --git a/proto/kasregistry/key_access_server_registry.proto b/proto/kasregistry/key_access_server_registry.proto new file mode 100644 index 0000000000..0e81afe01d --- /dev/null +++ b/proto/kasregistry/key_access_server_registry.proto @@ -0,0 +1,282 @@ +syntax = "proto3"; + +package kasregistry; + +import "buf/validate/validate.proto"; +import "common/common.proto"; +import "google/api/annotations.proto"; + +/* + Descriptor for a KAS +*/ +message KeyAccessServer { + string id = 1; + + common.Metadata metadata = 2; + + // Address of a KAS instance + string uri = 3; + + PublicKey public_key = 4; +} + +message KeyAccessServerCreateUpdate { + // Optional metadata for the attribute definition + common.MetadataMutable metadata = 1; + + // Address of a KAS instance + string uri = 2 [(buf.validate.field).required = true]; + + PublicKey public_key = 3 [(buf.validate.field).required = true]; +} + +message PublicKey { + oneof public_key { + // kas public key url - optional since can also be retrieved via public key + string remote = 1 [(buf.validate.field).cel = { + id: "fqn_format", + message: "FQN must start with a valid URL (e.g., 'https://demo.com/') followed by additional segments. Each segment must start and end with an alphanumeric character, can contain hyphens, alphanumeric characters, and slashes.", + expression: "this.matches('^https://[a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?(\\\\.[a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?)*(/.*)?$')" + }]; + + // public key - optional since can also be retrieved via url + string local = 2; + } +} + +message GetKeyAccessServerRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message GetKeyAccessServerResponse { + KeyAccessServer key_access_server = 1; +} + +message ListKeyAccessServersRequest {} +message ListKeyAccessServersResponse { + repeated KeyAccessServer key_access_servers = 1; +} + +message CreateKeyAccessServerRequest { + KeyAccessServerCreateUpdate key_access_server = 1 [(buf.validate.field).required = true]; +} +message CreateKeyAccessServerResponse { + KeyAccessServer key_access_server = 1; +} + +message UpdateKeyAccessServerRequest { + string id = 1 [(buf.validate.field).required = true]; + KeyAccessServerCreateUpdate key_access_server = 2 [(buf.validate.field).required = true]; +} +message UpdateKeyAccessServerResponse { + KeyAccessServer key_access_server = 1; +} + +message DeleteKeyAccessServerRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message DeleteKeyAccessServerResponse { + KeyAccessServer key_access_server = 1; +} + +service KeyAccessServerRegistryService { + /* + Request Examples: + {} + + Response Examples: + { + "key_access_servers": [ + { + "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + "metadata": { + "labels": [], + "created_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "updated_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "description": "test kas instance" + }, + "uri": "kas2", + "public_key": { + "remote": "https://platform.virtru.com/kas1" + } + }, + { + "id": "cad1fc87-1193-456b-a217-d5cdae1fa67a", + "metadata": { + "labels": [], + "created_at": { + "seconds": "1705971990", + "nanos": 303386000 + }, + "updated_at": { + "seconds": "1705971990", + "nanos": 303386000 + }, + "description": "test kas instance" + }, + "uri": "kas3", + "public_key": { + "local": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ6ekNDQVhXZ0F3SUJBZ0lVT1J1VjNhdlU5QUU2enNCNlp4eWxsSHBpNWQ0d0NnWUlLb1pJemowRUF3SXcKUFRFTE1Ba0dBMVVFQmhNQ2RYTXhDekFKQmdOVkJBZ01BbU4wTVNFd0h3WURWUVFLREJoSmJuUmxjbTVsZENCWAphV1JuYVhSeklGQjBlU0JNZEdRd0hoY05NalF3TVRBeU1UWTFOalUyV2hjTk1qVXdNVEF4TVRZMU5qVTJXakE5Ck1Rc3dDUVlEVlFRR0V3SjFjekVMTUFrR0ExVUVDQXdDWTNReElUQWZCZ05WQkFvTUdFbHVkR1Z5Ym1WMElGZHAKWkdkcGRITWdVSFI1SUV4MFpEQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJMVjlmQ0pIRC9rYwpyWHJVSFF3QVp4ME1jMGRQdkxqc0ovb2pFdE1NbjBST2RlT3g4eWd4Z2NRVEZGQXh5Q3RCdWFkaEFkbS9pVkh0CjhnMkVNejVkTzNXalV6QlJNQjBHQTFVZERnUVdCQlFZTmt1aytKSXVSV3luK2JFOHNCaFJ3MjdPVlRBZkJnTlYKSFNNRUdEQVdnQlFZTmt1aytKSXVSV3luK2JFOHNCaFJ3MjdPVlRBUEJnTlZIUk1CQWY4RUJUQURBUUgvTUFvRwpDQ3FHU000OUJBTUNBMGdBTUVVQ0lRQ0FCMmppWWU4QVk2TUo0QURQU1FHRTQ3K2Eza1dGTGNHc0pob1pieHRnClV3SWdjZklJdVBmaDRmYmN2OGNUaTJCbEkzazdzV1B1QW1JRlZyaUkyZDNVeDVRPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" + } + } + ] + } + */ + rpc ListKeyAccessServers(ListKeyAccessServersRequest) returns (ListKeyAccessServersResponse) { + option (google.api.http) = {get: "/key-access-servers"}; + } + + /* + Request Examples: + { + "id": "71eae02f-6837-4980-8a2c-70abf6b68732" + } + + Response Examples: + { + "key_access_server": { + "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + "metadata": { + "labels": [], + "created_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "updated_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "description": "test kas instance" + }, + "uri": "kas2", + "public_key": { + "remote": "https://platform.virtru.com/kas1" + } + } + } + */ + rpc GetKeyAccessServer(GetKeyAccessServerRequest) returns (GetKeyAccessServerResponse) { + option (google.api.http) = {get: "/key-access-servers/{id}"}; + } + + /* + Request Examples: + { + "key_access_server": { + "uri": "kas2", + "public_key": { + "remote": "https://platform.virtru.com/kas1" + } + } + } + + Response Examples: + { + "key_access_server": { + "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + "metadata": { + "labels": [], + "created_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "updated_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "description": "test kas instance" + }, + "uri": "kas2", + "public_key": { + "remote": "https://platform.virtru.com/kas1" + } + } + } + */ + rpc CreateKeyAccessServer(CreateKeyAccessServerRequest) returns (CreateKeyAccessServerResponse) { + option (google.api.http) = { + post: "/key-access-servers" + body: "key_access_server" + }; + } + + /* + Request Examples: + { + "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + "key_access_server": { + "uri": "kas2", + "public_key": { + "remote": "https://platform.virtru.com/kas1" + } + } + } + + Response Examples: + { + "key_access_server": { + "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + "metadata": { + "labels": [], + "created_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "updated_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "description": "test kas instance" + }, + "uri": "kas2", + "public_key": { + "remote": "https://platform.virtru.com/kas1" + } + } + } + */ + rpc UpdateKeyAccessServer(UpdateKeyAccessServerRequest) returns (UpdateKeyAccessServerResponse) { + option (google.api.http) = { + put: "/key-access-servers/{id}" + body: "key_access_server" + }; + } + + /* + Request Examples: + { + "id": "71eae02f-6837-4980-8a2c-70abf6b68732" + } + + Response Examples: + { + "key_access_server": { + "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + "metadata": { + "labels": [], + "created_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "updated_at": { + "seconds": "1705971719", + "nanos": 534029000 + }, + "description": "test kas instance" + }, + "uri": "kas2", + "public_key": { + "remote": "https://platform.virtru.com/kas1" + } + } + } + */ + rpc DeleteKeyAccessServer(DeleteKeyAccessServerRequest) returns (DeleteKeyAccessServerResponse) { + option (google.api.http) = {delete: "/key-access-servers/{id}"}; + } +} diff --git a/proto/keyaccessgrants/key_access_grants.proto b/proto/keyaccessgrants/key_access_grants.proto deleted file mode 100644 index c3a993223b..0000000000 --- a/proto/keyaccessgrants/key_access_grants.proto +++ /dev/null @@ -1,152 +0,0 @@ -syntax = "proto3"; - -package keyaccessgrants; - -import "attributes/attributes.proto"; -import "buf/validate/validate.proto"; -import "common/common.proto"; -import "google/api/annotations.proto"; - -/* - Descriptor for a KAS -*/ -message KeyAccessServer { - common.ResourceDescriptor descriptor = 1; - //Kas Url - string url = 2 [ - (buf.validate.field).required = true, - (buf.validate.field).cel = { - id: "fqn_format", - message: "FQN must start with a valid URL (e.g., 'https://demo.com/') followed by additional segments. Each segment must start and end with an alphanumeric character, can contain hyphens, alphanumeric characters, and slashes.", - expression: "this.matches('^https://[a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?(\\\\.[a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?)*(/.*)?$')" - } - ]; - //public key - optional since can also be retrieved via url - string public_key = 3; -} - -/* - Shareable set of key access grants to help with encryption workflows -*/ -message KeyAccessGrants { - common.ResourceDescriptor descriptor = 1; - /* - List of available key access servers - Example: - - id: KAS-USA-1 - url: http://.... - pubKey=xxx - - .... - */ - repeated KeyAccessServer key_access_servers = 2; - // list of key access grants - repeated KeyAccessGrant key_access_grants = 3; -} - -/* - Defines encryption settings for an attribute and it's values - - Example: All attribute values for attribute "Classification": - attributeDefinition: - descriptor: - fqn: http://demo.com/attr/Classification - type: ALL_OF - attributeValueGrants: - - kasIds: [KAS-USA-1, KAS-GBR-1] - - Example: Per attribute values for attribute "Classification": - attributeDefinition: - descriptor: - fqn: http://demo.com/attr/Classification - type: ALL_OF - attributeValueGrants: - - kasIds: [KAS-USA-1, KAS-GBR-1] - value: - descriptor: - value: TopSecret - - kasIds: [KAS-USA-3, KAS-GBR-2] - value: - descriptor: - value: Secret -*/ -message KeyAccessGrant { - //the attribute associated with this - attributes.AttributeDefinition attribute_definition = 1; - // attribute value settings; if empty then applies to all values - repeated KeyAccessGrantAttributeValue attribute_value_grants = 2; -} - -/* - Define the attribute value -> prioritized key access servers - - Example: Apply to all attribute value for enclosed attribute definition: - kasIds: [KAS-USA-1, KAS-GBR-1] - - Example: Applies to only single attribute value - kasIds: [KAS-USA-1, KAS-GBR-1] - value: - descriptor: - value: FVEY -*/ -message KeyAccessGrantAttributeValue { - // optional - if this is empty - then applies to all attribute values of the enclosed attribute definition - attributes.AttributeValueReference value = 1; - //list of key access server ordered by priority. - repeated string kas_ids = 2; -} - -message GetKeyAccessGrantRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} -message GetKeyAccessGrantResponse { - KeyAccessGrants grants = 1; -} - -message ListKeyAccessGrantsRequest { - common.ResourceSelector selector = 1; -} -message ListKeyAccessGrantsResponse { - repeated KeyAccessGrants grants = 1; -} - -message CreateKeyAccessGrantsRequest { - KeyAccessGrants grants = 1 [(buf.validate.field).required = true]; -} -message CreateKeyAccessGrantsResponse {} - -message UpdateKeyAccessGrantsRequest { - int32 id = 1 [(buf.validate.field).required = true]; - KeyAccessGrants grants = 2 [(buf.validate.field).required = true]; -} -message UpdateKeyAccessGrantsResponse {} - -message DeleteKeyAccessGrantsRequest { - int32 id = 1 [(buf.validate.field).required = true]; -} -message DeleteKeyAccessGrantsResponse {} - -service KeyAccessGrantsService { - rpc ListKeyAccessGrants(ListKeyAccessGrantsRequest) returns (ListKeyAccessGrantsResponse) { - option (google.api.http) = {get: "/v1/grants"}; - } - rpc GetKeyAccessGrant(GetKeyAccessGrantRequest) returns (GetKeyAccessGrantResponse) { - option (google.api.http) = {get: "/v1/grants/{id}"}; - } - - rpc CreateKeyAccessGrants(CreateKeyAccessGrantsRequest) returns (CreateKeyAccessGrantsResponse) { - option (google.api.http) = { - post: "/v1/grants" - body: "grants" - }; - } - rpc UpdateKeyAccessGrants(UpdateKeyAccessGrantsRequest) returns (UpdateKeyAccessGrantsResponse) { - option (google.api.http) = { - put: "/v1/grants/{id}" - body: "grants" - }; - } - - rpc DeleteKeyAccessGrants(DeleteKeyAccessGrantsRequest) returns (DeleteKeyAccessGrantsResponse) { - option (google.api.http) = {delete: "/v1/grants/{id}"}; - } -} diff --git a/proto/namespaces/namespaces.proto b/proto/namespaces/namespaces.proto new file mode 100644 index 0000000000..79e6844d23 --- /dev/null +++ b/proto/namespaces/namespaces.proto @@ -0,0 +1,152 @@ +syntax = "proto3"; + +package namespaces; + +import "buf/validate/validate.proto"; +import "google/api/annotations.proto"; + +message Namespace { + // generated uuid in database + string id = 1; + // used to partition Attribute Definitions, support by namespace AuthN and enable federation + string name = 5 [ + (buf.validate.field).required = true, + (buf.validate.field).string.max_len = 253, + (buf.validate.field).cel = { + id: "namespace_format", + message: "Namespace must be a valid hostname. It should include at least one dot, with each segment (label) starting and ending with an alphanumeric character. Each label must be 1 to 63 characters long, allowing hyphens but not as the first or last character. The top-level domain (the last segment after the final dot) must consist of at least two alphabetic characters.", + expression: "this.matches('^([a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?\\\\.)+[a-zA-Z]{2,}$')" + } + ]; +} + +/* + + Namespace Service Definitions + +*/ + +message GetNamespaceRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message GetNamespaceResponse { + Namespace namespace = 1; +} + +message ListNamespacesRequest {} +message ListNamespacesResponse { + repeated Namespace namespaces = 1; +} + +message CreateNamespaceRequest { + string name = 1 [(buf.validate.field).required = true]; +} +message CreateNamespaceResponse { + Namespace namespace = 1; +} + +message UpdateNamespaceRequest { + string id = 1 [(buf.validate.field).required = true]; + string name = 2 [(buf.validate.field).required = true]; +} +message UpdateNamespaceResponse { + Namespace namespace = 1; +} + +message DeleteNamespaceRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message DeleteNamespaceResponse {} + +service NamespaceService { + rpc GetNamespace(GetNamespaceRequest) returns (GetNamespaceResponse) { + option (google.api.http) = { + get: "/attributes/namespaces/{id}" + }; + } + rpc ListNamespaces(ListNamespacesRequest) returns (ListNamespacesResponse) { + option (google.api.http) = { + get: "/attributes/namespaces" + }; + } + rpc CreateNamespace(CreateNamespaceRequest) returns (CreateNamespaceResponse) { + option (google.api.http) = { + post: "/attributes/namespaces" + }; + } + rpc UpdateNamespace(UpdateNamespaceRequest) returns (UpdateNamespaceResponse) { + option (google.api.http) = { + put: "/attributes/namespaces/{id}" + }; + } + rpc DeleteNamespace(DeleteNamespaceRequest) returns (DeleteNamespaceResponse) { + option (google.api.http) = { + delete: "/attributes/namespaces/{id}" + }; + } +} + +/* + + Namespace Service Examples + + Create a Namespace: + Request: + grpcurl -d '{"name":"example.com"}' -plaintext localhost:9000 namespaces.NamespaceService/CreateNamespace + Response: + { + "namespace": { + "id": "b3d9e3e0-0b0a-4e1a-8b0a-0b0a0b0a0b0a", + "name": "example.com" + } + } + + List Namespaces (assuming 3 have been created) + Request: + grpcurl -plaintext -d '{}' localhost:9000 namespaces.NamespaceService/ListNamespaces + Response: + { + "namespaces": [ + { + "id": "b3d9e3e0-0b0a-4e1a-8b0a-0b0a0b0a0b0a", + "name": "example.com" + }, + { + "id": "b3d9e3e0-0b0a-4e1a-8b0a-0b0a0b0a0b0b", + "name": "loremipsum.com" + }, + { + "id": "b3d9e3e0-0b0a-4e1a-8b0a-0b0a0b0a0b0c", + "name": "helloworld.com" + } + ] + } + + Get a Namespace: + Request: + grpcurl -plaintext -d '{"id":"453b4bb8-1098-480f-ad13-38b5ef903896"}' localhost:9000 namespaces.NamespaceService/GetNamespace + Response: + { + "namespace": { + "id": "b3d9e3e0-0b0a-4e1a-8b0a-0b0a0b0a0b0a", + "name": "example.com" + } + } + + Update a Namespace: + Request: + grpcurl -plaintext -d '{"id":"453b4bb8-1098-480f-ad13-38b5ef903896","name":"example-test.com"}' localhost:9000 namespaces.NamespaceService/UpdateNamespace + Response: + { + "namespace": { + "id": "b3d9e3e0-0b0a-4e1a-8b0a-0b0a0b0a0b0a", + "name": "example.com" + } + } + + Delete a Namespace: + Request: + grpcurl -plaintext -d '{"id":"453b4bb8-1098-480f-ad13-38b5ef903896"}' localhost:9000 namespaces.NamespaceService/DeleteNamespace + Response: + {} +*/ \ No newline at end of file diff --git a/proto/resourcemapping/resource_mapping.proto b/proto/resourcemapping/resource_mapping.proto new file mode 100644 index 0000000000..9304133dbe --- /dev/null +++ b/proto/resourcemapping/resource_mapping.proto @@ -0,0 +1,331 @@ +syntax = "proto3"; + +package resourcemapping; + +import "attributes/attributes.proto"; +import "buf/validate/validate.proto"; +import "common/common.proto"; +import "google/api/annotations.proto"; + +/* + # Resource Mappings (aka Access Control Resource Encodings aka ACRE): Structures supporting Resources and Attributes mappings + + ## Examples + + ### Where + + attributeId is an id of the following attribute + + FQN: http://demo.com/attr/Classification/value/Confidential + UUID: 12345678-1234-1234-1234-123456789012 + + ### Request + + grpcurl -plaintext -d @ localhost:9000 resourcemapping.ResourceMappingService/CreateResourceMapping < value + repeated string subject_values = 5; + + // the operator + SubjectMappingOperatorEnum operator = 6 [ + (buf.validate.field).enum.defined_only = true, + (buf.validate.field).required = true + ]; + //TODO future - add features or idea of pattern/regex like ACSE? like username regex to pull domain from subject attribute + // or treat the subject values as regex patterns applied to subject attribute +} + +message SubjectMappingCreateUpdate { + common.MetadataMutable metadata = 1; + + // Attribute Value to be mapped to + string attribute_value_id = 2; + + // Resource Attribute Key; NOT Attribute Definition Attribute name + string subject_attribute = 3; + + // The list of comparison values for a resource's value + repeated string subject_values = 4; + + // the operator + SubjectMappingOperatorEnum operator = 5 [ + (buf.validate.field).enum.defined_only = true, + (buf.validate.field).required = true + ]; + //TODO future - add features or idea of pattern/regex like ACSE? like username regex to pull domain from subject attribute + // or treat the subject values as regex patterns applied to subject attribute +} + +message GetSubjectMappingRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message GetSubjectMappingResponse { + SubjectMapping subject_mapping = 1; +} + +message ListSubjectMappingsRequest {} +message ListSubjectMappingsResponse { + repeated SubjectMapping subject_mappings = 1; +} + +message CreateSubjectMappingRequest { + SubjectMappingCreateUpdate subject_mapping = 1 [(buf.validate.field).required = true]; +} +message CreateSubjectMappingResponse { + SubjectMapping subject_mapping = 1; +} + +message UpdateSubjectMappingRequest { + string id = 1 [(buf.validate.field).required = true]; + SubjectMappingCreateUpdate subject_mapping = 2 [(buf.validate.field).required = true]; +} +message UpdateSubjectMappingResponse { + SubjectMapping subject_mapping = 1; +} + +message DeleteSubjectMappingRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message DeleteSubjectMappingResponse { + SubjectMapping subject_mapping = 1; +} + +service SubjectMappingService { + rpc ListSubjectMappings(ListSubjectMappingsRequest) returns (ListSubjectMappingsResponse) { + option (google.api.http) = {get: "/subject-mappings"}; + } + rpc GetSubjectMapping(GetSubjectMappingRequest) returns (GetSubjectMappingResponse) { + option (google.api.http) = {get: "/subject-mappings/{id}"}; + } + + rpc CreateSubjectMapping(CreateSubjectMappingRequest) returns (CreateSubjectMappingResponse) { + option (google.api.http) = { + post: "/subject-mappings" + body: "subject_mapping" + }; + } + + rpc UpdateSubjectMapping(UpdateSubjectMappingRequest) returns (UpdateSubjectMappingResponse) { + option (google.api.http) = { + post: "/subject-mappings/{id}" + body: "subject_mapping" + }; + } + + rpc DeleteSubjectMapping(DeleteSubjectMappingRequest) returns (DeleteSubjectMappingResponse) { + option (google.api.http) = {delete: "/subject-mappings/{id}"}; + } +} diff --git a/sdk/acre/acre.pb.go b/sdk/acre/acre.pb.go deleted file mode 100644 index a397162e2b..0000000000 --- a/sdk/acre/acre.pb.go +++ /dev/null @@ -1,2699 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: acre/acre.proto - -package acre - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - attributes "github.com/opentdf/opentdf-v2-poc/sdk/attributes" - common "github.com/opentdf/opentdf-v2-poc/sdk/common" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// A modular set of terms that are the "same". Could be used across resource mappings -type Synonyms struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` - Terms []string `protobuf:"bytes,2,rep,name=terms,proto3" json:"terms,omitempty"` -} - -func (x *Synonyms) Reset() { - *x = Synonyms{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Synonyms) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Synonyms) ProtoMessage() {} - -func (x *Synonyms) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Synonyms.ProtoReflect.Descriptor instead. -func (*Synonyms) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{0} -} - -func (x *Synonyms) GetDescriptor_() *common.ResourceDescriptor { - if x != nil { - return x.Descriptor_ - } - return nil -} - -func (x *Synonyms) GetTerms() []string { - if x != nil { - return x.Terms - } - return nil -} - -// Map one or more domain specific terms (synonyms) to an attribute value by reference. -// -// Example: -// attributeValueRef: ref http://demo.com/attr/Classification/value/Confidential -// synonymRef: -// terms: ["CONFIDENTIAL", "CONTROLLED UNCLASSIFIED", "OFFICIAL-SENSITIVE", "CUI", "C"] -// -// Example 2: -// attributeValueRef: ref to http://demo.com/attr/Classification/Confidential -// synonymRef: -// terms: ["OFFICIAL-SENSITIVE"] -type ResourceMapping struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` - AttributeValueRef *attributes.AttributeValueReference `protobuf:"bytes,2,opt,name=attribute_value_ref,json=attributeValueRef,proto3" json:"attribute_value_ref,omitempty"` - SynonymRef *SynonymRef `protobuf:"bytes,3,opt,name=synonym_ref,json=synonymRef,proto3" json:"synonym_ref,omitempty"` -} - -func (x *ResourceMapping) Reset() { - *x = ResourceMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceMapping) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceMapping) ProtoMessage() {} - -func (x *ResourceMapping) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceMapping.ProtoReflect.Descriptor instead. -func (*ResourceMapping) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{1} -} - -func (x *ResourceMapping) GetDescriptor_() *common.ResourceDescriptor { - if x != nil { - return x.Descriptor_ - } - return nil -} - -func (x *ResourceMapping) GetAttributeValueRef() *attributes.AttributeValueReference { - if x != nil { - return x.AttributeValueRef - } - return nil -} - -func (x *ResourceMapping) GetSynonymRef() *SynonymRef { - if x != nil { - return x.SynonymRef - } - return nil -} - -// represents modeling an resource code/tag as a group . Use if not in the bounds of an attribute -// definition. Otherwise use attributes.AttributeGroup -// -// Example: -// value: NATO -// members: [USA, GBR, etc.] -type ResourceGroup struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` - // group value - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // List of member values - Members []string `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` -} - -func (x *ResourceGroup) Reset() { - *x = ResourceGroup{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceGroup) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceGroup) ProtoMessage() {} - -func (x *ResourceGroup) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceGroup.ProtoReflect.Descriptor instead. -func (*ResourceGroup) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{2} -} - -func (x *ResourceGroup) GetDescriptor_() *common.ResourceDescriptor { - if x != nil { - return x.Descriptor_ - } - return nil -} - -func (x *ResourceGroup) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -func (x *ResourceGroup) GetMembers() []string { - if x != nil { - return x.Members - } - return nil -} - -// Reference to a ResourceMapping, one of descriptor or embedded value -type ResourceMappingRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Ref: - // - // *ResourceMappingRef_Descriptor_ - // *ResourceMappingRef_ResourceMapping - Ref isResourceMappingRef_Ref `protobuf_oneof:"ref"` -} - -func (x *ResourceMappingRef) Reset() { - *x = ResourceMappingRef{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceMappingRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceMappingRef) ProtoMessage() {} - -func (x *ResourceMappingRef) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceMappingRef.ProtoReflect.Descriptor instead. -func (*ResourceMappingRef) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{3} -} - -func (m *ResourceMappingRef) GetRef() isResourceMappingRef_Ref { - if m != nil { - return m.Ref - } - return nil -} - -func (x *ResourceMappingRef) GetDescriptor_() *common.ResourceDescriptor { - if x, ok := x.GetRef().(*ResourceMappingRef_Descriptor_); ok { - return x.Descriptor_ - } - return nil -} - -func (x *ResourceMappingRef) GetResourceMapping() *ResourceMapping { - if x, ok := x.GetRef().(*ResourceMappingRef_ResourceMapping); ok { - return x.ResourceMapping - } - return nil -} - -type isResourceMappingRef_Ref interface { - isResourceMappingRef_Ref() -} - -type ResourceMappingRef_Descriptor_ struct { - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3,oneof"` -} - -type ResourceMappingRef_ResourceMapping struct { - ResourceMapping *ResourceMapping `protobuf:"bytes,2,opt,name=resource_mapping,json=resourceMapping,proto3,oneof"` -} - -func (*ResourceMappingRef_Descriptor_) isResourceMappingRef_Ref() {} - -func (*ResourceMappingRef_ResourceMapping) isResourceMappingRef_Ref() {} - -// Reference to a Synonyms, one of descriptor or embedded value -type SynonymRef struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to Ref: - // - // *SynonymRef_Descriptor_ - // *SynonymRef_Synonyms - Ref isSynonymRef_Ref `protobuf_oneof:"ref"` -} - -func (x *SynonymRef) Reset() { - *x = SynonymRef{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SynonymRef) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SynonymRef) ProtoMessage() {} - -func (x *SynonymRef) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SynonymRef.ProtoReflect.Descriptor instead. -func (*SynonymRef) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{4} -} - -func (m *SynonymRef) GetRef() isSynonymRef_Ref { - if m != nil { - return m.Ref - } - return nil -} - -func (x *SynonymRef) GetDescriptor_() *common.ResourceDescriptor { - if x, ok := x.GetRef().(*SynonymRef_Descriptor_); ok { - return x.Descriptor_ - } - return nil -} - -func (x *SynonymRef) GetSynonyms() *Synonyms { - if x, ok := x.GetRef().(*SynonymRef_Synonyms); ok { - return x.Synonyms - } - return nil -} - -type isSynonymRef_Ref interface { - isSynonymRef_Ref() -} - -type SynonymRef_Descriptor_ struct { - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3,oneof"` -} - -type SynonymRef_Synonyms struct { - Synonyms *Synonyms `protobuf:"bytes,2,opt,name=synonyms,proto3,oneof"` -} - -func (*SynonymRef_Descriptor_) isSynonymRef_Ref() {} - -func (*SynonymRef_Synonyms) isSynonymRef_Ref() {} - -type ResourceEncodingRequestOptions struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` -} - -func (x *ResourceEncodingRequestOptions) Reset() { - *x = ResourceEncodingRequestOptions{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceEncodingRequestOptions) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceEncodingRequestOptions) ProtoMessage() {} - -func (x *ResourceEncodingRequestOptions) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceEncodingRequestOptions.ProtoReflect.Descriptor instead. -func (*ResourceEncodingRequestOptions) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{5} -} - -func (x *ResourceEncodingRequestOptions) GetDescriptor_() *common.ResourceDescriptor { - if x != nil { - return x.Descriptor_ - } - return nil -} - -type ListResourceMappingsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Selector *common.ResourceSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` -} - -func (x *ListResourceMappingsRequest) Reset() { - *x = ListResourceMappingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResourceMappingsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResourceMappingsRequest) ProtoMessage() {} - -func (x *ListResourceMappingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResourceMappingsRequest.ProtoReflect.Descriptor instead. -func (*ListResourceMappingsRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{6} -} - -func (x *ListResourceMappingsRequest) GetSelector() *common.ResourceSelector { - if x != nil { - return x.Selector - } - return nil -} - -type ListResourceMappingsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Mappings []*ResourceMapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings,omitempty"` -} - -func (x *ListResourceMappingsResponse) Reset() { - *x = ListResourceMappingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResourceMappingsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResourceMappingsResponse) ProtoMessage() {} - -func (x *ListResourceMappingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResourceMappingsResponse.ProtoReflect.Descriptor instead. -func (*ListResourceMappingsResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{7} -} - -func (x *ListResourceMappingsResponse) GetMappings() []*ResourceMapping { - if x != nil { - return x.Mappings - } - return nil -} - -type GetResourceMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetResourceMappingRequest) Reset() { - *x = GetResourceMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetResourceMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetResourceMappingRequest) ProtoMessage() {} - -func (x *GetResourceMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetResourceMappingRequest.ProtoReflect.Descriptor instead. -func (*GetResourceMappingRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{8} -} - -func (x *GetResourceMappingRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type GetResourceMappingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Mapping *ResourceMapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` -} - -func (x *GetResourceMappingResponse) Reset() { - *x = GetResourceMappingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetResourceMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetResourceMappingResponse) ProtoMessage() {} - -func (x *GetResourceMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetResourceMappingResponse.ProtoReflect.Descriptor instead. -func (*GetResourceMappingResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{9} -} - -func (x *GetResourceMappingResponse) GetMapping() *ResourceMapping { - if x != nil { - return x.Mapping - } - return nil -} - -type CreateResourceMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Mapping *ResourceMapping `protobuf:"bytes,1,opt,name=mapping,proto3" json:"mapping,omitempty"` -} - -func (x *CreateResourceMappingRequest) Reset() { - *x = CreateResourceMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateResourceMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateResourceMappingRequest) ProtoMessage() {} - -func (x *CreateResourceMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateResourceMappingRequest.ProtoReflect.Descriptor instead. -func (*CreateResourceMappingRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{10} -} - -func (x *CreateResourceMappingRequest) GetMapping() *ResourceMapping { - if x != nil { - return x.Mapping - } - return nil -} - -type CreateResourceMappingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreateResourceMappingResponse) Reset() { - *x = CreateResourceMappingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateResourceMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateResourceMappingResponse) ProtoMessage() {} - -func (x *CreateResourceMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateResourceMappingResponse.ProtoReflect.Descriptor instead. -func (*CreateResourceMappingResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{11} -} - -type UpdateResourceMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Mapping *ResourceMapping `protobuf:"bytes,2,opt,name=mapping,proto3" json:"mapping,omitempty"` -} - -func (x *UpdateResourceMappingRequest) Reset() { - *x = UpdateResourceMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateResourceMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResourceMappingRequest) ProtoMessage() {} - -func (x *UpdateResourceMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateResourceMappingRequest.ProtoReflect.Descriptor instead. -func (*UpdateResourceMappingRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{12} -} - -func (x *UpdateResourceMappingRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *UpdateResourceMappingRequest) GetMapping() *ResourceMapping { - if x != nil { - return x.Mapping - } - return nil -} - -type UpdateResourceMappingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateResourceMappingResponse) Reset() { - *x = UpdateResourceMappingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateResourceMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResourceMappingResponse) ProtoMessage() {} - -func (x *UpdateResourceMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateResourceMappingResponse.ProtoReflect.Descriptor instead. -func (*UpdateResourceMappingResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{13} -} - -type DeleteResourceMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteResourceMappingRequest) Reset() { - *x = DeleteResourceMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResourceMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResourceMappingRequest) ProtoMessage() {} - -func (x *DeleteResourceMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteResourceMappingRequest.ProtoReflect.Descriptor instead. -func (*DeleteResourceMappingRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{14} -} - -func (x *DeleteResourceMappingRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type DeleteResourceMappingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteResourceMappingResponse) Reset() { - *x = DeleteResourceMappingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResourceMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResourceMappingResponse) ProtoMessage() {} - -func (x *DeleteResourceMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteResourceMappingResponse.ProtoReflect.Descriptor instead. -func (*DeleteResourceMappingResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{15} -} - -type ListResourceSynonymsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Selector *common.ResourceSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` -} - -func (x *ListResourceSynonymsRequest) Reset() { - *x = ListResourceSynonymsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResourceSynonymsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResourceSynonymsRequest) ProtoMessage() {} - -func (x *ListResourceSynonymsRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResourceSynonymsRequest.ProtoReflect.Descriptor instead. -func (*ListResourceSynonymsRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{16} -} - -func (x *ListResourceSynonymsRequest) GetSelector() *common.ResourceSelector { - if x != nil { - return x.Selector - } - return nil -} - -type ListResourceSynonymsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Synonyms []*Synonyms `protobuf:"bytes,1,rep,name=synonyms,proto3" json:"synonyms,omitempty"` -} - -func (x *ListResourceSynonymsResponse) Reset() { - *x = ListResourceSynonymsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResourceSynonymsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResourceSynonymsResponse) ProtoMessage() {} - -func (x *ListResourceSynonymsResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResourceSynonymsResponse.ProtoReflect.Descriptor instead. -func (*ListResourceSynonymsResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{17} -} - -func (x *ListResourceSynonymsResponse) GetSynonyms() []*Synonyms { - if x != nil { - return x.Synonyms - } - return nil -} - -type GetResourceSynonymRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetResourceSynonymRequest) Reset() { - *x = GetResourceSynonymRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetResourceSynonymRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetResourceSynonymRequest) ProtoMessage() {} - -func (x *GetResourceSynonymRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetResourceSynonymRequest.ProtoReflect.Descriptor instead. -func (*GetResourceSynonymRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{18} -} - -func (x *GetResourceSynonymRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type GetResourceSynonymResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Synonym *Synonyms `protobuf:"bytes,1,opt,name=synonym,proto3" json:"synonym,omitempty"` -} - -func (x *GetResourceSynonymResponse) Reset() { - *x = GetResourceSynonymResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetResourceSynonymResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetResourceSynonymResponse) ProtoMessage() {} - -func (x *GetResourceSynonymResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetResourceSynonymResponse.ProtoReflect.Descriptor instead. -func (*GetResourceSynonymResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{19} -} - -func (x *GetResourceSynonymResponse) GetSynonym() *Synonyms { - if x != nil { - return x.Synonym - } - return nil -} - -type CreateResourceSynonymRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Synonym *Synonyms `protobuf:"bytes,1,opt,name=synonym,proto3" json:"synonym,omitempty"` -} - -func (x *CreateResourceSynonymRequest) Reset() { - *x = CreateResourceSynonymRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateResourceSynonymRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateResourceSynonymRequest) ProtoMessage() {} - -func (x *CreateResourceSynonymRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateResourceSynonymRequest.ProtoReflect.Descriptor instead. -func (*CreateResourceSynonymRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{20} -} - -func (x *CreateResourceSynonymRequest) GetSynonym() *Synonyms { - if x != nil { - return x.Synonym - } - return nil -} - -type CreateResourceSynonymResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreateResourceSynonymResponse) Reset() { - *x = CreateResourceSynonymResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateResourceSynonymResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateResourceSynonymResponse) ProtoMessage() {} - -func (x *CreateResourceSynonymResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateResourceSynonymResponse.ProtoReflect.Descriptor instead. -func (*CreateResourceSynonymResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{21} -} - -type UpdateResourceSynonymRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Synonym *Synonyms `protobuf:"bytes,2,opt,name=synonym,proto3" json:"synonym,omitempty"` -} - -func (x *UpdateResourceSynonymRequest) Reset() { - *x = UpdateResourceSynonymRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateResourceSynonymRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResourceSynonymRequest) ProtoMessage() {} - -func (x *UpdateResourceSynonymRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateResourceSynonymRequest.ProtoReflect.Descriptor instead. -func (*UpdateResourceSynonymRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{22} -} - -func (x *UpdateResourceSynonymRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *UpdateResourceSynonymRequest) GetSynonym() *Synonyms { - if x != nil { - return x.Synonym - } - return nil -} - -type UpdateResourceSynonymResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateResourceSynonymResponse) Reset() { - *x = UpdateResourceSynonymResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateResourceSynonymResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResourceSynonymResponse) ProtoMessage() {} - -func (x *UpdateResourceSynonymResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateResourceSynonymResponse.ProtoReflect.Descriptor instead. -func (*UpdateResourceSynonymResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{23} -} - -type DeleteResourceSynonymRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteResourceSynonymRequest) Reset() { - *x = DeleteResourceSynonymRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResourceSynonymRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResourceSynonymRequest) ProtoMessage() {} - -func (x *DeleteResourceSynonymRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteResourceSynonymRequest.ProtoReflect.Descriptor instead. -func (*DeleteResourceSynonymRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{24} -} - -func (x *DeleteResourceSynonymRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type DeleteResourceSynonymResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteResourceSynonymResponse) Reset() { - *x = DeleteResourceSynonymResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResourceSynonymResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResourceSynonymResponse) ProtoMessage() {} - -func (x *DeleteResourceSynonymResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteResourceSynonymResponse.ProtoReflect.Descriptor instead. -func (*DeleteResourceSynonymResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{25} -} - -// Resource Groups -type ListResourceGroupsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Selector *common.ResourceSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` -} - -func (x *ListResourceGroupsRequest) Reset() { - *x = ListResourceGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResourceGroupsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResourceGroupsRequest) ProtoMessage() {} - -func (x *ListResourceGroupsRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResourceGroupsRequest.ProtoReflect.Descriptor instead. -func (*ListResourceGroupsRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{26} -} - -func (x *ListResourceGroupsRequest) GetSelector() *common.ResourceSelector { - if x != nil { - return x.Selector - } - return nil -} - -type ListResourceGroupsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Groups []*ResourceGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` -} - -func (x *ListResourceGroupsResponse) Reset() { - *x = ListResourceGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[27] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListResourceGroupsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListResourceGroupsResponse) ProtoMessage() {} - -func (x *ListResourceGroupsResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[27] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListResourceGroupsResponse.ProtoReflect.Descriptor instead. -func (*ListResourceGroupsResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{27} -} - -func (x *ListResourceGroupsResponse) GetGroups() []*ResourceGroup { - if x != nil { - return x.Groups - } - return nil -} - -type GetResourceGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetResourceGroupRequest) Reset() { - *x = GetResourceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[28] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetResourceGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetResourceGroupRequest) ProtoMessage() {} - -func (x *GetResourceGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[28] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetResourceGroupRequest.ProtoReflect.Descriptor instead. -func (*GetResourceGroupRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{28} -} - -func (x *GetResourceGroupRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type GetResourceGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *ResourceGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *GetResourceGroupResponse) Reset() { - *x = GetResourceGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[29] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetResourceGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetResourceGroupResponse) ProtoMessage() {} - -func (x *GetResourceGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[29] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetResourceGroupResponse.ProtoReflect.Descriptor instead. -func (*GetResourceGroupResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{29} -} - -func (x *GetResourceGroupResponse) GetGroup() *ResourceGroup { - if x != nil { - return x.Group - } - return nil -} - -type CreateResourceGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Group *ResourceGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *CreateResourceGroupRequest) Reset() { - *x = CreateResourceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[30] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateResourceGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateResourceGroupRequest) ProtoMessage() {} - -func (x *CreateResourceGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[30] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateResourceGroupRequest.ProtoReflect.Descriptor instead. -func (*CreateResourceGroupRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{30} -} - -func (x *CreateResourceGroupRequest) GetGroup() *ResourceGroup { - if x != nil { - return x.Group - } - return nil -} - -type CreateResourceGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreateResourceGroupResponse) Reset() { - *x = CreateResourceGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[31] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateResourceGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateResourceGroupResponse) ProtoMessage() {} - -func (x *CreateResourceGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[31] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateResourceGroupResponse.ProtoReflect.Descriptor instead. -func (*CreateResourceGroupResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{31} -} - -type UpdateResourceGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Group *ResourceGroup `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *UpdateResourceGroupRequest) Reset() { - *x = UpdateResourceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[32] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateResourceGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResourceGroupRequest) ProtoMessage() {} - -func (x *UpdateResourceGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[32] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateResourceGroupRequest.ProtoReflect.Descriptor instead. -func (*UpdateResourceGroupRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{32} -} - -func (x *UpdateResourceGroupRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *UpdateResourceGroupRequest) GetGroup() *ResourceGroup { - if x != nil { - return x.Group - } - return nil -} - -type UpdateResourceGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateResourceGroupResponse) Reset() { - *x = UpdateResourceGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[33] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateResourceGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateResourceGroupResponse) ProtoMessage() {} - -func (x *UpdateResourceGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[33] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateResourceGroupResponse.ProtoReflect.Descriptor instead. -func (*UpdateResourceGroupResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{33} -} - -type DeleteResourceGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteResourceGroupRequest) Reset() { - *x = DeleteResourceGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[34] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResourceGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResourceGroupRequest) ProtoMessage() {} - -func (x *DeleteResourceGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[34] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteResourceGroupRequest.ProtoReflect.Descriptor instead. -func (*DeleteResourceGroupRequest) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{34} -} - -func (x *DeleteResourceGroupRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type DeleteResourceGroupResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteResourceGroupResponse) Reset() { - *x = DeleteResourceGroupResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acre_acre_proto_msgTypes[35] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteResourceGroupResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteResourceGroupResponse) ProtoMessage() {} - -func (x *DeleteResourceGroupResponse) ProtoReflect() protoreflect.Message { - mi := &file_acre_acre_proto_msgTypes[35] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteResourceGroupResponse.ProtoReflect.Descriptor instead. -func (*DeleteResourceGroupResponse) Descriptor() ([]byte, []int) { - return file_acre_acre_proto_rawDescGZIP(), []int{35} -} - -var File_acre_acre_proto protoreflect.FileDescriptor - -var file_acre_acre_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x61, 0x63, 0x72, 0x65, 0x2f, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x04, 0x61, 0x63, 0x72, 0x65, 0x1a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5c, 0x0a, 0x08, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, - 0x12, 0x3a, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x65, 0x72, - 0x6d, 0x73, 0x22, 0xd5, 0x01, 0x0a, 0x0f, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x3a, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x12, 0x53, 0x0a, 0x13, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x23, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x11, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x66, 0x12, 0x31, 0x0a, 0x0b, 0x73, 0x79, 0x6e, 0x6f, 0x6e, - 0x79, 0x6d, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, - 0x63, 0x72, 0x65, 0x2e, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x66, 0x52, 0x0a, - 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x66, 0x22, 0x7b, 0x0a, 0x0d, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3a, 0x0a, 0x0a, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, - 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x66, 0x12, 0x3c, - 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x48, 0x00, - 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x42, 0x0a, 0x10, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, - 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, 0x7f, 0x0a, 0x0a, 0x53, 0x79, 0x6e, 0x6f, 0x6e, - 0x79, 0x6d, 0x52, 0x65, 0x66, 0x12, 0x3c, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x12, 0x2c, 0x0a, 0x08, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x53, 0x79, 0x6e, - 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x48, 0x00, 0x52, 0x08, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, - 0x73, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, 0x5c, 0x0a, 0x1e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x0a, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x22, 0x53, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, - 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x51, 0x0a, 0x1c, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x31, 0x0a, 0x08, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, - 0x61, 0x63, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x33, - 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x2f, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x22, 0x57, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, - 0x01, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1f, 0x0a, 0x1d, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x6f, 0x0a, 0x1c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x37, 0x0a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x42, 0x06, 0xba, 0x48, - 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1f, 0x0a, - 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, - 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, - 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1f, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x4a, 0x0a, 0x1c, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, - 0x6e, 0x79, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, - 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x52, 0x08, - 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x22, 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x46, 0x0a, - 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, - 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x73, - 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, - 0x63, 0x72, 0x65, 0x2e, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x52, 0x07, 0x73, 0x79, - 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x22, 0x50, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x53, 0x79, - 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, - 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x22, 0x1f, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x68, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, - 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x30, 0x0a, 0x07, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, - 0x73, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x07, 0x73, 0x79, 0x6e, 0x6f, 0x6e, - 0x79, 0x6d, 0x22, 0x1f, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, - 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1f, 0x0a, 0x1d, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, - 0x6f, 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x19, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, - 0x49, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, - 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x61, 0x63, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x31, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x45, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x22, 0x4f, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x31, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x1d, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, - 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x63, 0x72, 0x65, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x06, - 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x1d, 0x0a, - 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x0a, 0x1a, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x32, 0xcf, 0x10, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, - 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x63, 0x72, 0x65, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, - 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x2e, 0x61, - 0x63, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x61, 0x63, 0x72, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x91, 0x01, 0x0a, - 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x63, 0x72, - 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x07, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, - 0x12, 0x96, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x22, 0x2e, 0x61, 0x63, 0x72, - 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, - 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x07, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x22, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x15, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x12, 0x22, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x25, 0x2a, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, - 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x14, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, - 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, - 0x73, 0x12, 0x84, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x12, 0x1f, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, - 0x79, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x63, 0x72, 0x65, - 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, - 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x25, 0x12, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, - 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x6e, 0x6f, 0x6e, - 0x79, 0x6d, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x91, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, - 0x79, 0x6d, 0x12, 0x22, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, - 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x29, 0x3a, 0x07, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x22, 0x1e, 0x2f, 0x76, - 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, 0x12, 0x96, 0x01, 0x0a, - 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, - 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x12, 0x22, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, - 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x63, 0x72, - 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x3a, 0x07, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, - 0x22, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8d, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x12, - 0x22, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, - 0x2a, 0x23, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x73, 0x79, 0x6e, 0x6f, 0x6e, 0x79, 0x6d, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x7d, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x1f, 0x2e, 0x61, 0x63, - 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, - 0x63, 0x72, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, - 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x12, 0x7c, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x1d, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, - 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x47, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x12, - 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x61, 0x63, 0x72, - 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, - 0x63, 0x72, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x3a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x1c, - 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x8c, 0x01, 0x0a, - 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x2a, 0x3a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, - 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, - 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x85, 0x01, 0x0a, 0x13, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x20, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, - 0x2a, 0x21, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x42, 0x71, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x72, 0x65, 0x42, - 0x09, 0x41, 0x63, 0x72, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, - 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, 0x76, 0x32, 0x2d, 0x70, 0x6f, 0x63, 0x2f, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x63, 0x72, 0x65, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, - 0x04, 0x41, 0x63, 0x72, 0x65, 0xca, 0x02, 0x04, 0x41, 0x63, 0x72, 0x65, 0xe2, 0x02, 0x10, 0x41, - 0x63, 0x72, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x04, 0x41, 0x63, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_acre_acre_proto_rawDescOnce sync.Once - file_acre_acre_proto_rawDescData = file_acre_acre_proto_rawDesc -) - -func file_acre_acre_proto_rawDescGZIP() []byte { - file_acre_acre_proto_rawDescOnce.Do(func() { - file_acre_acre_proto_rawDescData = protoimpl.X.CompressGZIP(file_acre_acre_proto_rawDescData) - }) - return file_acre_acre_proto_rawDescData -} - -var file_acre_acre_proto_msgTypes = make([]protoimpl.MessageInfo, 36) -var file_acre_acre_proto_goTypes = []interface{}{ - (*Synonyms)(nil), // 0: acre.Synonyms - (*ResourceMapping)(nil), // 1: acre.ResourceMapping - (*ResourceGroup)(nil), // 2: acre.ResourceGroup - (*ResourceMappingRef)(nil), // 3: acre.ResourceMappingRef - (*SynonymRef)(nil), // 4: acre.SynonymRef - (*ResourceEncodingRequestOptions)(nil), // 5: acre.ResourceEncodingRequestOptions - (*ListResourceMappingsRequest)(nil), // 6: acre.ListResourceMappingsRequest - (*ListResourceMappingsResponse)(nil), // 7: acre.ListResourceMappingsResponse - (*GetResourceMappingRequest)(nil), // 8: acre.GetResourceMappingRequest - (*GetResourceMappingResponse)(nil), // 9: acre.GetResourceMappingResponse - (*CreateResourceMappingRequest)(nil), // 10: acre.CreateResourceMappingRequest - (*CreateResourceMappingResponse)(nil), // 11: acre.CreateResourceMappingResponse - (*UpdateResourceMappingRequest)(nil), // 12: acre.UpdateResourceMappingRequest - (*UpdateResourceMappingResponse)(nil), // 13: acre.UpdateResourceMappingResponse - (*DeleteResourceMappingRequest)(nil), // 14: acre.DeleteResourceMappingRequest - (*DeleteResourceMappingResponse)(nil), // 15: acre.DeleteResourceMappingResponse - (*ListResourceSynonymsRequest)(nil), // 16: acre.ListResourceSynonymsRequest - (*ListResourceSynonymsResponse)(nil), // 17: acre.ListResourceSynonymsResponse - (*GetResourceSynonymRequest)(nil), // 18: acre.GetResourceSynonymRequest - (*GetResourceSynonymResponse)(nil), // 19: acre.GetResourceSynonymResponse - (*CreateResourceSynonymRequest)(nil), // 20: acre.CreateResourceSynonymRequest - (*CreateResourceSynonymResponse)(nil), // 21: acre.CreateResourceSynonymResponse - (*UpdateResourceSynonymRequest)(nil), // 22: acre.UpdateResourceSynonymRequest - (*UpdateResourceSynonymResponse)(nil), // 23: acre.UpdateResourceSynonymResponse - (*DeleteResourceSynonymRequest)(nil), // 24: acre.DeleteResourceSynonymRequest - (*DeleteResourceSynonymResponse)(nil), // 25: acre.DeleteResourceSynonymResponse - (*ListResourceGroupsRequest)(nil), // 26: acre.ListResourceGroupsRequest - (*ListResourceGroupsResponse)(nil), // 27: acre.ListResourceGroupsResponse - (*GetResourceGroupRequest)(nil), // 28: acre.GetResourceGroupRequest - (*GetResourceGroupResponse)(nil), // 29: acre.GetResourceGroupResponse - (*CreateResourceGroupRequest)(nil), // 30: acre.CreateResourceGroupRequest - (*CreateResourceGroupResponse)(nil), // 31: acre.CreateResourceGroupResponse - (*UpdateResourceGroupRequest)(nil), // 32: acre.UpdateResourceGroupRequest - (*UpdateResourceGroupResponse)(nil), // 33: acre.UpdateResourceGroupResponse - (*DeleteResourceGroupRequest)(nil), // 34: acre.DeleteResourceGroupRequest - (*DeleteResourceGroupResponse)(nil), // 35: acre.DeleteResourceGroupResponse - (*common.ResourceDescriptor)(nil), // 36: common.ResourceDescriptor - (*attributes.AttributeValueReference)(nil), // 37: attributes.AttributeValueReference - (*common.ResourceSelector)(nil), // 38: common.ResourceSelector -} -var file_acre_acre_proto_depIdxs = []int32{ - 36, // 0: acre.Synonyms.descriptor:type_name -> common.ResourceDescriptor - 36, // 1: acre.ResourceMapping.descriptor:type_name -> common.ResourceDescriptor - 37, // 2: acre.ResourceMapping.attribute_value_ref:type_name -> attributes.AttributeValueReference - 4, // 3: acre.ResourceMapping.synonym_ref:type_name -> acre.SynonymRef - 36, // 4: acre.ResourceGroup.descriptor:type_name -> common.ResourceDescriptor - 36, // 5: acre.ResourceMappingRef.descriptor:type_name -> common.ResourceDescriptor - 1, // 6: acre.ResourceMappingRef.resource_mapping:type_name -> acre.ResourceMapping - 36, // 7: acre.SynonymRef.descriptor:type_name -> common.ResourceDescriptor - 0, // 8: acre.SynonymRef.synonyms:type_name -> acre.Synonyms - 36, // 9: acre.ResourceEncodingRequestOptions.descriptor:type_name -> common.ResourceDescriptor - 38, // 10: acre.ListResourceMappingsRequest.selector:type_name -> common.ResourceSelector - 1, // 11: acre.ListResourceMappingsResponse.mappings:type_name -> acre.ResourceMapping - 1, // 12: acre.GetResourceMappingResponse.mapping:type_name -> acre.ResourceMapping - 1, // 13: acre.CreateResourceMappingRequest.mapping:type_name -> acre.ResourceMapping - 1, // 14: acre.UpdateResourceMappingRequest.mapping:type_name -> acre.ResourceMapping - 38, // 15: acre.ListResourceSynonymsRequest.selector:type_name -> common.ResourceSelector - 0, // 16: acre.ListResourceSynonymsResponse.synonyms:type_name -> acre.Synonyms - 0, // 17: acre.GetResourceSynonymResponse.synonym:type_name -> acre.Synonyms - 0, // 18: acre.CreateResourceSynonymRequest.synonym:type_name -> acre.Synonyms - 0, // 19: acre.UpdateResourceSynonymRequest.synonym:type_name -> acre.Synonyms - 38, // 20: acre.ListResourceGroupsRequest.selector:type_name -> common.ResourceSelector - 2, // 21: acre.ListResourceGroupsResponse.groups:type_name -> acre.ResourceGroup - 2, // 22: acre.GetResourceGroupResponse.group:type_name -> acre.ResourceGroup - 2, // 23: acre.CreateResourceGroupRequest.group:type_name -> acre.ResourceGroup - 2, // 24: acre.UpdateResourceGroupRequest.group:type_name -> acre.ResourceGroup - 6, // 25: acre.ResourceEncodingService.ListResourceMappings:input_type -> acre.ListResourceMappingsRequest - 8, // 26: acre.ResourceEncodingService.GetResourceMapping:input_type -> acre.GetResourceMappingRequest - 10, // 27: acre.ResourceEncodingService.CreateResourceMapping:input_type -> acre.CreateResourceMappingRequest - 12, // 28: acre.ResourceEncodingService.UpdateResourceMapping:input_type -> acre.UpdateResourceMappingRequest - 14, // 29: acre.ResourceEncodingService.DeleteResourceMapping:input_type -> acre.DeleteResourceMappingRequest - 16, // 30: acre.ResourceEncodingService.ListResourceSynonyms:input_type -> acre.ListResourceSynonymsRequest - 18, // 31: acre.ResourceEncodingService.GetResourceSynonym:input_type -> acre.GetResourceSynonymRequest - 20, // 32: acre.ResourceEncodingService.CreateResourceSynonym:input_type -> acre.CreateResourceSynonymRequest - 22, // 33: acre.ResourceEncodingService.UpdateResourceSynonym:input_type -> acre.UpdateResourceSynonymRequest - 24, // 34: acre.ResourceEncodingService.DeleteResourceSynonym:input_type -> acre.DeleteResourceSynonymRequest - 26, // 35: acre.ResourceEncodingService.ListResourceGroups:input_type -> acre.ListResourceGroupsRequest - 28, // 36: acre.ResourceEncodingService.GetResourceGroup:input_type -> acre.GetResourceGroupRequest - 30, // 37: acre.ResourceEncodingService.CreateResourceGroup:input_type -> acre.CreateResourceGroupRequest - 32, // 38: acre.ResourceEncodingService.UpdateResourceGroup:input_type -> acre.UpdateResourceGroupRequest - 34, // 39: acre.ResourceEncodingService.DeleteResourceGroup:input_type -> acre.DeleteResourceGroupRequest - 7, // 40: acre.ResourceEncodingService.ListResourceMappings:output_type -> acre.ListResourceMappingsResponse - 9, // 41: acre.ResourceEncodingService.GetResourceMapping:output_type -> acre.GetResourceMappingResponse - 11, // 42: acre.ResourceEncodingService.CreateResourceMapping:output_type -> acre.CreateResourceMappingResponse - 13, // 43: acre.ResourceEncodingService.UpdateResourceMapping:output_type -> acre.UpdateResourceMappingResponse - 15, // 44: acre.ResourceEncodingService.DeleteResourceMapping:output_type -> acre.DeleteResourceMappingResponse - 17, // 45: acre.ResourceEncodingService.ListResourceSynonyms:output_type -> acre.ListResourceSynonymsResponse - 19, // 46: acre.ResourceEncodingService.GetResourceSynonym:output_type -> acre.GetResourceSynonymResponse - 21, // 47: acre.ResourceEncodingService.CreateResourceSynonym:output_type -> acre.CreateResourceSynonymResponse - 23, // 48: acre.ResourceEncodingService.UpdateResourceSynonym:output_type -> acre.UpdateResourceSynonymResponse - 25, // 49: acre.ResourceEncodingService.DeleteResourceSynonym:output_type -> acre.DeleteResourceSynonymResponse - 27, // 50: acre.ResourceEncodingService.ListResourceGroups:output_type -> acre.ListResourceGroupsResponse - 29, // 51: acre.ResourceEncodingService.GetResourceGroup:output_type -> acre.GetResourceGroupResponse - 31, // 52: acre.ResourceEncodingService.CreateResourceGroup:output_type -> acre.CreateResourceGroupResponse - 33, // 53: acre.ResourceEncodingService.UpdateResourceGroup:output_type -> acre.UpdateResourceGroupResponse - 35, // 54: acre.ResourceEncodingService.DeleteResourceGroup:output_type -> acre.DeleteResourceGroupResponse - 40, // [40:55] is the sub-list for method output_type - 25, // [25:40] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name -} - -func init() { file_acre_acre_proto_init() } -func file_acre_acre_proto_init() { - if File_acre_acre_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_acre_acre_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Synonyms); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceGroup); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceMappingRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SynonymRef); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceEncodingRequestOptions); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResourceMappingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResourceMappingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourceMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourceMappingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceMappingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceMappingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceMappingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResourceSynonymsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResourceSynonymsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourceSynonymRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourceSynonymResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceSynonymRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceSynonymResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceSynonymRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceSynonymResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceSynonymRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceSynonymResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResourceGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResourceGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResourceGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateResourceGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateResourceGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acre_acre_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteResourceGroupResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_acre_acre_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*ResourceMappingRef_Descriptor_)(nil), - (*ResourceMappingRef_ResourceMapping)(nil), - } - file_acre_acre_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*SynonymRef_Descriptor_)(nil), - (*SynonymRef_Synonyms)(nil), - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_acre_acre_proto_rawDesc, - NumEnums: 0, - NumMessages: 36, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_acre_acre_proto_goTypes, - DependencyIndexes: file_acre_acre_proto_depIdxs, - MessageInfos: file_acre_acre_proto_msgTypes, - }.Build() - File_acre_acre_proto = out.File - file_acre_acre_proto_rawDesc = nil - file_acre_acre_proto_goTypes = nil - file_acre_acre_proto_depIdxs = nil -} diff --git a/sdk/acre/acre.pb.gw.go b/sdk/acre/acre.pb.gw.go deleted file mode 100644 index 4cca45fda4..0000000000 --- a/sdk/acre/acre.pb.gw.go +++ /dev/null @@ -1,1577 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: acre/acre.proto - -/* -Package acre is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package acre - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = metadata.Join - -var ( - filter_ResourceEncodingService_ListResourceMappings_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ResourceEncodingService_ListResourceMappings_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListResourceMappingsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceEncodingService_ListResourceMappings_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListResourceMappings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_ListResourceMappings_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListResourceMappingsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceEncodingService_ListResourceMappings_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListResourceMappings(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_GetResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetResourceMappingRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetResourceMapping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_GetResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetResourceMappingRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetResourceMapping(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_CreateResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateResourceMappingRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Mapping); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateResourceMapping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_CreateResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateResourceMappingRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Mapping); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateResourceMapping(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_UpdateResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateResourceMappingRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Mapping); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UpdateResourceMapping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_UpdateResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateResourceMappingRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Mapping); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.UpdateResourceMapping(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_DeleteResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteResourceMappingRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.DeleteResourceMapping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_DeleteResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteResourceMappingRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.DeleteResourceMapping(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ResourceEncodingService_ListResourceSynonyms_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ResourceEncodingService_ListResourceSynonyms_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListResourceSynonymsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceEncodingService_ListResourceSynonyms_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListResourceSynonyms(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_ListResourceSynonyms_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListResourceSynonymsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceEncodingService_ListResourceSynonyms_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListResourceSynonyms(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_GetResourceSynonym_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetResourceSynonymRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetResourceSynonym(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_GetResourceSynonym_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetResourceSynonymRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetResourceSynonym(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_CreateResourceSynonym_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateResourceSynonymRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Synonym); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateResourceSynonym(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_CreateResourceSynonym_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateResourceSynonymRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Synonym); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateResourceSynonym(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_UpdateResourceSynonym_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateResourceSynonymRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Synonym); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UpdateResourceSynonym(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_UpdateResourceSynonym_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateResourceSynonymRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Synonym); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.UpdateResourceSynonym(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_DeleteResourceSynonym_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteResourceSynonymRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.DeleteResourceSynonym(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_DeleteResourceSynonym_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteResourceSynonymRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.DeleteResourceSynonym(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_ResourceEncodingService_ListResourceGroups_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_ResourceEncodingService_ListResourceGroups_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListResourceGroupsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceEncodingService_ListResourceGroups_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListResourceGroups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_ListResourceGroups_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListResourceGroupsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceEncodingService_ListResourceGroups_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListResourceGroups(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_GetResourceGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetResourceGroupRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.GetResourceGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_GetResourceGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetResourceGroupRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.GetResourceGroup(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_CreateResourceGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateResourceGroupRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateResourceGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_CreateResourceGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateResourceGroupRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateResourceGroup(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_UpdateResourceGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateResourceGroupRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.UpdateResourceGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_UpdateResourceGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateResourceGroupRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.UpdateResourceGroup(ctx, &protoReq) - return msg, metadata, err - -} - -func request_ResourceEncodingService_DeleteResourceGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteResourceGroupRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := client.DeleteResourceGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_ResourceEncodingService_DeleteResourceGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteResourceGroupRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") - } - - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) - } - - msg, err := server.DeleteResourceGroup(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterResourceEncodingServiceHandlerServer registers the http handlers for service ResourceEncodingService to "mux". -// UnaryRPC :call ResourceEncodingServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterResourceEncodingServiceHandlerFromEndpoint instead. -func RegisterResourceEncodingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ResourceEncodingServiceServer) error { - - mux.Handle("GET", pattern_ResourceEncodingService_ListResourceMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/ListResourceMappings", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_ListResourceMappings_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_ListResourceMappings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_GetResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/GetResourceMapping", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_GetResourceMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_GetResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_CreateResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/CreateResourceMapping", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_CreateResourceMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_CreateResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_UpdateResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/UpdateResourceMapping", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_UpdateResourceMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_UpdateResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ResourceEncodingService_DeleteResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/DeleteResourceMapping", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_DeleteResourceMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_DeleteResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_ListResourceSynonyms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/ListResourceSynonyms", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_ListResourceSynonyms_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_ListResourceSynonyms_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_GetResourceSynonym_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/GetResourceSynonym", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_GetResourceSynonym_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_GetResourceSynonym_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_CreateResourceSynonym_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/CreateResourceSynonym", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_CreateResourceSynonym_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_CreateResourceSynonym_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_UpdateResourceSynonym_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/UpdateResourceSynonym", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_UpdateResourceSynonym_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_UpdateResourceSynonym_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ResourceEncodingService_DeleteResourceSynonym_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/DeleteResourceSynonym", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_DeleteResourceSynonym_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_DeleteResourceSynonym_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_ListResourceGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/ListResourceGroups", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_ListResourceGroups_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_ListResourceGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_GetResourceGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/GetResourceGroup", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_GetResourceGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_GetResourceGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_CreateResourceGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/CreateResourceGroup", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_CreateResourceGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_CreateResourceGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_UpdateResourceGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/UpdateResourceGroup", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_UpdateResourceGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_UpdateResourceGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ResourceEncodingService_DeleteResourceGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acre.ResourceEncodingService/DeleteResourceGroup", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_ResourceEncodingService_DeleteResourceGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_DeleteResourceGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterResourceEncodingServiceHandlerFromEndpoint is same as RegisterResourceEncodingServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterResourceEncodingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterResourceEncodingServiceHandler(ctx, mux, conn) -} - -// RegisterResourceEncodingServiceHandler registers the http handlers for service ResourceEncodingService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterResourceEncodingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterResourceEncodingServiceHandlerClient(ctx, mux, NewResourceEncodingServiceClient(conn)) -} - -// RegisterResourceEncodingServiceHandlerClient registers the http handlers for service ResourceEncodingService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ResourceEncodingServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ResourceEncodingServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ResourceEncodingServiceClient" to call the correct interceptors. -func RegisterResourceEncodingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ResourceEncodingServiceClient) error { - - mux.Handle("GET", pattern_ResourceEncodingService_ListResourceMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/ListResourceMappings", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_ListResourceMappings_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_ListResourceMappings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_GetResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/GetResourceMapping", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_GetResourceMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_GetResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_CreateResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/CreateResourceMapping", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_CreateResourceMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_CreateResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_UpdateResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/UpdateResourceMapping", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_UpdateResourceMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_UpdateResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ResourceEncodingService_DeleteResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/DeleteResourceMapping", runtime.WithHTTPPathPattern("/v1/encoding/resource/mappings/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_DeleteResourceMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_DeleteResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_ListResourceSynonyms_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/ListResourceSynonyms", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_ListResourceSynonyms_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_ListResourceSynonyms_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_GetResourceSynonym_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/GetResourceSynonym", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_GetResourceSynonym_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_GetResourceSynonym_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_CreateResourceSynonym_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/CreateResourceSynonym", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_CreateResourceSynonym_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_CreateResourceSynonym_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_UpdateResourceSynonym_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/UpdateResourceSynonym", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_UpdateResourceSynonym_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_UpdateResourceSynonym_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ResourceEncodingService_DeleteResourceSynonym_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/DeleteResourceSynonym", runtime.WithHTTPPathPattern("/v1/encoding/resource/synonyms/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_DeleteResourceSynonym_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_DeleteResourceSynonym_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_ListResourceGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/ListResourceGroups", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_ListResourceGroups_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_ListResourceGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_ResourceEncodingService_GetResourceGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/GetResourceGroup", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_GetResourceGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_GetResourceGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_CreateResourceGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/CreateResourceGroup", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_CreateResourceGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_CreateResourceGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_ResourceEncodingService_UpdateResourceGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/UpdateResourceGroup", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_UpdateResourceGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_UpdateResourceGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_ResourceEncodingService_DeleteResourceGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acre.ResourceEncodingService/DeleteResourceGroup", runtime.WithHTTPPathPattern("/v1/encoding/resource/groups/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_ResourceEncodingService_DeleteResourceGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_ResourceEncodingService_DeleteResourceGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_ResourceEncodingService_ListResourceMappings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "encoding", "resource", "mappings"}, "")) - - pattern_ResourceEncodingService_GetResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "resource", "mappings", "id"}, "")) - - pattern_ResourceEncodingService_CreateResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "encoding", "resource", "mappings"}, "")) - - pattern_ResourceEncodingService_UpdateResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "resource", "mappings", "id"}, "")) - - pattern_ResourceEncodingService_DeleteResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "resource", "mappings", "id"}, "")) - - pattern_ResourceEncodingService_ListResourceSynonyms_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "encoding", "resource", "synonyms"}, "")) - - pattern_ResourceEncodingService_GetResourceSynonym_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "resource", "synonyms", "id"}, "")) - - pattern_ResourceEncodingService_CreateResourceSynonym_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "encoding", "resource", "synonyms"}, "")) - - pattern_ResourceEncodingService_UpdateResourceSynonym_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "resource", "synonyms", "id"}, "")) - - pattern_ResourceEncodingService_DeleteResourceSynonym_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "resource", "synonyms", "id"}, "")) - - pattern_ResourceEncodingService_ListResourceGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "encoding", "resource", "groups"}, "")) - - pattern_ResourceEncodingService_GetResourceGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "resource", "groups", "id"}, "")) - - pattern_ResourceEncodingService_CreateResourceGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "encoding", "resource", "groups"}, "")) - - pattern_ResourceEncodingService_UpdateResourceGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "resource", "groups", "id"}, "")) - - pattern_ResourceEncodingService_DeleteResourceGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "resource", "groups", "id"}, "")) -) - -var ( - forward_ResourceEncodingService_ListResourceMappings_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_GetResourceMapping_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_CreateResourceMapping_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_UpdateResourceMapping_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_DeleteResourceMapping_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_ListResourceSynonyms_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_GetResourceSynonym_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_CreateResourceSynonym_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_UpdateResourceSynonym_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_DeleteResourceSynonym_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_ListResourceGroups_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_GetResourceGroup_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_CreateResourceGroup_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_UpdateResourceGroup_0 = runtime.ForwardResponseMessage - - forward_ResourceEncodingService_DeleteResourceGroup_0 = runtime.ForwardResponseMessage -) diff --git a/sdk/acre/acre_grpc.pb.go b/sdk/acre/acre_grpc.pb.go deleted file mode 100644 index 2a72ec50e8..0000000000 --- a/sdk/acre/acre_grpc.pb.go +++ /dev/null @@ -1,634 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: acre/acre.proto - -package acre - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - ResourceEncodingService_ListResourceMappings_FullMethodName = "/acre.ResourceEncodingService/ListResourceMappings" - ResourceEncodingService_GetResourceMapping_FullMethodName = "/acre.ResourceEncodingService/GetResourceMapping" - ResourceEncodingService_CreateResourceMapping_FullMethodName = "/acre.ResourceEncodingService/CreateResourceMapping" - ResourceEncodingService_UpdateResourceMapping_FullMethodName = "/acre.ResourceEncodingService/UpdateResourceMapping" - ResourceEncodingService_DeleteResourceMapping_FullMethodName = "/acre.ResourceEncodingService/DeleteResourceMapping" - ResourceEncodingService_ListResourceSynonyms_FullMethodName = "/acre.ResourceEncodingService/ListResourceSynonyms" - ResourceEncodingService_GetResourceSynonym_FullMethodName = "/acre.ResourceEncodingService/GetResourceSynonym" - ResourceEncodingService_CreateResourceSynonym_FullMethodName = "/acre.ResourceEncodingService/CreateResourceSynonym" - ResourceEncodingService_UpdateResourceSynonym_FullMethodName = "/acre.ResourceEncodingService/UpdateResourceSynonym" - ResourceEncodingService_DeleteResourceSynonym_FullMethodName = "/acre.ResourceEncodingService/DeleteResourceSynonym" - ResourceEncodingService_ListResourceGroups_FullMethodName = "/acre.ResourceEncodingService/ListResourceGroups" - ResourceEncodingService_GetResourceGroup_FullMethodName = "/acre.ResourceEncodingService/GetResourceGroup" - ResourceEncodingService_CreateResourceGroup_FullMethodName = "/acre.ResourceEncodingService/CreateResourceGroup" - ResourceEncodingService_UpdateResourceGroup_FullMethodName = "/acre.ResourceEncodingService/UpdateResourceGroup" - ResourceEncodingService_DeleteResourceGroup_FullMethodName = "/acre.ResourceEncodingService/DeleteResourceGroup" -) - -// ResourceEncodingServiceClient is the client API for ResourceEncodingService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type ResourceEncodingServiceClient interface { - // Resource Mappings - ListResourceMappings(ctx context.Context, in *ListResourceMappingsRequest, opts ...grpc.CallOption) (*ListResourceMappingsResponse, error) - GetResourceMapping(ctx context.Context, in *GetResourceMappingRequest, opts ...grpc.CallOption) (*GetResourceMappingResponse, error) - CreateResourceMapping(ctx context.Context, in *CreateResourceMappingRequest, opts ...grpc.CallOption) (*CreateResourceMappingResponse, error) - UpdateResourceMapping(ctx context.Context, in *UpdateResourceMappingRequest, opts ...grpc.CallOption) (*UpdateResourceMappingResponse, error) - DeleteResourceMapping(ctx context.Context, in *DeleteResourceMappingRequest, opts ...grpc.CallOption) (*DeleteResourceMappingResponse, error) - // Synonyms - ListResourceSynonyms(ctx context.Context, in *ListResourceSynonymsRequest, opts ...grpc.CallOption) (*ListResourceSynonymsResponse, error) - GetResourceSynonym(ctx context.Context, in *GetResourceSynonymRequest, opts ...grpc.CallOption) (*GetResourceSynonymResponse, error) - CreateResourceSynonym(ctx context.Context, in *CreateResourceSynonymRequest, opts ...grpc.CallOption) (*CreateResourceSynonymResponse, error) - UpdateResourceSynonym(ctx context.Context, in *UpdateResourceSynonymRequest, opts ...grpc.CallOption) (*UpdateResourceSynonymResponse, error) - DeleteResourceSynonym(ctx context.Context, in *DeleteResourceSynonymRequest, opts ...grpc.CallOption) (*DeleteResourceSynonymResponse, error) - // Resource Groups - ListResourceGroups(ctx context.Context, in *ListResourceGroupsRequest, opts ...grpc.CallOption) (*ListResourceGroupsResponse, error) - GetResourceGroup(ctx context.Context, in *GetResourceGroupRequest, opts ...grpc.CallOption) (*GetResourceGroupResponse, error) - CreateResourceGroup(ctx context.Context, in *CreateResourceGroupRequest, opts ...grpc.CallOption) (*CreateResourceGroupResponse, error) - UpdateResourceGroup(ctx context.Context, in *UpdateResourceGroupRequest, opts ...grpc.CallOption) (*UpdateResourceGroupResponse, error) - DeleteResourceGroup(ctx context.Context, in *DeleteResourceGroupRequest, opts ...grpc.CallOption) (*DeleteResourceGroupResponse, error) -} - -type resourceEncodingServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewResourceEncodingServiceClient(cc grpc.ClientConnInterface) ResourceEncodingServiceClient { - return &resourceEncodingServiceClient{cc} -} - -func (c *resourceEncodingServiceClient) ListResourceMappings(ctx context.Context, in *ListResourceMappingsRequest, opts ...grpc.CallOption) (*ListResourceMappingsResponse, error) { - out := new(ListResourceMappingsResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_ListResourceMappings_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) GetResourceMapping(ctx context.Context, in *GetResourceMappingRequest, opts ...grpc.CallOption) (*GetResourceMappingResponse, error) { - out := new(GetResourceMappingResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_GetResourceMapping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) CreateResourceMapping(ctx context.Context, in *CreateResourceMappingRequest, opts ...grpc.CallOption) (*CreateResourceMappingResponse, error) { - out := new(CreateResourceMappingResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_CreateResourceMapping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) UpdateResourceMapping(ctx context.Context, in *UpdateResourceMappingRequest, opts ...grpc.CallOption) (*UpdateResourceMappingResponse, error) { - out := new(UpdateResourceMappingResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_UpdateResourceMapping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) DeleteResourceMapping(ctx context.Context, in *DeleteResourceMappingRequest, opts ...grpc.CallOption) (*DeleteResourceMappingResponse, error) { - out := new(DeleteResourceMappingResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_DeleteResourceMapping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) ListResourceSynonyms(ctx context.Context, in *ListResourceSynonymsRequest, opts ...grpc.CallOption) (*ListResourceSynonymsResponse, error) { - out := new(ListResourceSynonymsResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_ListResourceSynonyms_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) GetResourceSynonym(ctx context.Context, in *GetResourceSynonymRequest, opts ...grpc.CallOption) (*GetResourceSynonymResponse, error) { - out := new(GetResourceSynonymResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_GetResourceSynonym_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) CreateResourceSynonym(ctx context.Context, in *CreateResourceSynonymRequest, opts ...grpc.CallOption) (*CreateResourceSynonymResponse, error) { - out := new(CreateResourceSynonymResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_CreateResourceSynonym_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) UpdateResourceSynonym(ctx context.Context, in *UpdateResourceSynonymRequest, opts ...grpc.CallOption) (*UpdateResourceSynonymResponse, error) { - out := new(UpdateResourceSynonymResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_UpdateResourceSynonym_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) DeleteResourceSynonym(ctx context.Context, in *DeleteResourceSynonymRequest, opts ...grpc.CallOption) (*DeleteResourceSynonymResponse, error) { - out := new(DeleteResourceSynonymResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_DeleteResourceSynonym_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) ListResourceGroups(ctx context.Context, in *ListResourceGroupsRequest, opts ...grpc.CallOption) (*ListResourceGroupsResponse, error) { - out := new(ListResourceGroupsResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_ListResourceGroups_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) GetResourceGroup(ctx context.Context, in *GetResourceGroupRequest, opts ...grpc.CallOption) (*GetResourceGroupResponse, error) { - out := new(GetResourceGroupResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_GetResourceGroup_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) CreateResourceGroup(ctx context.Context, in *CreateResourceGroupRequest, opts ...grpc.CallOption) (*CreateResourceGroupResponse, error) { - out := new(CreateResourceGroupResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_CreateResourceGroup_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) UpdateResourceGroup(ctx context.Context, in *UpdateResourceGroupRequest, opts ...grpc.CallOption) (*UpdateResourceGroupResponse, error) { - out := new(UpdateResourceGroupResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_UpdateResourceGroup_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *resourceEncodingServiceClient) DeleteResourceGroup(ctx context.Context, in *DeleteResourceGroupRequest, opts ...grpc.CallOption) (*DeleteResourceGroupResponse, error) { - out := new(DeleteResourceGroupResponse) - err := c.cc.Invoke(ctx, ResourceEncodingService_DeleteResourceGroup_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ResourceEncodingServiceServer is the server API for ResourceEncodingService service. -// All implementations must embed UnimplementedResourceEncodingServiceServer -// for forward compatibility -type ResourceEncodingServiceServer interface { - // Resource Mappings - ListResourceMappings(context.Context, *ListResourceMappingsRequest) (*ListResourceMappingsResponse, error) - GetResourceMapping(context.Context, *GetResourceMappingRequest) (*GetResourceMappingResponse, error) - CreateResourceMapping(context.Context, *CreateResourceMappingRequest) (*CreateResourceMappingResponse, error) - UpdateResourceMapping(context.Context, *UpdateResourceMappingRequest) (*UpdateResourceMappingResponse, error) - DeleteResourceMapping(context.Context, *DeleteResourceMappingRequest) (*DeleteResourceMappingResponse, error) - // Synonyms - ListResourceSynonyms(context.Context, *ListResourceSynonymsRequest) (*ListResourceSynonymsResponse, error) - GetResourceSynonym(context.Context, *GetResourceSynonymRequest) (*GetResourceSynonymResponse, error) - CreateResourceSynonym(context.Context, *CreateResourceSynonymRequest) (*CreateResourceSynonymResponse, error) - UpdateResourceSynonym(context.Context, *UpdateResourceSynonymRequest) (*UpdateResourceSynonymResponse, error) - DeleteResourceSynonym(context.Context, *DeleteResourceSynonymRequest) (*DeleteResourceSynonymResponse, error) - // Resource Groups - ListResourceGroups(context.Context, *ListResourceGroupsRequest) (*ListResourceGroupsResponse, error) - GetResourceGroup(context.Context, *GetResourceGroupRequest) (*GetResourceGroupResponse, error) - CreateResourceGroup(context.Context, *CreateResourceGroupRequest) (*CreateResourceGroupResponse, error) - UpdateResourceGroup(context.Context, *UpdateResourceGroupRequest) (*UpdateResourceGroupResponse, error) - DeleteResourceGroup(context.Context, *DeleteResourceGroupRequest) (*DeleteResourceGroupResponse, error) - mustEmbedUnimplementedResourceEncodingServiceServer() -} - -// UnimplementedResourceEncodingServiceServer must be embedded to have forward compatible implementations. -type UnimplementedResourceEncodingServiceServer struct { -} - -func (UnimplementedResourceEncodingServiceServer) ListResourceMappings(context.Context, *ListResourceMappingsRequest) (*ListResourceMappingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListResourceMappings not implemented") -} -func (UnimplementedResourceEncodingServiceServer) GetResourceMapping(context.Context, *GetResourceMappingRequest) (*GetResourceMappingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetResourceMapping not implemented") -} -func (UnimplementedResourceEncodingServiceServer) CreateResourceMapping(context.Context, *CreateResourceMappingRequest) (*CreateResourceMappingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateResourceMapping not implemented") -} -func (UnimplementedResourceEncodingServiceServer) UpdateResourceMapping(context.Context, *UpdateResourceMappingRequest) (*UpdateResourceMappingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateResourceMapping not implemented") -} -func (UnimplementedResourceEncodingServiceServer) DeleteResourceMapping(context.Context, *DeleteResourceMappingRequest) (*DeleteResourceMappingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteResourceMapping not implemented") -} -func (UnimplementedResourceEncodingServiceServer) ListResourceSynonyms(context.Context, *ListResourceSynonymsRequest) (*ListResourceSynonymsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListResourceSynonyms not implemented") -} -func (UnimplementedResourceEncodingServiceServer) GetResourceSynonym(context.Context, *GetResourceSynonymRequest) (*GetResourceSynonymResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetResourceSynonym not implemented") -} -func (UnimplementedResourceEncodingServiceServer) CreateResourceSynonym(context.Context, *CreateResourceSynonymRequest) (*CreateResourceSynonymResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateResourceSynonym not implemented") -} -func (UnimplementedResourceEncodingServiceServer) UpdateResourceSynonym(context.Context, *UpdateResourceSynonymRequest) (*UpdateResourceSynonymResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateResourceSynonym not implemented") -} -func (UnimplementedResourceEncodingServiceServer) DeleteResourceSynonym(context.Context, *DeleteResourceSynonymRequest) (*DeleteResourceSynonymResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteResourceSynonym not implemented") -} -func (UnimplementedResourceEncodingServiceServer) ListResourceGroups(context.Context, *ListResourceGroupsRequest) (*ListResourceGroupsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListResourceGroups not implemented") -} -func (UnimplementedResourceEncodingServiceServer) GetResourceGroup(context.Context, *GetResourceGroupRequest) (*GetResourceGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetResourceGroup not implemented") -} -func (UnimplementedResourceEncodingServiceServer) CreateResourceGroup(context.Context, *CreateResourceGroupRequest) (*CreateResourceGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateResourceGroup not implemented") -} -func (UnimplementedResourceEncodingServiceServer) UpdateResourceGroup(context.Context, *UpdateResourceGroupRequest) (*UpdateResourceGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateResourceGroup not implemented") -} -func (UnimplementedResourceEncodingServiceServer) DeleteResourceGroup(context.Context, *DeleteResourceGroupRequest) (*DeleteResourceGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteResourceGroup not implemented") -} -func (UnimplementedResourceEncodingServiceServer) mustEmbedUnimplementedResourceEncodingServiceServer() { -} - -// UnsafeResourceEncodingServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to ResourceEncodingServiceServer will -// result in compilation errors. -type UnsafeResourceEncodingServiceServer interface { - mustEmbedUnimplementedResourceEncodingServiceServer() -} - -func RegisterResourceEncodingServiceServer(s grpc.ServiceRegistrar, srv ResourceEncodingServiceServer) { - s.RegisterService(&ResourceEncodingService_ServiceDesc, srv) -} - -func _ResourceEncodingService_ListResourceMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListResourceMappingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).ListResourceMappings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_ListResourceMappings_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).ListResourceMappings(ctx, req.(*ListResourceMappingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_GetResourceMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetResourceMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).GetResourceMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_GetResourceMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).GetResourceMapping(ctx, req.(*GetResourceMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_CreateResourceMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateResourceMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).CreateResourceMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_CreateResourceMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).CreateResourceMapping(ctx, req.(*CreateResourceMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_UpdateResourceMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateResourceMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).UpdateResourceMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_UpdateResourceMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).UpdateResourceMapping(ctx, req.(*UpdateResourceMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_DeleteResourceMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteResourceMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).DeleteResourceMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_DeleteResourceMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).DeleteResourceMapping(ctx, req.(*DeleteResourceMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_ListResourceSynonyms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListResourceSynonymsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).ListResourceSynonyms(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_ListResourceSynonyms_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).ListResourceSynonyms(ctx, req.(*ListResourceSynonymsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_GetResourceSynonym_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetResourceSynonymRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).GetResourceSynonym(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_GetResourceSynonym_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).GetResourceSynonym(ctx, req.(*GetResourceSynonymRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_CreateResourceSynonym_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateResourceSynonymRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).CreateResourceSynonym(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_CreateResourceSynonym_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).CreateResourceSynonym(ctx, req.(*CreateResourceSynonymRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_UpdateResourceSynonym_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateResourceSynonymRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).UpdateResourceSynonym(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_UpdateResourceSynonym_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).UpdateResourceSynonym(ctx, req.(*UpdateResourceSynonymRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_DeleteResourceSynonym_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteResourceSynonymRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).DeleteResourceSynonym(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_DeleteResourceSynonym_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).DeleteResourceSynonym(ctx, req.(*DeleteResourceSynonymRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_ListResourceGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListResourceGroupsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).ListResourceGroups(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_ListResourceGroups_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).ListResourceGroups(ctx, req.(*ListResourceGroupsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_GetResourceGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetResourceGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).GetResourceGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_GetResourceGroup_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).GetResourceGroup(ctx, req.(*GetResourceGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_CreateResourceGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateResourceGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).CreateResourceGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_CreateResourceGroup_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).CreateResourceGroup(ctx, req.(*CreateResourceGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_UpdateResourceGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateResourceGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).UpdateResourceGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_UpdateResourceGroup_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).UpdateResourceGroup(ctx, req.(*UpdateResourceGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _ResourceEncodingService_DeleteResourceGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteResourceGroupRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ResourceEncodingServiceServer).DeleteResourceGroup(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: ResourceEncodingService_DeleteResourceGroup_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ResourceEncodingServiceServer).DeleteResourceGroup(ctx, req.(*DeleteResourceGroupRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// ResourceEncodingService_ServiceDesc is the grpc.ServiceDesc for ResourceEncodingService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var ResourceEncodingService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "acre.ResourceEncodingService", - HandlerType: (*ResourceEncodingServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListResourceMappings", - Handler: _ResourceEncodingService_ListResourceMappings_Handler, - }, - { - MethodName: "GetResourceMapping", - Handler: _ResourceEncodingService_GetResourceMapping_Handler, - }, - { - MethodName: "CreateResourceMapping", - Handler: _ResourceEncodingService_CreateResourceMapping_Handler, - }, - { - MethodName: "UpdateResourceMapping", - Handler: _ResourceEncodingService_UpdateResourceMapping_Handler, - }, - { - MethodName: "DeleteResourceMapping", - Handler: _ResourceEncodingService_DeleteResourceMapping_Handler, - }, - { - MethodName: "ListResourceSynonyms", - Handler: _ResourceEncodingService_ListResourceSynonyms_Handler, - }, - { - MethodName: "GetResourceSynonym", - Handler: _ResourceEncodingService_GetResourceSynonym_Handler, - }, - { - MethodName: "CreateResourceSynonym", - Handler: _ResourceEncodingService_CreateResourceSynonym_Handler, - }, - { - MethodName: "UpdateResourceSynonym", - Handler: _ResourceEncodingService_UpdateResourceSynonym_Handler, - }, - { - MethodName: "DeleteResourceSynonym", - Handler: _ResourceEncodingService_DeleteResourceSynonym_Handler, - }, - { - MethodName: "ListResourceGroups", - Handler: _ResourceEncodingService_ListResourceGroups_Handler, - }, - { - MethodName: "GetResourceGroup", - Handler: _ResourceEncodingService_GetResourceGroup_Handler, - }, - { - MethodName: "CreateResourceGroup", - Handler: _ResourceEncodingService_CreateResourceGroup_Handler, - }, - { - MethodName: "UpdateResourceGroup", - Handler: _ResourceEncodingService_UpdateResourceGroup_Handler, - }, - { - MethodName: "DeleteResourceGroup", - Handler: _ResourceEncodingService_DeleteResourceGroup_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "acre/acre.proto", -} diff --git a/sdk/acse/acse.pb.go b/sdk/acse/acse.pb.go deleted file mode 100644 index 6546b9986f..0000000000 --- a/sdk/acse/acse.pb.go +++ /dev/null @@ -1,975 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: acse/acse.proto - -package acse - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - attributes "github.com/opentdf/opentdf-v2-poc/sdk/attributes" - common "github.com/opentdf/opentdf-v2-poc/sdk/common" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type SubjectMapping_Operator int32 - -const ( - SubjectMapping_OPERATOR_UNSPECIFIED SubjectMapping_Operator = 0 - SubjectMapping_OPERATOR_IN SubjectMapping_Operator = 1 - SubjectMapping_OPERATOR_NOT_IN SubjectMapping_Operator = 2 -) - -// Enum value maps for SubjectMapping_Operator. -var ( - SubjectMapping_Operator_name = map[int32]string{ - 0: "OPERATOR_UNSPECIFIED", - 1: "OPERATOR_IN", - 2: "OPERATOR_NOT_IN", - } - SubjectMapping_Operator_value = map[string]int32{ - "OPERATOR_UNSPECIFIED": 0, - "OPERATOR_IN": 1, - "OPERATOR_NOT_IN": 2, - } -) - -func (x SubjectMapping_Operator) Enum() *SubjectMapping_Operator { - p := new(SubjectMapping_Operator) - *p = x - return p -} - -func (x SubjectMapping_Operator) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (SubjectMapping_Operator) Descriptor() protoreflect.EnumDescriptor { - return file_acse_acse_proto_enumTypes[0].Descriptor() -} - -func (SubjectMapping_Operator) Type() protoreflect.EnumType { - return &file_acse_acse_proto_enumTypes[0] -} - -func (x SubjectMapping_Operator) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use SubjectMapping_Operator.Descriptor instead. -func (SubjectMapping_Operator) EnumDescriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{0, 0} -} - -// * -// Define a mapping of an subject attribute to subject using a rule: -// [subjectValue] -// -// Example subject mapping of a subject with nationality = CZE entitled to attribute relto:ZCE -// From Existing Policy: "http://demo.com/attr/relto/value/CZE": {"nationality": ["CZE"]} -// To Subject Mapping Policy: -// { -// attributeValueFQN: "http://demo.com/attr/relto/value/CZE" -// subjectAttribute: "nationality" -// subjectValues: ["CZE"] -// operator: "IN" -// } -type SubjectMapping struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` - // TODO should this be a list of values? - // Attribute Value to be mapped to - AttributeValueRef *attributes.AttributeValueReference `protobuf:"bytes,2,opt,name=attribute_value_ref,json=attributeValueRef,proto3" json:"attribute_value_ref,omitempty"` - // Resource Attribute Key; NOT Attribute Definition Attribute name - SubjectAttribute string `protobuf:"bytes,3,opt,name=subject_attribute,json=subjectAttribute,proto3" json:"subject_attribute,omitempty"` - // The list of comparison values for a resource's value - SubjectValues []string `protobuf:"bytes,4,rep,name=subject_values,json=subjectValues,proto3" json:"subject_values,omitempty"` - // the operator - Operator SubjectMapping_Operator `protobuf:"varint,5,opt,name=operator,proto3,enum=acse.SubjectMapping_Operator" json:"operator,omitempty"` -} - -func (x *SubjectMapping) Reset() { - *x = SubjectMapping{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubjectMapping) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubjectMapping) ProtoMessage() {} - -func (x *SubjectMapping) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SubjectMapping.ProtoReflect.Descriptor instead. -func (*SubjectMapping) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{0} -} - -func (x *SubjectMapping) GetDescriptor_() *common.ResourceDescriptor { - if x != nil { - return x.Descriptor_ - } - return nil -} - -func (x *SubjectMapping) GetAttributeValueRef() *attributes.AttributeValueReference { - if x != nil { - return x.AttributeValueRef - } - return nil -} - -func (x *SubjectMapping) GetSubjectAttribute() string { - if x != nil { - return x.SubjectAttribute - } - return "" -} - -func (x *SubjectMapping) GetSubjectValues() []string { - if x != nil { - return x.SubjectValues - } - return nil -} - -func (x *SubjectMapping) GetOperator() SubjectMapping_Operator { - if x != nil { - return x.Operator - } - return SubjectMapping_OPERATOR_UNSPECIFIED -} - -type GetSubjectMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetSubjectMappingRequest) Reset() { - *x = GetSubjectMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSubjectMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubjectMappingRequest) ProtoMessage() {} - -func (x *GetSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubjectMappingRequest.ProtoReflect.Descriptor instead. -func (*GetSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{1} -} - -func (x *GetSubjectMappingRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type GetSubjectMappingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` -} - -func (x *GetSubjectMappingResponse) Reset() { - *x = GetSubjectMappingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSubjectMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubjectMappingResponse) ProtoMessage() {} - -func (x *GetSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetSubjectMappingResponse.ProtoReflect.Descriptor instead. -func (*GetSubjectMappingResponse) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{2} -} - -func (x *GetSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { - if x != nil { - return x.SubjectMapping - } - return nil -} - -type ListSubjectMappingsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Selector *common.ResourceSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` -} - -func (x *ListSubjectMappingsRequest) Reset() { - *x = ListSubjectMappingsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSubjectMappingsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSubjectMappingsRequest) ProtoMessage() {} - -func (x *ListSubjectMappingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListSubjectMappingsRequest.ProtoReflect.Descriptor instead. -func (*ListSubjectMappingsRequest) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{3} -} - -func (x *ListSubjectMappingsRequest) GetSelector() *common.ResourceSelector { - if x != nil { - return x.Selector - } - return nil -} - -type ListSubjectMappingsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectMappings []*SubjectMapping `protobuf:"bytes,1,rep,name=subject_mappings,json=subjectMappings,proto3" json:"subject_mappings,omitempty"` -} - -func (x *ListSubjectMappingsResponse) Reset() { - *x = ListSubjectMappingsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSubjectMappingsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSubjectMappingsResponse) ProtoMessage() {} - -func (x *ListSubjectMappingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListSubjectMappingsResponse.ProtoReflect.Descriptor instead. -func (*ListSubjectMappingsResponse) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{4} -} - -func (x *ListSubjectMappingsResponse) GetSubjectMappings() []*SubjectMapping { - if x != nil { - return x.SubjectMappings - } - return nil -} - -type CreateSubjectMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` -} - -func (x *CreateSubjectMappingRequest) Reset() { - *x = CreateSubjectMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSubjectMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSubjectMappingRequest) ProtoMessage() {} - -func (x *CreateSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSubjectMappingRequest.ProtoReflect.Descriptor instead. -func (*CreateSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{5} -} - -func (x *CreateSubjectMappingRequest) GetSubjectMapping() *SubjectMapping { - if x != nil { - return x.SubjectMapping - } - return nil -} - -type CreateSubjectMappingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreateSubjectMappingResponse) Reset() { - *x = CreateSubjectMappingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSubjectMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSubjectMappingResponse) ProtoMessage() {} - -func (x *CreateSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateSubjectMappingResponse.ProtoReflect.Descriptor instead. -func (*CreateSubjectMappingResponse) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{6} -} - -type UpdateSubjectMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - SubjectMapping *SubjectMapping `protobuf:"bytes,2,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` -} - -func (x *UpdateSubjectMappingRequest) Reset() { - *x = UpdateSubjectMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSubjectMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSubjectMappingRequest) ProtoMessage() {} - -func (x *UpdateSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSubjectMappingRequest.ProtoReflect.Descriptor instead. -func (*UpdateSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{7} -} - -func (x *UpdateSubjectMappingRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *UpdateSubjectMappingRequest) GetSubjectMapping() *SubjectMapping { - if x != nil { - return x.SubjectMapping - } - return nil -} - -type UpdateSubjectMappingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateSubjectMappingResponse) Reset() { - *x = UpdateSubjectMappingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSubjectMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSubjectMappingResponse) ProtoMessage() {} - -func (x *UpdateSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSubjectMappingResponse.ProtoReflect.Descriptor instead. -func (*UpdateSubjectMappingResponse) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{8} -} - -type DeleteSubjectMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteSubjectMappingRequest) Reset() { - *x = DeleteSubjectMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSubjectMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSubjectMappingRequest) ProtoMessage() {} - -func (x *DeleteSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSubjectMappingRequest.ProtoReflect.Descriptor instead. -func (*DeleteSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{9} -} - -func (x *DeleteSubjectMappingRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type DeleteSubjectMappingResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteSubjectMappingResponse) Reset() { - *x = DeleteSubjectMappingResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_acse_acse_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSubjectMappingResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSubjectMappingResponse) ProtoMessage() {} - -func (x *DeleteSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_acse_acse_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteSubjectMappingResponse.ProtoReflect.Descriptor instead. -func (*DeleteSubjectMappingResponse) Descriptor() ([]byte, []int) { - return file_acse_acse_proto_rawDescGZIP(), []int{10} -} - -var File_acse_acse_proto protoreflect.FileDescriptor - -var file_acse_acse_proto_rawDesc = []byte{ - 0x0a, 0x0f, 0x61, 0x63, 0x73, 0x65, 0x2f, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x04, 0x61, 0x63, 0x73, 0x65, 0x1a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x03, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x3a, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x12, 0x53, 0x0a, 0x13, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x11, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x66, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x46, 0x0a, 0x08, - 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1d, - 0x2e, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x42, 0x0b, 0xba, - 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x22, 0x4a, 0x0a, 0x08, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4f, 0x50, - 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x4f, - 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x10, 0x02, - 0x22, 0x32, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, - 0x52, 0x02, 0x69, 0x64, 0x22, 0x5a, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3d, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x63, 0x73, - 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x22, 0x52, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, - 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x22, 0x5e, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, - 0x61, 0x63, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x73, 0x22, 0x64, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, - 0x63, 0x73, 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, 0x0a, 0x1b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x45, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x63, 0x73, - 0x65, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1e, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, - 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, - 0xe1, 0x05, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x45, 0x6e, 0x63, 0x6f, 0x64, - 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x13, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x73, 0x12, 0x20, 0x2e, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, - 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x80, - 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x12, 0x1e, 0x2e, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, - 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0x95, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x61, 0x63, 0x73, - 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, - 0x61, 0x63, 0x73, 0x65, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, - 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x9a, 0x01, 0x0a, 0x14, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x12, 0x21, 0x2e, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x35, 0x3a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x22, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, - 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8a, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, - 0x21, 0x2e, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x63, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x2a, 0x23, - 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x42, 0x71, 0x0a, 0x08, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x63, 0x73, 0x65, 0x42, - 0x09, 0x41, 0x63, 0x73, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, - 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, 0x76, 0x32, 0x2d, 0x70, 0x6f, 0x63, 0x2f, - 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x63, 0x73, 0x65, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, - 0x04, 0x41, 0x63, 0x73, 0x65, 0xca, 0x02, 0x04, 0x41, 0x63, 0x73, 0x65, 0xe2, 0x02, 0x10, 0x41, - 0x63, 0x73, 0x65, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x04, 0x41, 0x63, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_acse_acse_proto_rawDescOnce sync.Once - file_acse_acse_proto_rawDescData = file_acse_acse_proto_rawDesc -) - -func file_acse_acse_proto_rawDescGZIP() []byte { - file_acse_acse_proto_rawDescOnce.Do(func() { - file_acse_acse_proto_rawDescData = protoimpl.X.CompressGZIP(file_acse_acse_proto_rawDescData) - }) - return file_acse_acse_proto_rawDescData -} - -var file_acse_acse_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_acse_acse_proto_msgTypes = make([]protoimpl.MessageInfo, 11) -var file_acse_acse_proto_goTypes = []interface{}{ - (SubjectMapping_Operator)(0), // 0: acse.SubjectMapping.Operator - (*SubjectMapping)(nil), // 1: acse.SubjectMapping - (*GetSubjectMappingRequest)(nil), // 2: acse.GetSubjectMappingRequest - (*GetSubjectMappingResponse)(nil), // 3: acse.GetSubjectMappingResponse - (*ListSubjectMappingsRequest)(nil), // 4: acse.ListSubjectMappingsRequest - (*ListSubjectMappingsResponse)(nil), // 5: acse.ListSubjectMappingsResponse - (*CreateSubjectMappingRequest)(nil), // 6: acse.CreateSubjectMappingRequest - (*CreateSubjectMappingResponse)(nil), // 7: acse.CreateSubjectMappingResponse - (*UpdateSubjectMappingRequest)(nil), // 8: acse.UpdateSubjectMappingRequest - (*UpdateSubjectMappingResponse)(nil), // 9: acse.UpdateSubjectMappingResponse - (*DeleteSubjectMappingRequest)(nil), // 10: acse.DeleteSubjectMappingRequest - (*DeleteSubjectMappingResponse)(nil), // 11: acse.DeleteSubjectMappingResponse - (*common.ResourceDescriptor)(nil), // 12: common.ResourceDescriptor - (*attributes.AttributeValueReference)(nil), // 13: attributes.AttributeValueReference - (*common.ResourceSelector)(nil), // 14: common.ResourceSelector -} -var file_acse_acse_proto_depIdxs = []int32{ - 12, // 0: acse.SubjectMapping.descriptor:type_name -> common.ResourceDescriptor - 13, // 1: acse.SubjectMapping.attribute_value_ref:type_name -> attributes.AttributeValueReference - 0, // 2: acse.SubjectMapping.operator:type_name -> acse.SubjectMapping.Operator - 1, // 3: acse.GetSubjectMappingResponse.subject_mapping:type_name -> acse.SubjectMapping - 14, // 4: acse.ListSubjectMappingsRequest.selector:type_name -> common.ResourceSelector - 1, // 5: acse.ListSubjectMappingsResponse.subject_mappings:type_name -> acse.SubjectMapping - 1, // 6: acse.CreateSubjectMappingRequest.subject_mapping:type_name -> acse.SubjectMapping - 1, // 7: acse.UpdateSubjectMappingRequest.subject_mapping:type_name -> acse.SubjectMapping - 4, // 8: acse.SubjectEncodingService.ListSubjectMappings:input_type -> acse.ListSubjectMappingsRequest - 2, // 9: acse.SubjectEncodingService.GetSubjectMapping:input_type -> acse.GetSubjectMappingRequest - 6, // 10: acse.SubjectEncodingService.CreateSubjectMapping:input_type -> acse.CreateSubjectMappingRequest - 8, // 11: acse.SubjectEncodingService.UpdateSubjectMapping:input_type -> acse.UpdateSubjectMappingRequest - 10, // 12: acse.SubjectEncodingService.DeleteSubjectMapping:input_type -> acse.DeleteSubjectMappingRequest - 5, // 13: acse.SubjectEncodingService.ListSubjectMappings:output_type -> acse.ListSubjectMappingsResponse - 3, // 14: acse.SubjectEncodingService.GetSubjectMapping:output_type -> acse.GetSubjectMappingResponse - 7, // 15: acse.SubjectEncodingService.CreateSubjectMapping:output_type -> acse.CreateSubjectMappingResponse - 9, // 16: acse.SubjectEncodingService.UpdateSubjectMapping:output_type -> acse.UpdateSubjectMappingResponse - 11, // 17: acse.SubjectEncodingService.DeleteSubjectMapping:output_type -> acse.DeleteSubjectMappingResponse - 13, // [13:18] is the sub-list for method output_type - 8, // [8:13] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_acse_acse_proto_init() } -func file_acse_acse_proto_init() { - if File_acse_acse_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_acse_acse_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectMapping); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubjectMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubjectMappingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSubjectMappingsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSubjectMappingsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSubjectMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSubjectMappingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSubjectMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSubjectMappingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSubjectMappingRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_acse_acse_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSubjectMappingResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_acse_acse_proto_rawDesc, - NumEnums: 1, - NumMessages: 11, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_acse_acse_proto_goTypes, - DependencyIndexes: file_acse_acse_proto_depIdxs, - EnumInfos: file_acse_acse_proto_enumTypes, - MessageInfos: file_acse_acse_proto_msgTypes, - }.Build() - File_acse_acse_proto = out.File - file_acse_acse_proto_rawDesc = nil - file_acse_acse_proto_goTypes = nil - file_acse_acse_proto_depIdxs = nil -} diff --git a/sdk/acse/acse_grpc.pb.go b/sdk/acse/acse_grpc.pb.go deleted file mode 100644 index 7d6b44668e..0000000000 --- a/sdk/acse/acse_grpc.pb.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: acse/acse.proto - -package acse - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - SubjectEncodingService_ListSubjectMappings_FullMethodName = "/acse.SubjectEncodingService/ListSubjectMappings" - SubjectEncodingService_GetSubjectMapping_FullMethodName = "/acse.SubjectEncodingService/GetSubjectMapping" - SubjectEncodingService_CreateSubjectMapping_FullMethodName = "/acse.SubjectEncodingService/CreateSubjectMapping" - SubjectEncodingService_UpdateSubjectMapping_FullMethodName = "/acse.SubjectEncodingService/UpdateSubjectMapping" - SubjectEncodingService_DeleteSubjectMapping_FullMethodName = "/acse.SubjectEncodingService/DeleteSubjectMapping" -) - -// SubjectEncodingServiceClient is the client API for SubjectEncodingService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type SubjectEncodingServiceClient interface { - ListSubjectMappings(ctx context.Context, in *ListSubjectMappingsRequest, opts ...grpc.CallOption) (*ListSubjectMappingsResponse, error) - GetSubjectMapping(ctx context.Context, in *GetSubjectMappingRequest, opts ...grpc.CallOption) (*GetSubjectMappingResponse, error) - CreateSubjectMapping(ctx context.Context, in *CreateSubjectMappingRequest, opts ...grpc.CallOption) (*CreateSubjectMappingResponse, error) - UpdateSubjectMapping(ctx context.Context, in *UpdateSubjectMappingRequest, opts ...grpc.CallOption) (*UpdateSubjectMappingResponse, error) - DeleteSubjectMapping(ctx context.Context, in *DeleteSubjectMappingRequest, opts ...grpc.CallOption) (*DeleteSubjectMappingResponse, error) -} - -type subjectEncodingServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewSubjectEncodingServiceClient(cc grpc.ClientConnInterface) SubjectEncodingServiceClient { - return &subjectEncodingServiceClient{cc} -} - -func (c *subjectEncodingServiceClient) ListSubjectMappings(ctx context.Context, in *ListSubjectMappingsRequest, opts ...grpc.CallOption) (*ListSubjectMappingsResponse, error) { - out := new(ListSubjectMappingsResponse) - err := c.cc.Invoke(ctx, SubjectEncodingService_ListSubjectMappings_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subjectEncodingServiceClient) GetSubjectMapping(ctx context.Context, in *GetSubjectMappingRequest, opts ...grpc.CallOption) (*GetSubjectMappingResponse, error) { - out := new(GetSubjectMappingResponse) - err := c.cc.Invoke(ctx, SubjectEncodingService_GetSubjectMapping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subjectEncodingServiceClient) CreateSubjectMapping(ctx context.Context, in *CreateSubjectMappingRequest, opts ...grpc.CallOption) (*CreateSubjectMappingResponse, error) { - out := new(CreateSubjectMappingResponse) - err := c.cc.Invoke(ctx, SubjectEncodingService_CreateSubjectMapping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subjectEncodingServiceClient) UpdateSubjectMapping(ctx context.Context, in *UpdateSubjectMappingRequest, opts ...grpc.CallOption) (*UpdateSubjectMappingResponse, error) { - out := new(UpdateSubjectMappingResponse) - err := c.cc.Invoke(ctx, SubjectEncodingService_UpdateSubjectMapping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subjectEncodingServiceClient) DeleteSubjectMapping(ctx context.Context, in *DeleteSubjectMappingRequest, opts ...grpc.CallOption) (*DeleteSubjectMappingResponse, error) { - out := new(DeleteSubjectMappingResponse) - err := c.cc.Invoke(ctx, SubjectEncodingService_DeleteSubjectMapping_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SubjectEncodingServiceServer is the server API for SubjectEncodingService service. -// All implementations must embed UnimplementedSubjectEncodingServiceServer -// for forward compatibility -type SubjectEncodingServiceServer interface { - ListSubjectMappings(context.Context, *ListSubjectMappingsRequest) (*ListSubjectMappingsResponse, error) - GetSubjectMapping(context.Context, *GetSubjectMappingRequest) (*GetSubjectMappingResponse, error) - CreateSubjectMapping(context.Context, *CreateSubjectMappingRequest) (*CreateSubjectMappingResponse, error) - UpdateSubjectMapping(context.Context, *UpdateSubjectMappingRequest) (*UpdateSubjectMappingResponse, error) - DeleteSubjectMapping(context.Context, *DeleteSubjectMappingRequest) (*DeleteSubjectMappingResponse, error) - mustEmbedUnimplementedSubjectEncodingServiceServer() -} - -// UnimplementedSubjectEncodingServiceServer must be embedded to have forward compatible implementations. -type UnimplementedSubjectEncodingServiceServer struct { -} - -func (UnimplementedSubjectEncodingServiceServer) ListSubjectMappings(context.Context, *ListSubjectMappingsRequest) (*ListSubjectMappingsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSubjectMappings not implemented") -} -func (UnimplementedSubjectEncodingServiceServer) GetSubjectMapping(context.Context, *GetSubjectMappingRequest) (*GetSubjectMappingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSubjectMapping not implemented") -} -func (UnimplementedSubjectEncodingServiceServer) CreateSubjectMapping(context.Context, *CreateSubjectMappingRequest) (*CreateSubjectMappingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSubjectMapping not implemented") -} -func (UnimplementedSubjectEncodingServiceServer) UpdateSubjectMapping(context.Context, *UpdateSubjectMappingRequest) (*UpdateSubjectMappingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSubjectMapping not implemented") -} -func (UnimplementedSubjectEncodingServiceServer) DeleteSubjectMapping(context.Context, *DeleteSubjectMappingRequest) (*DeleteSubjectMappingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteSubjectMapping not implemented") -} -func (UnimplementedSubjectEncodingServiceServer) mustEmbedUnimplementedSubjectEncodingServiceServer() { -} - -// UnsafeSubjectEncodingServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SubjectEncodingServiceServer will -// result in compilation errors. -type UnsafeSubjectEncodingServiceServer interface { - mustEmbedUnimplementedSubjectEncodingServiceServer() -} - -func RegisterSubjectEncodingServiceServer(s grpc.ServiceRegistrar, srv SubjectEncodingServiceServer) { - s.RegisterService(&SubjectEncodingService_ServiceDesc, srv) -} - -func _SubjectEncodingService_ListSubjectMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListSubjectMappingsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectEncodingServiceServer).ListSubjectMappings(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectEncodingService_ListSubjectMappings_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectEncodingServiceServer).ListSubjectMappings(ctx, req.(*ListSubjectMappingsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SubjectEncodingService_GetSubjectMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSubjectMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectEncodingServiceServer).GetSubjectMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectEncodingService_GetSubjectMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectEncodingServiceServer).GetSubjectMapping(ctx, req.(*GetSubjectMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SubjectEncodingService_CreateSubjectMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSubjectMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectEncodingServiceServer).CreateSubjectMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectEncodingService_CreateSubjectMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectEncodingServiceServer).CreateSubjectMapping(ctx, req.(*CreateSubjectMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SubjectEncodingService_UpdateSubjectMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSubjectMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectEncodingServiceServer).UpdateSubjectMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectEncodingService_UpdateSubjectMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectEncodingServiceServer).UpdateSubjectMapping(ctx, req.(*UpdateSubjectMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SubjectEncodingService_DeleteSubjectMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteSubjectMappingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectEncodingServiceServer).DeleteSubjectMapping(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectEncodingService_DeleteSubjectMapping_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectEncodingServiceServer).DeleteSubjectMapping(ctx, req.(*DeleteSubjectMappingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// SubjectEncodingService_ServiceDesc is the grpc.ServiceDesc for SubjectEncodingService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var SubjectEncodingService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "acse.SubjectEncodingService", - HandlerType: (*SubjectEncodingServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListSubjectMappings", - Handler: _SubjectEncodingService_ListSubjectMappings_Handler, - }, - { - MethodName: "GetSubjectMapping", - Handler: _SubjectEncodingService_GetSubjectMapping_Handler, - }, - { - MethodName: "CreateSubjectMapping", - Handler: _SubjectEncodingService_CreateSubjectMapping_Handler, - }, - { - MethodName: "UpdateSubjectMapping", - Handler: _SubjectEncodingService_UpdateSubjectMapping_Handler, - }, - { - MethodName: "DeleteSubjectMapping", - Handler: _SubjectEncodingService_DeleteSubjectMapping_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "acse/acse.proto", -} diff --git a/sdk/attributes/attributes.pb.go b/sdk/attributes/attributes.pb.go index 8f865a9451..261545a616 100644 --- a/sdk/attributes/attributes.pb.go +++ b/sdk/attributes/attributes.pb.go @@ -9,6 +9,8 @@ package attributes import ( _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" common "github.com/opentdf/opentdf-v2-poc/sdk/common" + kasregistry "github.com/opentdf/opentdf-v2-poc/sdk/kasregistry" + namespaces "github.com/opentdf/opentdf-v2-poc/sdk/namespaces" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -23,70 +25,79 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type AttributeDefinition_AttributeRuleType int32 +// buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package +type AttributeRuleTypeEnum int32 const ( - AttributeDefinition_ATTRIBUTE_RULE_TYPE_UNSPECIFIED AttributeDefinition_AttributeRuleType = 0 - AttributeDefinition_ATTRIBUTE_RULE_TYPE_ALL_OF AttributeDefinition_AttributeRuleType = 1 - AttributeDefinition_ATTRIBUTE_RULE_TYPE_ANY_OF AttributeDefinition_AttributeRuleType = 2 - AttributeDefinition_ATTRIBUTE_RULE_TYPE_HIERARCHICAL AttributeDefinition_AttributeRuleType = 3 + AttributeRuleTypeEnum_ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED AttributeRuleTypeEnum = 0 + AttributeRuleTypeEnum_ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF AttributeRuleTypeEnum = 1 + AttributeRuleTypeEnum_ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF AttributeRuleTypeEnum = 2 + AttributeRuleTypeEnum_ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY AttributeRuleTypeEnum = 3 ) -// Enum value maps for AttributeDefinition_AttributeRuleType. +// Enum value maps for AttributeRuleTypeEnum. var ( - AttributeDefinition_AttributeRuleType_name = map[int32]string{ - 0: "ATTRIBUTE_RULE_TYPE_UNSPECIFIED", - 1: "ATTRIBUTE_RULE_TYPE_ALL_OF", - 2: "ATTRIBUTE_RULE_TYPE_ANY_OF", - 3: "ATTRIBUTE_RULE_TYPE_HIERARCHICAL", - } - AttributeDefinition_AttributeRuleType_value = map[string]int32{ - "ATTRIBUTE_RULE_TYPE_UNSPECIFIED": 0, - "ATTRIBUTE_RULE_TYPE_ALL_OF": 1, - "ATTRIBUTE_RULE_TYPE_ANY_OF": 2, - "ATTRIBUTE_RULE_TYPE_HIERARCHICAL": 3, + AttributeRuleTypeEnum_name = map[int32]string{ + 0: "ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED", + 1: "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF", + 2: "ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF", + 3: "ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY", + } + AttributeRuleTypeEnum_value = map[string]int32{ + "ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED": 0, + "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF": 1, + "ATTRIBUTE_RULE_TYPE_ENUM_ANY_OF": 2, + "ATTRIBUTE_RULE_TYPE_ENUM_HIERARCHY": 3, } ) -func (x AttributeDefinition_AttributeRuleType) Enum() *AttributeDefinition_AttributeRuleType { - p := new(AttributeDefinition_AttributeRuleType) +func (x AttributeRuleTypeEnum) Enum() *AttributeRuleTypeEnum { + p := new(AttributeRuleTypeEnum) *p = x return p } -func (x AttributeDefinition_AttributeRuleType) String() string { +func (x AttributeRuleTypeEnum) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (AttributeDefinition_AttributeRuleType) Descriptor() protoreflect.EnumDescriptor { +func (AttributeRuleTypeEnum) Descriptor() protoreflect.EnumDescriptor { return file_attributes_attributes_proto_enumTypes[0].Descriptor() } -func (AttributeDefinition_AttributeRuleType) Type() protoreflect.EnumType { +func (AttributeRuleTypeEnum) Type() protoreflect.EnumType { return &file_attributes_attributes_proto_enumTypes[0] } -func (x AttributeDefinition_AttributeRuleType) Number() protoreflect.EnumNumber { +func (x AttributeRuleTypeEnum) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use AttributeDefinition_AttributeRuleType.Descriptor instead. -func (AttributeDefinition_AttributeRuleType) EnumDescriptor() ([]byte, []int) { - return file_attributes_attributes_proto_rawDescGZIP(), []int{1, 0} +// Deprecated: Use AttributeRuleTypeEnum.Descriptor instead. +func (AttributeRuleTypeEnum) EnumDescriptor() ([]byte, []int) { + return file_attributes_attributes_proto_rawDescGZIP(), []int{0} } -// Just a set of attributes -type AttributeSet struct { +type Attribute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` - Definitions []*AttributeDefinition `protobuf:"bytes,2,rep,name=definitions,proto3" json:"definitions,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Optional metadata for the attribute definition + Metadata *common.Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // namespace of the attribute + Namespace *namespaces.Namespace `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace,omitempty"` + // attribute name + Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` + // attribute rule enum + Rule AttributeRuleTypeEnum `protobuf:"varint,5,opt,name=rule,proto3,enum=attributes.AttributeRuleTypeEnum" json:"rule,omitempty"` + Values []*Value `protobuf:"bytes,7,rep,name=values,proto3" json:"values,omitempty"` + Grants []*kasregistry.KeyAccessServer `protobuf:"bytes,8,rep,name=grants,proto3" json:"grants,omitempty"` } -func (x *AttributeSet) Reset() { - *x = AttributeSet{} +func (x *Attribute) Reset() { + *x = Attribute{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -94,13 +105,13 @@ func (x *AttributeSet) Reset() { } } -func (x *AttributeSet) String() string { +func (x *Attribute) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AttributeSet) ProtoMessage() {} +func (*Attribute) ProtoMessage() {} -func (x *AttributeSet) ProtoReflect() protoreflect.Message { +func (x *Attribute) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -112,44 +123,79 @@ func (x *AttributeSet) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AttributeSet.ProtoReflect.Descriptor instead. -func (*AttributeSet) Descriptor() ([]byte, []int) { +// Deprecated: Use Attribute.ProtoReflect.Descriptor instead. +func (*Attribute) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{0} } -func (x *AttributeSet) GetDescriptor_() *common.ResourceDescriptor { +func (x *Attribute) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Attribute) GetMetadata() *common.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *Attribute) GetNamespace() *namespaces.Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +func (x *Attribute) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *Attribute) GetRule() AttributeRuleTypeEnum { + if x != nil { + return x.Rule + } + return AttributeRuleTypeEnum_ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED +} + +func (x *Attribute) GetValues() []*Value { if x != nil { - return x.Descriptor_ + return x.Values } return nil } -func (x *AttributeSet) GetDefinitions() []*AttributeDefinition { +func (x *Attribute) GetGrants() []*kasregistry.KeyAccessServer { if x != nil { - return x.Definitions + return x.Grants } return nil } -// Attribute Definition -type AttributeDefinition struct { +type AttributeCreateUpdate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` + // Optional metadata for the attribute definition + Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // namespace of the attribute + NamespaceId string `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"` // attribute name - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // attribute rule enum - Rule AttributeDefinition_AttributeRuleType `protobuf:"varint,3,opt,name=rule,proto3,enum=attributes.AttributeDefinition_AttributeRuleType" json:"rule,omitempty"` - // possible values - Values []*AttributeDefinitionValue `protobuf:"bytes,4,rep,name=values,proto3" json:"values,omitempty"` - // optional attribute group by filtering rules - GroupBy []*AttributeDefinitionValue `protobuf:"bytes,9,rep,name=group_by,json=groupBy,proto3" json:"group_by,omitempty"` + Rule AttributeRuleTypeEnum `protobuf:"varint,4,opt,name=rule,proto3,enum=attributes.AttributeRuleTypeEnum" json:"rule,omitempty"` + // optional + Values []*ValueCreateUpdate `protobuf:"bytes,5,rep,name=values,proto3" json:"values,omitempty"` } -func (x *AttributeDefinition) Reset() { - *x = AttributeDefinition{} +func (x *AttributeCreateUpdate) Reset() { + *x = AttributeCreateUpdate{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -157,13 +203,13 @@ func (x *AttributeDefinition) Reset() { } } -func (x *AttributeDefinition) String() string { +func (x *AttributeCreateUpdate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AttributeDefinition) ProtoMessage() {} +func (*AttributeCreateUpdate) ProtoMessage() {} -func (x *AttributeDefinition) ProtoReflect() protoreflect.Message { +func (x *AttributeCreateUpdate) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -175,61 +221,64 @@ func (x *AttributeDefinition) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AttributeDefinition.ProtoReflect.Descriptor instead. -func (*AttributeDefinition) Descriptor() ([]byte, []int) { +// Deprecated: Use AttributeCreateUpdate.ProtoReflect.Descriptor instead. +func (*AttributeCreateUpdate) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{1} } -func (x *AttributeDefinition) GetDescriptor_() *common.ResourceDescriptor { +func (x *AttributeCreateUpdate) GetMetadata() *common.MetadataMutable { if x != nil { - return x.Descriptor_ + return x.Metadata } return nil } -func (x *AttributeDefinition) GetName() string { +func (x *AttributeCreateUpdate) GetNamespaceId() string { if x != nil { - return x.Name + return x.NamespaceId } return "" } -func (x *AttributeDefinition) GetRule() AttributeDefinition_AttributeRuleType { +func (x *AttributeCreateUpdate) GetName() string { if x != nil { - return x.Rule + return x.Name } - return AttributeDefinition_ATTRIBUTE_RULE_TYPE_UNSPECIFIED + return "" } -func (x *AttributeDefinition) GetValues() []*AttributeDefinitionValue { +func (x *AttributeCreateUpdate) GetRule() AttributeRuleTypeEnum { if x != nil { - return x.Values + return x.Rule } - return nil + return AttributeRuleTypeEnum_ATTRIBUTE_RULE_TYPE_ENUM_UNSPECIFIED } -func (x *AttributeDefinition) GetGroupBy() []*AttributeDefinitionValue { +func (x *AttributeCreateUpdate) GetValues() []*ValueCreateUpdate { if x != nil { - return x.GroupBy + return x.Values } return nil } -// Reference to an attribute value, one of descriptor or embedded value -type AttributeDefinitionReference struct { +type Value struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to Ref: - // - // *AttributeDefinitionReference_Descriptor_ - // *AttributeDefinitionReference_Definition - Ref isAttributeDefinitionReference_Ref `protobuf_oneof:"ref"` + // generated uuid in database + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Metadata *common.Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + AttributeId string `protobuf:"bytes,3,opt,name=attribute_id,json=attributeId,proto3" json:"attribute_id,omitempty"` + Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` + // list of attribute values that this value is related to (attribute group) + Members []string `protobuf:"bytes,5,rep,name=members,proto3" json:"members,omitempty"` + // list of key access servers + Grants []*kasregistry.KeyAccessServer `protobuf:"bytes,6,rep,name=grants,proto3" json:"grants,omitempty"` } -func (x *AttributeDefinitionReference) Reset() { - *x = AttributeDefinitionReference{} +func (x *Value) Reset() { + *x = Value{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -237,13 +286,13 @@ func (x *AttributeDefinitionReference) Reset() { } } -func (x *AttributeDefinitionReference) String() string { +func (x *Value) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AttributeDefinitionReference) ProtoMessage() {} +func (*Value) ProtoMessage() {} -func (x *AttributeDefinitionReference) ProtoReflect() protoreflect.Message { +func (x *Value) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -255,62 +304,66 @@ func (x *AttributeDefinitionReference) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AttributeDefinitionReference.ProtoReflect.Descriptor instead. -func (*AttributeDefinitionReference) Descriptor() ([]byte, []int) { +// Deprecated: Use Value.ProtoReflect.Descriptor instead. +func (*Value) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{2} } -func (m *AttributeDefinitionReference) GetRef() isAttributeDefinitionReference_Ref { - if m != nil { - return m.Ref +func (x *Value) GetId() string { + if x != nil { + return x.Id } - return nil + return "" } -func (x *AttributeDefinitionReference) GetDescriptor_() *common.ResourceDescriptor { - if x, ok := x.GetRef().(*AttributeDefinitionReference_Descriptor_); ok { - return x.Descriptor_ +func (x *Value) GetMetadata() *common.Metadata { + if x != nil { + return x.Metadata } return nil } -func (x *AttributeDefinitionReference) GetDefinition() *AttributeDefinition { - if x, ok := x.GetRef().(*AttributeDefinitionReference_Definition); ok { - return x.Definition +func (x *Value) GetAttributeId() string { + if x != nil { + return x.AttributeId } - return nil + return "" } -type isAttributeDefinitionReference_Ref interface { - isAttributeDefinitionReference_Ref() +func (x *Value) GetValue() string { + if x != nil { + return x.Value + } + return "" } -type AttributeDefinitionReference_Descriptor_ struct { - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3,oneof"` +func (x *Value) GetMembers() []string { + if x != nil { + return x.Members + } + return nil } -type AttributeDefinitionReference_Definition struct { - Definition *AttributeDefinition `protobuf:"bytes,2,opt,name=definition,proto3,oneof"` +func (x *Value) GetGrants() []*kasregistry.KeyAccessServer { + if x != nil { + return x.Grants + } + return nil } -func (*AttributeDefinitionReference_Descriptor_) isAttributeDefinitionReference_Ref() {} - -func (*AttributeDefinitionReference_Definition) isAttributeDefinitionReference_Ref() {} - -// Definition of a single attribute value -type AttributeDefinitionValue struct { +type ValueCreateUpdate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` - // TODO - optional lock down pub key format if needed. Per ATTR KEY? - AttributePublicKey string `protobuf:"bytes,3,opt,name=attribute_public_key,json=attributePublicKey,proto3" json:"attribute_public_key,omitempty"` + Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + // list of attribute values that this value is related to (attribute group) + Members []string `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` } -func (x *AttributeDefinitionValue) Reset() { - *x = AttributeDefinitionValue{} +func (x *ValueCreateUpdate) Reset() { + *x = ValueCreateUpdate{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -318,13 +371,13 @@ func (x *AttributeDefinitionValue) Reset() { } } -func (x *AttributeDefinitionValue) String() string { +func (x *ValueCreateUpdate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AttributeDefinitionValue) ProtoMessage() {} +func (*ValueCreateUpdate) ProtoMessage() {} -func (x *AttributeDefinitionValue) ProtoReflect() protoreflect.Message { +func (x *ValueCreateUpdate) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -336,47 +389,43 @@ func (x *AttributeDefinitionValue) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AttributeDefinitionValue.ProtoReflect.Descriptor instead. -func (*AttributeDefinitionValue) Descriptor() ([]byte, []int) { +// Deprecated: Use ValueCreateUpdate.ProtoReflect.Descriptor instead. +func (*ValueCreateUpdate) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{3} } -func (x *AttributeDefinitionValue) GetDescriptor_() *common.ResourceDescriptor { +func (x *ValueCreateUpdate) GetMetadata() *common.MetadataMutable { if x != nil { - return x.Descriptor_ + return x.Metadata } return nil } -func (x *AttributeDefinitionValue) GetValue() string { +func (x *ValueCreateUpdate) GetValue() string { if x != nil { return x.Value } return "" } -func (x *AttributeDefinitionValue) GetAttributePublicKey() string { +func (x *ValueCreateUpdate) GetMembers() []string { if x != nil { - return x.AttributePublicKey + return x.Members } - return "" + return nil } -// Reference to an attribute value, one of descriptor or embedded value -type AttributeValueReference struct { +type AttributeKeyAccessServer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Types that are assignable to Ref: - // - // *AttributeValueReference_Descriptor_ - // *AttributeValueReference_AttributeValue - Ref isAttributeValueReference_Ref `protobuf_oneof:"ref"` + AttributeId string `protobuf:"bytes,1,opt,name=attribute_id,json=attributeId,proto3" json:"attribute_id,omitempty"` + KeyAccessServerId string `protobuf:"bytes,2,opt,name=key_access_server_id,json=keyAccessServerId,proto3" json:"key_access_server_id,omitempty"` } -func (x *AttributeValueReference) Reset() { - *x = AttributeValueReference{} +func (x *AttributeKeyAccessServer) Reset() { + *x = AttributeKeyAccessServer{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -384,13 +433,13 @@ func (x *AttributeValueReference) Reset() { } } -func (x *AttributeValueReference) String() string { +func (x *AttributeKeyAccessServer) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AttributeValueReference) ProtoMessage() {} +func (*AttributeKeyAccessServer) ProtoMessage() {} -func (x *AttributeValueReference) ProtoReflect() protoreflect.Message { +func (x *AttributeKeyAccessServer) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -402,68 +451,36 @@ func (x *AttributeValueReference) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AttributeValueReference.ProtoReflect.Descriptor instead. -func (*AttributeValueReference) Descriptor() ([]byte, []int) { +// Deprecated: Use AttributeKeyAccessServer.ProtoReflect.Descriptor instead. +func (*AttributeKeyAccessServer) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{4} } -func (m *AttributeValueReference) GetRef() isAttributeValueReference_Ref { - if m != nil { - return m.Ref - } - return nil -} - -func (x *AttributeValueReference) GetDescriptor_() *common.ResourceDescriptor { - if x, ok := x.GetRef().(*AttributeValueReference_Descriptor_); ok { - return x.Descriptor_ +func (x *AttributeKeyAccessServer) GetAttributeId() string { + if x != nil { + return x.AttributeId } - return nil + return "" } -func (x *AttributeValueReference) GetAttributeValue() *AttributeDefinitionValue { - if x, ok := x.GetRef().(*AttributeValueReference_AttributeValue); ok { - return x.AttributeValue +func (x *AttributeKeyAccessServer) GetKeyAccessServerId() string { + if x != nil { + return x.KeyAccessServerId } - return nil -} - -type isAttributeValueReference_Ref interface { - isAttributeValueReference_Ref() -} - -type AttributeValueReference_Descriptor_ struct { - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3,oneof"` -} - -type AttributeValueReference_AttributeValue struct { - AttributeValue *AttributeDefinitionValue `protobuf:"bytes,2,opt,name=attribute_value,json=attributeValue,proto3,oneof"` + return "" } -func (*AttributeValueReference_Descriptor_) isAttributeValueReference_Ref() {} - -func (*AttributeValueReference_AttributeValue) isAttributeValueReference_Ref() {} - -// represent an attribute value as a group with other attribute values as members -// -// Example for Org1 FVEY: -// id: 1 -// version: 1.0 -// namespace: demo.com -// groupValue: http://demo.com/attr/relTo/FVEY -// members: [http://demo.com/attr/relTo/USA,http://demo.com/attr/relTo/GBR,...] -type AttributeGroup struct { +type ValueKeyAccessServer struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` - GroupValue *AttributeValueReference `protobuf:"bytes,2,opt,name=group_value,json=groupValue,proto3" json:"group_value,omitempty"` - MemberValues []*AttributeValueReference `protobuf:"bytes,3,rep,name=member_values,json=memberValues,proto3" json:"member_values,omitempty"` + ValueId string `protobuf:"bytes,1,opt,name=value_id,json=valueId,proto3" json:"value_id,omitempty"` + KeyAccessServerId string `protobuf:"bytes,2,opt,name=key_access_server_id,json=keyAccessServerId,proto3" json:"key_access_server_id,omitempty"` } -func (x *AttributeGroup) Reset() { - *x = AttributeGroup{} +func (x *ValueKeyAccessServer) Reset() { + *x = ValueKeyAccessServer{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -471,13 +488,13 @@ func (x *AttributeGroup) Reset() { } } -func (x *AttributeGroup) String() string { +func (x *ValueKeyAccessServer) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AttributeGroup) ProtoMessage() {} +func (*ValueKeyAccessServer) ProtoMessage() {} -func (x *AttributeGroup) ProtoReflect() protoreflect.Message { +func (x *ValueKeyAccessServer) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -489,42 +506,33 @@ func (x *AttributeGroup) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AttributeGroup.ProtoReflect.Descriptor instead. -func (*AttributeGroup) Descriptor() ([]byte, []int) { +// Deprecated: Use ValueKeyAccessServer.ProtoReflect.Descriptor instead. +func (*ValueKeyAccessServer) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{5} } -func (x *AttributeGroup) GetDescriptor_() *common.ResourceDescriptor { - if x != nil { - return x.Descriptor_ - } - return nil -} - -func (x *AttributeGroup) GetGroupValue() *AttributeValueReference { +func (x *ValueKeyAccessServer) GetValueId() string { if x != nil { - return x.GroupValue + return x.ValueId } - return nil + return "" } -func (x *AttributeGroup) GetMemberValues() []*AttributeValueReference { +func (x *ValueKeyAccessServer) GetKeyAccessServerId() string { if x != nil { - return x.MemberValues + return x.KeyAccessServerId } - return nil + return "" } -type GetAttributeRequest struct { +type ListAttributesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *GetAttributeRequest) Reset() { - *x = GetAttributeRequest{} +func (x *ListAttributesRequest) Reset() { + *x = ListAttributesRequest{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -532,13 +540,13 @@ func (x *GetAttributeRequest) Reset() { } } -func (x *GetAttributeRequest) String() string { +func (x *ListAttributesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAttributeRequest) ProtoMessage() {} +func (*ListAttributesRequest) ProtoMessage() {} -func (x *GetAttributeRequest) ProtoReflect() protoreflect.Message { +func (x *ListAttributesRequest) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -550,28 +558,21 @@ func (x *GetAttributeRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAttributeRequest.ProtoReflect.Descriptor instead. -func (*GetAttributeRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListAttributesRequest.ProtoReflect.Descriptor instead. +func (*ListAttributesRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{6} } -func (x *GetAttributeRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type GetAttributeResponse struct { +type ListAttributesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Definition *AttributeDefinition `protobuf:"bytes,1,opt,name=definition,proto3" json:"definition,omitempty"` + Attributes []*Attribute `protobuf:"bytes,1,rep,name=attributes,proto3" json:"attributes,omitempty"` } -func (x *GetAttributeResponse) Reset() { - *x = GetAttributeResponse{} +func (x *ListAttributesResponse) Reset() { + *x = ListAttributesResponse{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -579,13 +580,13 @@ func (x *GetAttributeResponse) Reset() { } } -func (x *GetAttributeResponse) String() string { +func (x *ListAttributesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAttributeResponse) ProtoMessage() {} +func (*ListAttributesResponse) ProtoMessage() {} -func (x *GetAttributeResponse) ProtoReflect() protoreflect.Message { +func (x *ListAttributesResponse) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -597,28 +598,28 @@ func (x *GetAttributeResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAttributeResponse.ProtoReflect.Descriptor instead. -func (*GetAttributeResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListAttributesResponse.ProtoReflect.Descriptor instead. +func (*ListAttributesResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{7} } -func (x *GetAttributeResponse) GetDefinition() *AttributeDefinition { +func (x *ListAttributesResponse) GetAttributes() []*Attribute { if x != nil { - return x.Definition + return x.Attributes } return nil } -type ListAttributesRequest struct { +type GetAttributeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Selector *common.ResourceSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *ListAttributesRequest) Reset() { - *x = ListAttributesRequest{} +func (x *GetAttributeRequest) Reset() { + *x = GetAttributeRequest{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -626,13 +627,13 @@ func (x *ListAttributesRequest) Reset() { } } -func (x *ListAttributesRequest) String() string { +func (x *GetAttributeRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListAttributesRequest) ProtoMessage() {} +func (*GetAttributeRequest) ProtoMessage() {} -func (x *ListAttributesRequest) ProtoReflect() protoreflect.Message { +func (x *GetAttributeRequest) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -644,28 +645,28 @@ func (x *ListAttributesRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListAttributesRequest.ProtoReflect.Descriptor instead. -func (*ListAttributesRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetAttributeRequest.ProtoReflect.Descriptor instead. +func (*GetAttributeRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{8} } -func (x *ListAttributesRequest) GetSelector() *common.ResourceSelector { +func (x *GetAttributeRequest) GetId() string { if x != nil { - return x.Selector + return x.Id } - return nil + return "" } -type ListAttributesResponse struct { +type GetAttributeResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Definitions []*AttributeDefinition `protobuf:"bytes,1,rep,name=definitions,proto3" json:"definitions,omitempty"` + Attribute *Attribute `protobuf:"bytes,1,opt,name=attribute,proto3" json:"attribute,omitempty"` } -func (x *ListAttributesResponse) Reset() { - *x = ListAttributesResponse{} +func (x *GetAttributeResponse) Reset() { + *x = GetAttributeResponse{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -673,13 +674,13 @@ func (x *ListAttributesResponse) Reset() { } } -func (x *ListAttributesResponse) String() string { +func (x *GetAttributeResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListAttributesResponse) ProtoMessage() {} +func (*GetAttributeResponse) ProtoMessage() {} -func (x *ListAttributesResponse) ProtoReflect() protoreflect.Message { +func (x *GetAttributeResponse) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -691,14 +692,14 @@ func (x *ListAttributesResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListAttributesResponse.ProtoReflect.Descriptor instead. -func (*ListAttributesResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetAttributeResponse.ProtoReflect.Descriptor instead. +func (*GetAttributeResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{9} } -func (x *ListAttributesResponse) GetDefinitions() []*AttributeDefinition { +func (x *GetAttributeResponse) GetAttribute() *Attribute { if x != nil { - return x.Definitions + return x.Attribute } return nil } @@ -708,7 +709,7 @@ type CreateAttributeRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Definition *AttributeDefinition `protobuf:"bytes,1,opt,name=definition,proto3" json:"definition,omitempty"` + Attribute *AttributeCreateUpdate `protobuf:"bytes,1,opt,name=attribute,proto3" json:"attribute,omitempty"` } func (x *CreateAttributeRequest) Reset() { @@ -743,9 +744,9 @@ func (*CreateAttributeRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{10} } -func (x *CreateAttributeRequest) GetDefinition() *AttributeDefinition { +func (x *CreateAttributeRequest) GetAttribute() *AttributeCreateUpdate { if x != nil { - return x.Definition + return x.Attribute } return nil } @@ -754,6 +755,8 @@ type CreateAttributeResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Attribute *Attribute `protobuf:"bytes,1,opt,name=attribute,proto3" json:"attribute,omitempty"` } func (x *CreateAttributeResponse) Reset() { @@ -788,13 +791,20 @@ func (*CreateAttributeResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{11} } +func (x *CreateAttributeResponse) GetAttribute() *Attribute { + if x != nil { + return x.Attribute + } + return nil +} + type UpdateAttributeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Definition *AttributeDefinition `protobuf:"bytes,2,opt,name=definition,proto3" json:"definition,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Attribute *AttributeCreateUpdate `protobuf:"bytes,2,opt,name=attribute,proto3" json:"attribute,omitempty"` } func (x *UpdateAttributeRequest) Reset() { @@ -829,16 +839,16 @@ func (*UpdateAttributeRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{12} } -func (x *UpdateAttributeRequest) GetId() int32 { +func (x *UpdateAttributeRequest) GetId() string { if x != nil { return x.Id } - return 0 + return "" } -func (x *UpdateAttributeRequest) GetDefinition() *AttributeDefinition { +func (x *UpdateAttributeRequest) GetAttribute() *AttributeCreateUpdate { if x != nil { - return x.Definition + return x.Attribute } return nil } @@ -847,6 +857,8 @@ type UpdateAttributeResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Attribute *Attribute `protobuf:"bytes,1,opt,name=attribute,proto3" json:"attribute,omitempty"` } func (x *UpdateAttributeResponse) Reset() { @@ -881,12 +893,19 @@ func (*UpdateAttributeResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{13} } +func (x *UpdateAttributeResponse) GetAttribute() *Attribute { + if x != nil { + return x.Attribute + } + return nil +} + type DeleteAttributeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *DeleteAttributeRequest) Reset() { @@ -921,17 +940,19 @@ func (*DeleteAttributeRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{14} } -func (x *DeleteAttributeRequest) GetId() int32 { +func (x *DeleteAttributeRequest) GetId() string { if x != nil { return x.Id } - return 0 + return "" } type DeleteAttributeResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Attribute *Attribute `protobuf:"bytes,1,opt,name=attribute,proto3" json:"attribute,omitempty"` } func (x *DeleteAttributeResponse) Reset() { @@ -966,16 +987,26 @@ func (*DeleteAttributeResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{15} } -type GetAttributeGroupRequest struct { +func (x *DeleteAttributeResponse) GetAttribute() *Attribute { + if x != nil { + return x.Attribute + } + return nil +} + +// / +// / Value RPC messages +// / +type GetAttributeValueRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *GetAttributeGroupRequest) Reset() { - *x = GetAttributeGroupRequest{} +func (x *GetAttributeValueRequest) Reset() { + *x = GetAttributeValueRequest{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -983,13 +1014,13 @@ func (x *GetAttributeGroupRequest) Reset() { } } -func (x *GetAttributeGroupRequest) String() string { +func (x *GetAttributeValueRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAttributeGroupRequest) ProtoMessage() {} +func (*GetAttributeValueRequest) ProtoMessage() {} -func (x *GetAttributeGroupRequest) ProtoReflect() protoreflect.Message { +func (x *GetAttributeValueRequest) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1001,28 +1032,28 @@ func (x *GetAttributeGroupRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAttributeGroupRequest.ProtoReflect.Descriptor instead. -func (*GetAttributeGroupRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use GetAttributeValueRequest.ProtoReflect.Descriptor instead. +func (*GetAttributeValueRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{16} } -func (x *GetAttributeGroupRequest) GetId() int32 { +func (x *GetAttributeValueRequest) GetId() string { if x != nil { return x.Id } - return 0 + return "" } -type GetAttributeGroupResponse struct { +type GetAttributeValueResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Group *AttributeGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (x *GetAttributeGroupResponse) Reset() { - *x = GetAttributeGroupResponse{} +func (x *GetAttributeValueResponse) Reset() { + *x = GetAttributeValueResponse{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1030,13 +1061,13 @@ func (x *GetAttributeGroupResponse) Reset() { } } -func (x *GetAttributeGroupResponse) String() string { +func (x *GetAttributeValueResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GetAttributeGroupResponse) ProtoMessage() {} +func (*GetAttributeValueResponse) ProtoMessage() {} -func (x *GetAttributeGroupResponse) ProtoReflect() protoreflect.Message { +func (x *GetAttributeValueResponse) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1048,28 +1079,28 @@ func (x *GetAttributeGroupResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GetAttributeGroupResponse.ProtoReflect.Descriptor instead. -func (*GetAttributeGroupResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use GetAttributeValueResponse.ProtoReflect.Descriptor instead. +func (*GetAttributeValueResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{17} } -func (x *GetAttributeGroupResponse) GetGroup() *AttributeGroup { +func (x *GetAttributeValueResponse) GetValue() *Value { if x != nil { - return x.Group + return x.Value } return nil } -type ListAttributeGroupsRequest struct { +type ListAttributeValuesRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Selector *common.ResourceSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` + AttributeId string `protobuf:"bytes,1,opt,name=attribute_id,json=attributeId,proto3" json:"attribute_id,omitempty"` } -func (x *ListAttributeGroupsRequest) Reset() { - *x = ListAttributeGroupsRequest{} +func (x *ListAttributeValuesRequest) Reset() { + *x = ListAttributeValuesRequest{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1077,13 +1108,13 @@ func (x *ListAttributeGroupsRequest) Reset() { } } -func (x *ListAttributeGroupsRequest) String() string { +func (x *ListAttributeValuesRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListAttributeGroupsRequest) ProtoMessage() {} +func (*ListAttributeValuesRequest) ProtoMessage() {} -func (x *ListAttributeGroupsRequest) ProtoReflect() protoreflect.Message { +func (x *ListAttributeValuesRequest) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1095,28 +1126,28 @@ func (x *ListAttributeGroupsRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListAttributeGroupsRequest.ProtoReflect.Descriptor instead. -func (*ListAttributeGroupsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListAttributeValuesRequest.ProtoReflect.Descriptor instead. +func (*ListAttributeValuesRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{18} } -func (x *ListAttributeGroupsRequest) GetSelector() *common.ResourceSelector { +func (x *ListAttributeValuesRequest) GetAttributeId() string { if x != nil { - return x.Selector + return x.AttributeId } - return nil + return "" } -type ListAttributeGroupsResponse struct { +type ListAttributeValuesResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Groups []*AttributeGroup `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` + Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` } -func (x *ListAttributeGroupsResponse) Reset() { - *x = ListAttributeGroupsResponse{} +func (x *ListAttributeValuesResponse) Reset() { + *x = ListAttributeValuesResponse{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1124,13 +1155,13 @@ func (x *ListAttributeGroupsResponse) Reset() { } } -func (x *ListAttributeGroupsResponse) String() string { +func (x *ListAttributeValuesResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListAttributeGroupsResponse) ProtoMessage() {} +func (*ListAttributeValuesResponse) ProtoMessage() {} -func (x *ListAttributeGroupsResponse) ProtoReflect() protoreflect.Message { +func (x *ListAttributeValuesResponse) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1142,28 +1173,29 @@ func (x *ListAttributeGroupsResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListAttributeGroupsResponse.ProtoReflect.Descriptor instead. -func (*ListAttributeGroupsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListAttributeValuesResponse.ProtoReflect.Descriptor instead. +func (*ListAttributeValuesResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{19} } -func (x *ListAttributeGroupsResponse) GetGroups() []*AttributeGroup { +func (x *ListAttributeValuesResponse) GetValues() []*Value { if x != nil { - return x.Groups + return x.Values } return nil } -type CreateAttributeGroupRequest struct { +type CreateAttributeValueRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Group *AttributeGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` + AttributeId string `protobuf:"bytes,1,opt,name=attribute_id,json=attributeId,proto3" json:"attribute_id,omitempty"` + Value *ValueCreateUpdate `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` } -func (x *CreateAttributeGroupRequest) Reset() { - *x = CreateAttributeGroupRequest{} +func (x *CreateAttributeValueRequest) Reset() { + *x = CreateAttributeValueRequest{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1171,13 +1203,13 @@ func (x *CreateAttributeGroupRequest) Reset() { } } -func (x *CreateAttributeGroupRequest) String() string { +func (x *CreateAttributeValueRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateAttributeGroupRequest) ProtoMessage() {} +func (*CreateAttributeValueRequest) ProtoMessage() {} -func (x *CreateAttributeGroupRequest) ProtoReflect() protoreflect.Message { +func (x *CreateAttributeValueRequest) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1189,26 +1221,35 @@ func (x *CreateAttributeGroupRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateAttributeGroupRequest.ProtoReflect.Descriptor instead. -func (*CreateAttributeGroupRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateAttributeValueRequest.ProtoReflect.Descriptor instead. +func (*CreateAttributeValueRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{20} } -func (x *CreateAttributeGroupRequest) GetGroup() *AttributeGroup { +func (x *CreateAttributeValueRequest) GetAttributeId() string { + if x != nil { + return x.AttributeId + } + return "" +} + +func (x *CreateAttributeValueRequest) GetValue() *ValueCreateUpdate { if x != nil { - return x.Group + return x.Value } return nil } -type CreateAttributeGroupResponse struct { +type CreateAttributeValueResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (x *CreateAttributeGroupResponse) Reset() { - *x = CreateAttributeGroupResponse{} +func (x *CreateAttributeValueResponse) Reset() { + *x = CreateAttributeValueResponse{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1216,13 +1257,13 @@ func (x *CreateAttributeGroupResponse) Reset() { } } -func (x *CreateAttributeGroupResponse) String() string { +func (x *CreateAttributeValueResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateAttributeGroupResponse) ProtoMessage() {} +func (*CreateAttributeValueResponse) ProtoMessage() {} -func (x *CreateAttributeGroupResponse) ProtoReflect() protoreflect.Message { +func (x *CreateAttributeValueResponse) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1234,22 +1275,30 @@ func (x *CreateAttributeGroupResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateAttributeGroupResponse.ProtoReflect.Descriptor instead. -func (*CreateAttributeGroupResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateAttributeValueResponse.ProtoReflect.Descriptor instead. +func (*CreateAttributeValueResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{21} } -type UpdateAttributeGroupRequest struct { +func (x *CreateAttributeValueResponse) GetValue() *Value { + if x != nil { + return x.Value + } + return nil +} + +type UpdateAttributeValueRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Group *AttributeGroup `protobuf:"bytes,2,opt,name=group,proto3" json:"group,omitempty"` + AttributeId string `protobuf:"bytes,1,opt,name=attribute_id,json=attributeId,proto3" json:"attribute_id,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Value *ValueCreateUpdate `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"` } -func (x *UpdateAttributeGroupRequest) Reset() { - *x = UpdateAttributeGroupRequest{} +func (x *UpdateAttributeValueRequest) Reset() { + *x = UpdateAttributeValueRequest{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1257,13 +1306,13 @@ func (x *UpdateAttributeGroupRequest) Reset() { } } -func (x *UpdateAttributeGroupRequest) String() string { +func (x *UpdateAttributeValueRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateAttributeGroupRequest) ProtoMessage() {} +func (*UpdateAttributeValueRequest) ProtoMessage() {} -func (x *UpdateAttributeGroupRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateAttributeValueRequest) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1275,33 +1324,42 @@ func (x *UpdateAttributeGroupRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateAttributeGroupRequest.ProtoReflect.Descriptor instead. -func (*UpdateAttributeGroupRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateAttributeValueRequest.ProtoReflect.Descriptor instead. +func (*UpdateAttributeValueRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{22} } -func (x *UpdateAttributeGroupRequest) GetId() int32 { +func (x *UpdateAttributeValueRequest) GetAttributeId() string { + if x != nil { + return x.AttributeId + } + return "" +} + +func (x *UpdateAttributeValueRequest) GetId() string { if x != nil { return x.Id } - return 0 + return "" } -func (x *UpdateAttributeGroupRequest) GetGroup() *AttributeGroup { +func (x *UpdateAttributeValueRequest) GetValue() *ValueCreateUpdate { if x != nil { - return x.Group + return x.Value } return nil } -type UpdateAttributeGroupResponse struct { +type UpdateAttributeValueResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (x *UpdateAttributeGroupResponse) Reset() { - *x = UpdateAttributeGroupResponse{} +func (x *UpdateAttributeValueResponse) Reset() { + *x = UpdateAttributeValueResponse{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1309,13 +1367,13 @@ func (x *UpdateAttributeGroupResponse) Reset() { } } -func (x *UpdateAttributeGroupResponse) String() string { +func (x *UpdateAttributeValueResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateAttributeGroupResponse) ProtoMessage() {} +func (*UpdateAttributeValueResponse) ProtoMessage() {} -func (x *UpdateAttributeGroupResponse) ProtoReflect() protoreflect.Message { +func (x *UpdateAttributeValueResponse) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1327,21 +1385,28 @@ func (x *UpdateAttributeGroupResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateAttributeGroupResponse.ProtoReflect.Descriptor instead. -func (*UpdateAttributeGroupResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateAttributeValueResponse.ProtoReflect.Descriptor instead. +func (*UpdateAttributeValueResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{23} } -type DeleteAttributeGroupRequest struct { +func (x *UpdateAttributeValueResponse) GetValue() *Value { + if x != nil { + return x.Value + } + return nil +} + +type DeleteAttributeValueRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *DeleteAttributeGroupRequest) Reset() { - *x = DeleteAttributeGroupRequest{} +func (x *DeleteAttributeValueRequest) Reset() { + *x = DeleteAttributeValueRequest{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1349,13 +1414,13 @@ func (x *DeleteAttributeGroupRequest) Reset() { } } -func (x *DeleteAttributeGroupRequest) String() string { +func (x *DeleteAttributeValueRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteAttributeGroupRequest) ProtoMessage() {} +func (*DeleteAttributeValueRequest) ProtoMessage() {} -func (x *DeleteAttributeGroupRequest) ProtoReflect() protoreflect.Message { +func (x *DeleteAttributeValueRequest) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1367,26 +1432,28 @@ func (x *DeleteAttributeGroupRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeleteAttributeGroupRequest.ProtoReflect.Descriptor instead. -func (*DeleteAttributeGroupRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteAttributeValueRequest.ProtoReflect.Descriptor instead. +func (*DeleteAttributeValueRequest) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{24} } -func (x *DeleteAttributeGroupRequest) GetId() int32 { +func (x *DeleteAttributeValueRequest) GetId() string { if x != nil { return x.Id } - return 0 + return "" } -type DeleteAttributeGroupResponse struct { +type DeleteAttributeValueResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Value *Value `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` } -func (x *DeleteAttributeGroupResponse) Reset() { - *x = DeleteAttributeGroupResponse{} +func (x *DeleteAttributeValueResponse) Reset() { + *x = DeleteAttributeValueResponse{} if protoimpl.UnsafeEnabled { mi := &file_attributes_attributes_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1394,13 +1461,13 @@ func (x *DeleteAttributeGroupResponse) Reset() { } } -func (x *DeleteAttributeGroupResponse) String() string { +func (x *DeleteAttributeValueResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteAttributeGroupResponse) ProtoMessage() {} +func (*DeleteAttributeValueResponse) ProtoMessage() {} -func (x *DeleteAttributeGroupResponse) ProtoReflect() protoreflect.Message { +func (x *DeleteAttributeValueResponse) ProtoReflect() protoreflect.Message { mi := &file_attributes_attributes_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1412,384 +1479,929 @@ func (x *DeleteAttributeGroupResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeleteAttributeGroupResponse.ProtoReflect.Descriptor instead. -func (*DeleteAttributeGroupResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use DeleteAttributeValueResponse.ProtoReflect.Descriptor instead. +func (*DeleteAttributeValueResponse) Descriptor() ([]byte, []int) { return file_attributes_attributes_proto_rawDescGZIP(), []int{25} } -var File_attributes_attributes_proto protoreflect.FileDescriptor - -var file_attributes_attributes_proto_rawDesc = []byte{ - 0x0a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, - 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8d, 0x01, 0x0a, 0x0c, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x53, 0x65, 0x74, 0x12, 0x3a, 0x0a, 0x0a, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0b, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xe1, 0x03, 0x0a, 0x13, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x3a, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1a, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, - 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x52, 0x0a, 0x04, 0x72, 0x75, 0x6c, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, - 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x3c, 0x0a, - 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x08, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x62, 0x79, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x79, 0x22, 0x9e, 0x01, 0x0a, - 0x11, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, - 0x52, 0x55, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x54, 0x54, 0x52, 0x49, - 0x42, 0x55, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, - 0x4c, 0x4c, 0x5f, 0x4f, 0x46, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x54, 0x54, 0x52, 0x49, - 0x42, 0x55, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x41, - 0x4e, 0x59, 0x5f, 0x4f, 0x46, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x41, 0x54, 0x54, 0x52, 0x49, - 0x42, 0x55, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, - 0x49, 0x45, 0x52, 0x41, 0x52, 0x43, 0x48, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x03, 0x22, 0xa6, 0x01, - 0x0a, 0x1c, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3c, - 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x48, 0x00, - 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x41, 0x0a, 0x0a, - 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, - 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, 0x9e, 0x01, 0x0a, 0x18, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x50, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0xaf, 0x01, 0x0a, 0x17, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, - 0x6e, 0x63, 0x65, 0x12, 0x3c, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x12, 0x4f, 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, - 0x48, 0x00, 0x52, 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x42, 0x05, 0x0a, 0x03, 0x72, 0x65, 0x66, 0x22, 0xdc, 0x01, 0x0a, 0x0e, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x3a, 0x0a, 0x0a, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x44, 0x0a, 0x0b, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x0a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x48, - 0x0a, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x62, - 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x2d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, - 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x57, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3f, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x22, 0x4d, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, - 0x5b, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0b, 0x64, 0x65, 0x66, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0b, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x61, 0x0a, 0x16, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0xba, 0x48, 0x03, - 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x19, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x79, 0x0a, 0x16, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, - 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x47, 0x0a, 0x0a, - 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x19, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x30, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, - 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x4d, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x30, - 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x22, 0x52, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, - 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, - 0x63, 0x74, 0x6f, 0x72, 0x22, 0x51, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x57, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x22, 0x1e, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x6f, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, - 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x38, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x22, 0x1e, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x35, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, - 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf1, 0x0a, 0x0a, 0x11, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x79, - 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x1f, - 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x12, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x83, 0x01, 0x0a, 0x11, 0x47, 0x65, - 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, - 0x24, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, - 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1b, 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, - 0x7a, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x12, 0x21, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, - 0x12, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2f, - 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x84, 0x01, 0x0a, 0x13, - 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x12, 0x26, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x12, 0x14, 0x2f, 0x76, - 0x31, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x12, 0x8a, 0x01, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x8f, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x27, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1e, 0x3a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x15, 0x2f, 0x76, 0x31, 0x2f, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x73, 0x12, 0x8e, 0x01, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x3a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x2f, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, - 0x64, 0x7d, 0x12, 0x93, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x27, 0x2e, 0x61, 0x74, - 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x19, 0x2f, - 0x76, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x82, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x26, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x2a, 0x1e, 0x2f, - 0x76, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x2f, 0x64, 0x65, 0x66, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8c, 0x01, - 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x27, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, - 0x74, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x28, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1b, 0x2a, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x9b, 0x01, 0x0a, - 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, - 0x0f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, 0x76, - 0x32, 0x2d, 0x70, 0x6f, 0x63, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x41, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0xca, 0x02, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0xe2, 0x02, 0x16, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, - 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, +func (x *DeleteAttributeValueResponse) GetValue() *Value { + if x != nil { + return x.Value + } + return nil } -var ( - file_attributes_attributes_proto_rawDescOnce sync.Once - file_attributes_attributes_proto_rawDescData = file_attributes_attributes_proto_rawDesc -) +type AssignKeyAccessServerToAttributeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func file_attributes_attributes_proto_rawDescGZIP() []byte { - file_attributes_attributes_proto_rawDescOnce.Do(func() { + AttributeKeyAccessServer *AttributeKeyAccessServer `protobuf:"bytes,1,opt,name=attribute_key_access_server,json=attributeKeyAccessServer,proto3" json:"attribute_key_access_server,omitempty"` +} + +func (x *AssignKeyAccessServerToAttributeRequest) Reset() { + *x = AssignKeyAccessServerToAttributeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_attributes_attributes_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssignKeyAccessServerToAttributeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignKeyAccessServerToAttributeRequest) ProtoMessage() {} + +func (x *AssignKeyAccessServerToAttributeRequest) ProtoReflect() protoreflect.Message { + mi := &file_attributes_attributes_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssignKeyAccessServerToAttributeRequest.ProtoReflect.Descriptor instead. +func (*AssignKeyAccessServerToAttributeRequest) Descriptor() ([]byte, []int) { + return file_attributes_attributes_proto_rawDescGZIP(), []int{26} +} + +func (x *AssignKeyAccessServerToAttributeRequest) GetAttributeKeyAccessServer() *AttributeKeyAccessServer { + if x != nil { + return x.AttributeKeyAccessServer + } + return nil +} + +type AssignKeyAccessServerToAttributeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttributeKeyAccessServer *AttributeKeyAccessServer `protobuf:"bytes,1,opt,name=attribute_key_access_server,json=attributeKeyAccessServer,proto3" json:"attribute_key_access_server,omitempty"` +} + +func (x *AssignKeyAccessServerToAttributeResponse) Reset() { + *x = AssignKeyAccessServerToAttributeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_attributes_attributes_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssignKeyAccessServerToAttributeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignKeyAccessServerToAttributeResponse) ProtoMessage() {} + +func (x *AssignKeyAccessServerToAttributeResponse) ProtoReflect() protoreflect.Message { + mi := &file_attributes_attributes_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssignKeyAccessServerToAttributeResponse.ProtoReflect.Descriptor instead. +func (*AssignKeyAccessServerToAttributeResponse) Descriptor() ([]byte, []int) { + return file_attributes_attributes_proto_rawDescGZIP(), []int{27} +} + +func (x *AssignKeyAccessServerToAttributeResponse) GetAttributeKeyAccessServer() *AttributeKeyAccessServer { + if x != nil { + return x.AttributeKeyAccessServer + } + return nil +} + +type RemoveKeyAccessServerFromAttributeRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttributeKeyAccessServer *AttributeKeyAccessServer `protobuf:"bytes,1,opt,name=attribute_key_access_server,json=attributeKeyAccessServer,proto3" json:"attribute_key_access_server,omitempty"` +} + +func (x *RemoveKeyAccessServerFromAttributeRequest) Reset() { + *x = RemoveKeyAccessServerFromAttributeRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_attributes_attributes_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveKeyAccessServerFromAttributeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveKeyAccessServerFromAttributeRequest) ProtoMessage() {} + +func (x *RemoveKeyAccessServerFromAttributeRequest) ProtoReflect() protoreflect.Message { + mi := &file_attributes_attributes_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveKeyAccessServerFromAttributeRequest.ProtoReflect.Descriptor instead. +func (*RemoveKeyAccessServerFromAttributeRequest) Descriptor() ([]byte, []int) { + return file_attributes_attributes_proto_rawDescGZIP(), []int{28} +} + +func (x *RemoveKeyAccessServerFromAttributeRequest) GetAttributeKeyAccessServer() *AttributeKeyAccessServer { + if x != nil { + return x.AttributeKeyAccessServer + } + return nil +} + +type RemoveKeyAccessServerFromAttributeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + AttributeKeyAccessServer *AttributeKeyAccessServer `protobuf:"bytes,1,opt,name=attribute_key_access_server,json=attributeKeyAccessServer,proto3" json:"attribute_key_access_server,omitempty"` +} + +func (x *RemoveKeyAccessServerFromAttributeResponse) Reset() { + *x = RemoveKeyAccessServerFromAttributeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_attributes_attributes_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveKeyAccessServerFromAttributeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveKeyAccessServerFromAttributeResponse) ProtoMessage() {} + +func (x *RemoveKeyAccessServerFromAttributeResponse) ProtoReflect() protoreflect.Message { + mi := &file_attributes_attributes_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveKeyAccessServerFromAttributeResponse.ProtoReflect.Descriptor instead. +func (*RemoveKeyAccessServerFromAttributeResponse) Descriptor() ([]byte, []int) { + return file_attributes_attributes_proto_rawDescGZIP(), []int{29} +} + +func (x *RemoveKeyAccessServerFromAttributeResponse) GetAttributeKeyAccessServer() *AttributeKeyAccessServer { + if x != nil { + return x.AttributeKeyAccessServer + } + return nil +} + +type AssignKeyAccessServerToValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValueKeyAccessServer *ValueKeyAccessServer `protobuf:"bytes,1,opt,name=value_key_access_server,json=valueKeyAccessServer,proto3" json:"value_key_access_server,omitempty"` +} + +func (x *AssignKeyAccessServerToValueRequest) Reset() { + *x = AssignKeyAccessServerToValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_attributes_attributes_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssignKeyAccessServerToValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignKeyAccessServerToValueRequest) ProtoMessage() {} + +func (x *AssignKeyAccessServerToValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_attributes_attributes_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssignKeyAccessServerToValueRequest.ProtoReflect.Descriptor instead. +func (*AssignKeyAccessServerToValueRequest) Descriptor() ([]byte, []int) { + return file_attributes_attributes_proto_rawDescGZIP(), []int{30} +} + +func (x *AssignKeyAccessServerToValueRequest) GetValueKeyAccessServer() *ValueKeyAccessServer { + if x != nil { + return x.ValueKeyAccessServer + } + return nil +} + +type AssignKeyAccessServerToValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValueKeyAccessServer *ValueKeyAccessServer `protobuf:"bytes,1,opt,name=value_key_access_server,json=valueKeyAccessServer,proto3" json:"value_key_access_server,omitempty"` +} + +func (x *AssignKeyAccessServerToValueResponse) Reset() { + *x = AssignKeyAccessServerToValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_attributes_attributes_proto_msgTypes[31] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssignKeyAccessServerToValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssignKeyAccessServerToValueResponse) ProtoMessage() {} + +func (x *AssignKeyAccessServerToValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_attributes_attributes_proto_msgTypes[31] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AssignKeyAccessServerToValueResponse.ProtoReflect.Descriptor instead. +func (*AssignKeyAccessServerToValueResponse) Descriptor() ([]byte, []int) { + return file_attributes_attributes_proto_rawDescGZIP(), []int{31} +} + +func (x *AssignKeyAccessServerToValueResponse) GetValueKeyAccessServer() *ValueKeyAccessServer { + if x != nil { + return x.ValueKeyAccessServer + } + return nil +} + +type RemoveKeyAccessServerFromValueRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValueKeyAccessServer *ValueKeyAccessServer `protobuf:"bytes,1,opt,name=value_key_access_server,json=valueKeyAccessServer,proto3" json:"value_key_access_server,omitempty"` +} + +func (x *RemoveKeyAccessServerFromValueRequest) Reset() { + *x = RemoveKeyAccessServerFromValueRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_attributes_attributes_proto_msgTypes[32] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveKeyAccessServerFromValueRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveKeyAccessServerFromValueRequest) ProtoMessage() {} + +func (x *RemoveKeyAccessServerFromValueRequest) ProtoReflect() protoreflect.Message { + mi := &file_attributes_attributes_proto_msgTypes[32] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveKeyAccessServerFromValueRequest.ProtoReflect.Descriptor instead. +func (*RemoveKeyAccessServerFromValueRequest) Descriptor() ([]byte, []int) { + return file_attributes_attributes_proto_rawDescGZIP(), []int{32} +} + +func (x *RemoveKeyAccessServerFromValueRequest) GetValueKeyAccessServer() *ValueKeyAccessServer { + if x != nil { + return x.ValueKeyAccessServer + } + return nil +} + +type RemoveKeyAccessServerFromValueResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ValueKeyAccessServer *ValueKeyAccessServer `protobuf:"bytes,1,opt,name=value_key_access_server,json=valueKeyAccessServer,proto3" json:"value_key_access_server,omitempty"` +} + +func (x *RemoveKeyAccessServerFromValueResponse) Reset() { + *x = RemoveKeyAccessServerFromValueResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_attributes_attributes_proto_msgTypes[33] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RemoveKeyAccessServerFromValueResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RemoveKeyAccessServerFromValueResponse) ProtoMessage() {} + +func (x *RemoveKeyAccessServerFromValueResponse) ProtoReflect() protoreflect.Message { + mi := &file_attributes_attributes_proto_msgTypes[33] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RemoveKeyAccessServerFromValueResponse.ProtoReflect.Descriptor instead. +func (*RemoveKeyAccessServerFromValueResponse) Descriptor() ([]byte, []int) { + return file_attributes_attributes_proto_rawDescGZIP(), []int{33} +} + +func (x *RemoveKeyAccessServerFromValueResponse) GetValueKeyAccessServer() *ValueKeyAccessServer { + if x != nil { + return x.ValueKeyAccessServer + } + return nil +} + +var File_attributes_attributes_proto protoreflect.FileDescriptor + +var file_attributes_attributes_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x6b, 0x61, 0x73, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x02, 0x0a, 0x09, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, + 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x72, 0x75, 0x6c, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x75, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, + 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x29, 0x0a, + 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, + 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x8e, + 0x02, 0x0a, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, + 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0b, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, + 0x10, 0x01, 0x52, 0x04, 0x72, 0x75, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, + 0xd6, 0x01, 0x0a, 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x29, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, + 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x12, 0x34, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x78, 0x0a, 0x11, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, + 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, + 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, + 0x72, 0x73, 0x22, 0x6e, 0x0a, 0x18, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x21, + 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x49, + 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x6b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x49, 0x64, 0x22, 0x62, 0x0a, 0x14, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x11, 0x6b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x49, 0x64, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, + 0x4f, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x52, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x22, 0x2d, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x4b, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0x61, 0x0a, 0x16, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, + 0x4e, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, + 0x79, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x47, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0x4e, 0x0a, 0x17, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, + 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0x30, 0x0a, 0x16, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4e, 0x0a, 0x17, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x52, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0x32, 0x0a, 0x18, + 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x44, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x47, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x49, 0x64, 0x22, + 0x48, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0x85, 0x01, 0x0a, 0x1b, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x22, 0x47, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x1b, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, + 0xc8, 0x01, 0x01, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x47, 0x0a, 0x1c, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x35, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x47, 0x0a, 0x1c, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x8e, 0x01, 0x0a, 0x27, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x63, 0x0a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x18, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x22, 0x8f, 0x01, 0x0a, 0x28, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x4b, + 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x63, 0x0a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4b, 0x65, 0x79, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x18, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x90, 0x01, 0x0a, 0x29, 0x52, 0x65, 0x6d, 0x6f, 0x76, + 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x63, 0x0a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x18, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x91, 0x01, 0x0a, 0x2a, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x1b, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x52, 0x18, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x4b, 0x65, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x7e, 0x0a, + 0x23, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4b, 0x65, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x7f, 0x0a, + 0x24, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4b, + 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x80, + 0x01, 0x0a, 0x25, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4b, 0x65, 0x79, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x14, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x22, 0x81, 0x01, 0x0a, 0x26, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x17, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x14, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x2a, 0xb3, 0x01, 0x0a, 0x15, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x12, + 0x28, 0x0a, 0x24, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4c, + 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x54, 0x54, + 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x4c, 0x4c, 0x5f, 0x4f, 0x46, 0x10, 0x01, 0x12, 0x23, + 0x0a, 0x1f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4c, 0x45, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x4e, 0x59, 0x5f, 0x4f, + 0x46, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, + 0x5f, 0x52, 0x55, 0x4c, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, + 0x48, 0x49, 0x45, 0x52, 0x41, 0x52, 0x43, 0x48, 0x59, 0x10, 0x03, 0x32, 0xec, 0x10, 0x0a, 0x11, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x59, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x68, 0x0a, 0x13, + 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x12, 0x26, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6b, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x12, 0x12, 0x10, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x12, 0x7a, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x3a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x22, 0x0b, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, + 0x7f, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1d, 0x3a, 0x09, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0x10, + 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0x74, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x12, 0x2a, 0x10, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x83, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x24, 0x2e, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, + 0x47, 0x65, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1b, 0x12, 0x19, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x5f, + 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9b, 0x01, 0x0a, + 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, + 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x30, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2a, + 0x3a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x21, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, + 0x69, 0x64, 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0xa0, 0x01, 0x0a, 0x14, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2f, 0x3a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x26, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x2f, 0x7b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, + 0x7d, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8c, 0x01, + 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x27, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x28, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1b, 0x2a, 0x19, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x5f, + 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xd6, 0x01, 0x0a, + 0x20, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x12, 0x33, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x41, 0x3a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, + 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x22, 0x22, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x6b, + 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x12, 0xcd, 0x01, 0x0a, 0x1c, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, + 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, + 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x54, 0x6f, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x44, 0x3a, 0x17, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x29, 0x2f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2f, 0x6b, + 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x61, + 0x73, 0x73, 0x69, 0x67, 0x6e, 0x12, 0xdc, 0x01, 0x0a, 0x22, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, + 0x72, 0x6f, 0x6d, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x61, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, + 0x72, 0x6f, 0x6d, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x47, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x41, 0x3a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x22, 0x22, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x6b, 0x65, + 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x72, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x12, 0xd3, 0x01, 0x0a, 0x1e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, + 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x72, + 0x6f, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x31, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x72, 0x6f, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4b, 0x65, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x46, 0x72, 0x6f, + 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4a, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x44, 0x3a, 0x17, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, + 0x29, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2f, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0x9b, 0x01, 0x0a, 0x0e, 0x63, + 0x6f, 0x6d, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x42, 0x0f, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, + 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, 0x76, 0x32, 0x2d, + 0x70, 0x6f, 0x63, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0xca, 0x02, 0x0a, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0xe2, 0x02, 0x16, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_attributes_attributes_proto_rawDescOnce sync.Once + file_attributes_attributes_proto_rawDescData = file_attributes_attributes_proto_rawDesc +) + +func file_attributes_attributes_proto_rawDescGZIP() []byte { + file_attributes_attributes_proto_rawDescOnce.Do(func() { file_attributes_attributes_proto_rawDescData = protoimpl.X.CompressGZIP(file_attributes_attributes_proto_rawDescData) }) return file_attributes_attributes_proto_rawDescData } var file_attributes_attributes_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_attributes_attributes_proto_msgTypes = make([]protoimpl.MessageInfo, 26) +var file_attributes_attributes_proto_msgTypes = make([]protoimpl.MessageInfo, 34) var file_attributes_attributes_proto_goTypes = []interface{}{ - (AttributeDefinition_AttributeRuleType)(0), // 0: attributes.AttributeDefinition.AttributeRuleType - (*AttributeSet)(nil), // 1: attributes.AttributeSet - (*AttributeDefinition)(nil), // 2: attributes.AttributeDefinition - (*AttributeDefinitionReference)(nil), // 3: attributes.AttributeDefinitionReference - (*AttributeDefinitionValue)(nil), // 4: attributes.AttributeDefinitionValue - (*AttributeValueReference)(nil), // 5: attributes.AttributeValueReference - (*AttributeGroup)(nil), // 6: attributes.AttributeGroup - (*GetAttributeRequest)(nil), // 7: attributes.GetAttributeRequest - (*GetAttributeResponse)(nil), // 8: attributes.GetAttributeResponse - (*ListAttributesRequest)(nil), // 9: attributes.ListAttributesRequest - (*ListAttributesResponse)(nil), // 10: attributes.ListAttributesResponse - (*CreateAttributeRequest)(nil), // 11: attributes.CreateAttributeRequest - (*CreateAttributeResponse)(nil), // 12: attributes.CreateAttributeResponse - (*UpdateAttributeRequest)(nil), // 13: attributes.UpdateAttributeRequest - (*UpdateAttributeResponse)(nil), // 14: attributes.UpdateAttributeResponse - (*DeleteAttributeRequest)(nil), // 15: attributes.DeleteAttributeRequest - (*DeleteAttributeResponse)(nil), // 16: attributes.DeleteAttributeResponse - (*GetAttributeGroupRequest)(nil), // 17: attributes.GetAttributeGroupRequest - (*GetAttributeGroupResponse)(nil), // 18: attributes.GetAttributeGroupResponse - (*ListAttributeGroupsRequest)(nil), // 19: attributes.ListAttributeGroupsRequest - (*ListAttributeGroupsResponse)(nil), // 20: attributes.ListAttributeGroupsResponse - (*CreateAttributeGroupRequest)(nil), // 21: attributes.CreateAttributeGroupRequest - (*CreateAttributeGroupResponse)(nil), // 22: attributes.CreateAttributeGroupResponse - (*UpdateAttributeGroupRequest)(nil), // 23: attributes.UpdateAttributeGroupRequest - (*UpdateAttributeGroupResponse)(nil), // 24: attributes.UpdateAttributeGroupResponse - (*DeleteAttributeGroupRequest)(nil), // 25: attributes.DeleteAttributeGroupRequest - (*DeleteAttributeGroupResponse)(nil), // 26: attributes.DeleteAttributeGroupResponse - (*common.ResourceDescriptor)(nil), // 27: common.ResourceDescriptor - (*common.ResourceSelector)(nil), // 28: common.ResourceSelector + (AttributeRuleTypeEnum)(0), // 0: attributes.AttributeRuleTypeEnum + (*Attribute)(nil), // 1: attributes.Attribute + (*AttributeCreateUpdate)(nil), // 2: attributes.AttributeCreateUpdate + (*Value)(nil), // 3: attributes.Value + (*ValueCreateUpdate)(nil), // 4: attributes.ValueCreateUpdate + (*AttributeKeyAccessServer)(nil), // 5: attributes.AttributeKeyAccessServer + (*ValueKeyAccessServer)(nil), // 6: attributes.ValueKeyAccessServer + (*ListAttributesRequest)(nil), // 7: attributes.ListAttributesRequest + (*ListAttributesResponse)(nil), // 8: attributes.ListAttributesResponse + (*GetAttributeRequest)(nil), // 9: attributes.GetAttributeRequest + (*GetAttributeResponse)(nil), // 10: attributes.GetAttributeResponse + (*CreateAttributeRequest)(nil), // 11: attributes.CreateAttributeRequest + (*CreateAttributeResponse)(nil), // 12: attributes.CreateAttributeResponse + (*UpdateAttributeRequest)(nil), // 13: attributes.UpdateAttributeRequest + (*UpdateAttributeResponse)(nil), // 14: attributes.UpdateAttributeResponse + (*DeleteAttributeRequest)(nil), // 15: attributes.DeleteAttributeRequest + (*DeleteAttributeResponse)(nil), // 16: attributes.DeleteAttributeResponse + (*GetAttributeValueRequest)(nil), // 17: attributes.GetAttributeValueRequest + (*GetAttributeValueResponse)(nil), // 18: attributes.GetAttributeValueResponse + (*ListAttributeValuesRequest)(nil), // 19: attributes.ListAttributeValuesRequest + (*ListAttributeValuesResponse)(nil), // 20: attributes.ListAttributeValuesResponse + (*CreateAttributeValueRequest)(nil), // 21: attributes.CreateAttributeValueRequest + (*CreateAttributeValueResponse)(nil), // 22: attributes.CreateAttributeValueResponse + (*UpdateAttributeValueRequest)(nil), // 23: attributes.UpdateAttributeValueRequest + (*UpdateAttributeValueResponse)(nil), // 24: attributes.UpdateAttributeValueResponse + (*DeleteAttributeValueRequest)(nil), // 25: attributes.DeleteAttributeValueRequest + (*DeleteAttributeValueResponse)(nil), // 26: attributes.DeleteAttributeValueResponse + (*AssignKeyAccessServerToAttributeRequest)(nil), // 27: attributes.AssignKeyAccessServerToAttributeRequest + (*AssignKeyAccessServerToAttributeResponse)(nil), // 28: attributes.AssignKeyAccessServerToAttributeResponse + (*RemoveKeyAccessServerFromAttributeRequest)(nil), // 29: attributes.RemoveKeyAccessServerFromAttributeRequest + (*RemoveKeyAccessServerFromAttributeResponse)(nil), // 30: attributes.RemoveKeyAccessServerFromAttributeResponse + (*AssignKeyAccessServerToValueRequest)(nil), // 31: attributes.AssignKeyAccessServerToValueRequest + (*AssignKeyAccessServerToValueResponse)(nil), // 32: attributes.AssignKeyAccessServerToValueResponse + (*RemoveKeyAccessServerFromValueRequest)(nil), // 33: attributes.RemoveKeyAccessServerFromValueRequest + (*RemoveKeyAccessServerFromValueResponse)(nil), // 34: attributes.RemoveKeyAccessServerFromValueResponse + (*common.Metadata)(nil), // 35: common.Metadata + (*namespaces.Namespace)(nil), // 36: namespaces.Namespace + (*kasregistry.KeyAccessServer)(nil), // 37: kasregistry.KeyAccessServer + (*common.MetadataMutable)(nil), // 38: common.MetadataMutable } var file_attributes_attributes_proto_depIdxs = []int32{ - 27, // 0: attributes.AttributeSet.descriptor:type_name -> common.ResourceDescriptor - 2, // 1: attributes.AttributeSet.definitions:type_name -> attributes.AttributeDefinition - 27, // 2: attributes.AttributeDefinition.descriptor:type_name -> common.ResourceDescriptor - 0, // 3: attributes.AttributeDefinition.rule:type_name -> attributes.AttributeDefinition.AttributeRuleType - 4, // 4: attributes.AttributeDefinition.values:type_name -> attributes.AttributeDefinitionValue - 4, // 5: attributes.AttributeDefinition.group_by:type_name -> attributes.AttributeDefinitionValue - 27, // 6: attributes.AttributeDefinitionReference.descriptor:type_name -> common.ResourceDescriptor - 2, // 7: attributes.AttributeDefinitionReference.definition:type_name -> attributes.AttributeDefinition - 27, // 8: attributes.AttributeDefinitionValue.descriptor:type_name -> common.ResourceDescriptor - 27, // 9: attributes.AttributeValueReference.descriptor:type_name -> common.ResourceDescriptor - 4, // 10: attributes.AttributeValueReference.attribute_value:type_name -> attributes.AttributeDefinitionValue - 27, // 11: attributes.AttributeGroup.descriptor:type_name -> common.ResourceDescriptor - 5, // 12: attributes.AttributeGroup.group_value:type_name -> attributes.AttributeValueReference - 5, // 13: attributes.AttributeGroup.member_values:type_name -> attributes.AttributeValueReference - 2, // 14: attributes.GetAttributeResponse.definition:type_name -> attributes.AttributeDefinition - 28, // 15: attributes.ListAttributesRequest.selector:type_name -> common.ResourceSelector - 2, // 16: attributes.ListAttributesResponse.definitions:type_name -> attributes.AttributeDefinition - 2, // 17: attributes.CreateAttributeRequest.definition:type_name -> attributes.AttributeDefinition - 2, // 18: attributes.UpdateAttributeRequest.definition:type_name -> attributes.AttributeDefinition - 6, // 19: attributes.GetAttributeGroupResponse.group:type_name -> attributes.AttributeGroup - 28, // 20: attributes.ListAttributeGroupsRequest.selector:type_name -> common.ResourceSelector - 6, // 21: attributes.ListAttributeGroupsResponse.groups:type_name -> attributes.AttributeGroup - 6, // 22: attributes.CreateAttributeGroupRequest.group:type_name -> attributes.AttributeGroup - 6, // 23: attributes.UpdateAttributeGroupRequest.group:type_name -> attributes.AttributeGroup - 7, // 24: attributes.AttributesService.GetAttribute:input_type -> attributes.GetAttributeRequest - 17, // 25: attributes.AttributesService.GetAttributeGroup:input_type -> attributes.GetAttributeGroupRequest - 9, // 26: attributes.AttributesService.ListAttributes:input_type -> attributes.ListAttributesRequest - 19, // 27: attributes.AttributesService.ListAttributeGroups:input_type -> attributes.ListAttributeGroupsRequest - 11, // 28: attributes.AttributesService.CreateAttribute:input_type -> attributes.CreateAttributeRequest - 21, // 29: attributes.AttributesService.CreateAttributeGroup:input_type -> attributes.CreateAttributeGroupRequest - 13, // 30: attributes.AttributesService.UpdateAttribute:input_type -> attributes.UpdateAttributeRequest - 23, // 31: attributes.AttributesService.UpdateAttributeGroup:input_type -> attributes.UpdateAttributeGroupRequest - 15, // 32: attributes.AttributesService.DeleteAttribute:input_type -> attributes.DeleteAttributeRequest - 25, // 33: attributes.AttributesService.DeleteAttributeGroup:input_type -> attributes.DeleteAttributeGroupRequest - 8, // 34: attributes.AttributesService.GetAttribute:output_type -> attributes.GetAttributeResponse - 18, // 35: attributes.AttributesService.GetAttributeGroup:output_type -> attributes.GetAttributeGroupResponse - 10, // 36: attributes.AttributesService.ListAttributes:output_type -> attributes.ListAttributesResponse - 20, // 37: attributes.AttributesService.ListAttributeGroups:output_type -> attributes.ListAttributeGroupsResponse - 12, // 38: attributes.AttributesService.CreateAttribute:output_type -> attributes.CreateAttributeResponse - 22, // 39: attributes.AttributesService.CreateAttributeGroup:output_type -> attributes.CreateAttributeGroupResponse - 14, // 40: attributes.AttributesService.UpdateAttribute:output_type -> attributes.UpdateAttributeResponse - 24, // 41: attributes.AttributesService.UpdateAttributeGroup:output_type -> attributes.UpdateAttributeGroupResponse - 16, // 42: attributes.AttributesService.DeleteAttribute:output_type -> attributes.DeleteAttributeResponse - 26, // 43: attributes.AttributesService.DeleteAttributeGroup:output_type -> attributes.DeleteAttributeGroupResponse - 34, // [34:44] is the sub-list for method output_type - 24, // [24:34] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 35, // 0: attributes.Attribute.metadata:type_name -> common.Metadata + 36, // 1: attributes.Attribute.namespace:type_name -> namespaces.Namespace + 0, // 2: attributes.Attribute.rule:type_name -> attributes.AttributeRuleTypeEnum + 3, // 3: attributes.Attribute.values:type_name -> attributes.Value + 37, // 4: attributes.Attribute.grants:type_name -> kasregistry.KeyAccessServer + 38, // 5: attributes.AttributeCreateUpdate.metadata:type_name -> common.MetadataMutable + 0, // 6: attributes.AttributeCreateUpdate.rule:type_name -> attributes.AttributeRuleTypeEnum + 4, // 7: attributes.AttributeCreateUpdate.values:type_name -> attributes.ValueCreateUpdate + 35, // 8: attributes.Value.metadata:type_name -> common.Metadata + 37, // 9: attributes.Value.grants:type_name -> kasregistry.KeyAccessServer + 38, // 10: attributes.ValueCreateUpdate.metadata:type_name -> common.MetadataMutable + 1, // 11: attributes.ListAttributesResponse.attributes:type_name -> attributes.Attribute + 1, // 12: attributes.GetAttributeResponse.attribute:type_name -> attributes.Attribute + 2, // 13: attributes.CreateAttributeRequest.attribute:type_name -> attributes.AttributeCreateUpdate + 1, // 14: attributes.CreateAttributeResponse.attribute:type_name -> attributes.Attribute + 2, // 15: attributes.UpdateAttributeRequest.attribute:type_name -> attributes.AttributeCreateUpdate + 1, // 16: attributes.UpdateAttributeResponse.attribute:type_name -> attributes.Attribute + 1, // 17: attributes.DeleteAttributeResponse.attribute:type_name -> attributes.Attribute + 3, // 18: attributes.GetAttributeValueResponse.value:type_name -> attributes.Value + 3, // 19: attributes.ListAttributeValuesResponse.values:type_name -> attributes.Value + 4, // 20: attributes.CreateAttributeValueRequest.value:type_name -> attributes.ValueCreateUpdate + 3, // 21: attributes.CreateAttributeValueResponse.value:type_name -> attributes.Value + 4, // 22: attributes.UpdateAttributeValueRequest.value:type_name -> attributes.ValueCreateUpdate + 3, // 23: attributes.UpdateAttributeValueResponse.value:type_name -> attributes.Value + 3, // 24: attributes.DeleteAttributeValueResponse.value:type_name -> attributes.Value + 5, // 25: attributes.AssignKeyAccessServerToAttributeRequest.attribute_key_access_server:type_name -> attributes.AttributeKeyAccessServer + 5, // 26: attributes.AssignKeyAccessServerToAttributeResponse.attribute_key_access_server:type_name -> attributes.AttributeKeyAccessServer + 5, // 27: attributes.RemoveKeyAccessServerFromAttributeRequest.attribute_key_access_server:type_name -> attributes.AttributeKeyAccessServer + 5, // 28: attributes.RemoveKeyAccessServerFromAttributeResponse.attribute_key_access_server:type_name -> attributes.AttributeKeyAccessServer + 6, // 29: attributes.AssignKeyAccessServerToValueRequest.value_key_access_server:type_name -> attributes.ValueKeyAccessServer + 6, // 30: attributes.AssignKeyAccessServerToValueResponse.value_key_access_server:type_name -> attributes.ValueKeyAccessServer + 6, // 31: attributes.RemoveKeyAccessServerFromValueRequest.value_key_access_server:type_name -> attributes.ValueKeyAccessServer + 6, // 32: attributes.RemoveKeyAccessServerFromValueResponse.value_key_access_server:type_name -> attributes.ValueKeyAccessServer + 7, // 33: attributes.AttributesService.ListAttributes:input_type -> attributes.ListAttributesRequest + 19, // 34: attributes.AttributesService.ListAttributeValues:input_type -> attributes.ListAttributeValuesRequest + 9, // 35: attributes.AttributesService.GetAttribute:input_type -> attributes.GetAttributeRequest + 11, // 36: attributes.AttributesService.CreateAttribute:input_type -> attributes.CreateAttributeRequest + 13, // 37: attributes.AttributesService.UpdateAttribute:input_type -> attributes.UpdateAttributeRequest + 15, // 38: attributes.AttributesService.DeleteAttribute:input_type -> attributes.DeleteAttributeRequest + 17, // 39: attributes.AttributesService.GetAttributeValue:input_type -> attributes.GetAttributeValueRequest + 21, // 40: attributes.AttributesService.CreateAttributeValue:input_type -> attributes.CreateAttributeValueRequest + 23, // 41: attributes.AttributesService.UpdateAttributeValue:input_type -> attributes.UpdateAttributeValueRequest + 25, // 42: attributes.AttributesService.DeleteAttributeValue:input_type -> attributes.DeleteAttributeValueRequest + 27, // 43: attributes.AttributesService.AssignKeyAccessServerToAttribute:input_type -> attributes.AssignKeyAccessServerToAttributeRequest + 31, // 44: attributes.AttributesService.AssignKeyAccessServerToValue:input_type -> attributes.AssignKeyAccessServerToValueRequest + 29, // 45: attributes.AttributesService.RemoveKeyAccessServerFromAttribute:input_type -> attributes.RemoveKeyAccessServerFromAttributeRequest + 33, // 46: attributes.AttributesService.RemoveKeyAccessServerFromValue:input_type -> attributes.RemoveKeyAccessServerFromValueRequest + 8, // 47: attributes.AttributesService.ListAttributes:output_type -> attributes.ListAttributesResponse + 20, // 48: attributes.AttributesService.ListAttributeValues:output_type -> attributes.ListAttributeValuesResponse + 10, // 49: attributes.AttributesService.GetAttribute:output_type -> attributes.GetAttributeResponse + 12, // 50: attributes.AttributesService.CreateAttribute:output_type -> attributes.CreateAttributeResponse + 14, // 51: attributes.AttributesService.UpdateAttribute:output_type -> attributes.UpdateAttributeResponse + 16, // 52: attributes.AttributesService.DeleteAttribute:output_type -> attributes.DeleteAttributeResponse + 18, // 53: attributes.AttributesService.GetAttributeValue:output_type -> attributes.GetAttributeValueResponse + 22, // 54: attributes.AttributesService.CreateAttributeValue:output_type -> attributes.CreateAttributeValueResponse + 24, // 55: attributes.AttributesService.UpdateAttributeValue:output_type -> attributes.UpdateAttributeValueResponse + 26, // 56: attributes.AttributesService.DeleteAttributeValue:output_type -> attributes.DeleteAttributeValueResponse + 28, // 57: attributes.AttributesService.AssignKeyAccessServerToAttribute:output_type -> attributes.AssignKeyAccessServerToAttributeResponse + 32, // 58: attributes.AttributesService.AssignKeyAccessServerToValue:output_type -> attributes.AssignKeyAccessServerToValueResponse + 30, // 59: attributes.AttributesService.RemoveKeyAccessServerFromAttribute:output_type -> attributes.RemoveKeyAccessServerFromAttributeResponse + 34, // 60: attributes.AttributesService.RemoveKeyAccessServerFromValue:output_type -> attributes.RemoveKeyAccessServerFromValueResponse + 47, // [47:61] is the sub-list for method output_type + 33, // [33:47] is the sub-list for method input_type + 33, // [33:33] is the sub-list for extension type_name + 33, // [33:33] is the sub-list for extension extendee + 0, // [0:33] is the sub-list for field type_name } func init() { file_attributes_attributes_proto_init() } @@ -1799,7 +2411,7 @@ func file_attributes_attributes_proto_init() { } if !protoimpl.UnsafeEnabled { file_attributes_attributes_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeSet); i { + switch v := v.(*Attribute); i { case 0: return &v.state case 1: @@ -1811,7 +2423,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeDefinition); i { + switch v := v.(*AttributeCreateUpdate); i { case 0: return &v.state case 1: @@ -1823,7 +2435,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeDefinitionReference); i { + switch v := v.(*Value); i { case 0: return &v.state case 1: @@ -1835,7 +2447,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeDefinitionValue); i { + switch v := v.(*ValueCreateUpdate); i { case 0: return &v.state case 1: @@ -1847,7 +2459,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeValueReference); i { + switch v := v.(*AttributeKeyAccessServer); i { case 0: return &v.state case 1: @@ -1859,7 +2471,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AttributeGroup); i { + switch v := v.(*ValueKeyAccessServer); i { case 0: return &v.state case 1: @@ -1871,7 +2483,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAttributeRequest); i { + switch v := v.(*ListAttributesRequest); i { case 0: return &v.state case 1: @@ -1883,7 +2495,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAttributeResponse); i { + switch v := v.(*ListAttributesResponse); i { case 0: return &v.state case 1: @@ -1895,7 +2507,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAttributesRequest); i { + switch v := v.(*GetAttributeRequest); i { case 0: return &v.state case 1: @@ -1907,7 +2519,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAttributesResponse); i { + switch v := v.(*GetAttributeResponse); i { case 0: return &v.state case 1: @@ -1991,7 +2603,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAttributeGroupRequest); i { + switch v := v.(*GetAttributeValueRequest); i { case 0: return &v.state case 1: @@ -2003,7 +2615,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAttributeGroupResponse); i { + switch v := v.(*GetAttributeValueResponse); i { case 0: return &v.state case 1: @@ -2015,7 +2627,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAttributeGroupsRequest); i { + switch v := v.(*ListAttributeValuesRequest); i { case 0: return &v.state case 1: @@ -2027,7 +2639,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAttributeGroupsResponse); i { + switch v := v.(*ListAttributeValuesResponse); i { case 0: return &v.state case 1: @@ -2039,7 +2651,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateAttributeGroupRequest); i { + switch v := v.(*CreateAttributeValueRequest); i { case 0: return &v.state case 1: @@ -2051,7 +2663,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateAttributeGroupResponse); i { + switch v := v.(*CreateAttributeValueResponse); i { case 0: return &v.state case 1: @@ -2063,7 +2675,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateAttributeGroupRequest); i { + switch v := v.(*UpdateAttributeValueRequest); i { case 0: return &v.state case 1: @@ -2075,7 +2687,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateAttributeGroupResponse); i { + switch v := v.(*UpdateAttributeValueResponse); i { case 0: return &v.state case 1: @@ -2087,7 +2699,7 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteAttributeGroupRequest); i { + switch v := v.(*DeleteAttributeValueRequest); i { case 0: return &v.state case 1: @@ -2099,7 +2711,103 @@ func file_attributes_attributes_proto_init() { } } file_attributes_attributes_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteAttributeGroupResponse); i { + switch v := v.(*DeleteAttributeValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_attributes_attributes_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssignKeyAccessServerToAttributeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_attributes_attributes_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssignKeyAccessServerToAttributeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_attributes_attributes_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveKeyAccessServerFromAttributeRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_attributes_attributes_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveKeyAccessServerFromAttributeResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_attributes_attributes_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssignKeyAccessServerToValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_attributes_attributes_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssignKeyAccessServerToValueResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_attributes_attributes_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveKeyAccessServerFromValueRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_attributes_attributes_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RemoveKeyAccessServerFromValueResponse); i { case 0: return &v.state case 1: @@ -2110,14 +2818,6 @@ func file_attributes_attributes_proto_init() { return nil } } - } - file_attributes_attributes_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*AttributeDefinitionReference_Descriptor_)(nil), - (*AttributeDefinitionReference_Definition)(nil), - } - file_attributes_attributes_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*AttributeValueReference_Descriptor_)(nil), - (*AttributeValueReference_AttributeValue)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -2125,7 +2825,7 @@ func file_attributes_attributes_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_attributes_attributes_proto_rawDesc, NumEnums: 1, - NumMessages: 26, + NumMessages: 34, NumExtensions: 0, NumServices: 1, }, diff --git a/sdk/attributes/attributes.pb.gw.go b/sdk/attributes/attributes.pb.gw.go index 894ee27fb2..5aaf992139 100644 --- a/sdk/attributes/attributes.pb.gw.go +++ b/sdk/attributes/attributes.pb.gw.go @@ -47,7 +47,7 @@ func request_AttributesService_GetAttribute_0(ctx context.Context, marshaler run return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -73,7 +73,7 @@ func local_request_AttributesService_GetAttribute_0(ctx context.Context, marshal return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -83,36 +83,52 @@ func local_request_AttributesService_GetAttribute_0(ctx context.Context, marshal } -func request_AttributesService_GetAttributeGroup_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAttributeGroupRequest +func request_AttributesService_CreateAttribute_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateAttributeRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Attribute); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + msg, err := client.CreateAttribute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AttributesService_CreateAttribute_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateAttributeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Attribute); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.GetAttributeGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := server.CreateAttribute(ctx, &protoReq) return msg, metadata, err } -func local_request_AttributesService_GetAttributeGroup_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetAttributeGroupRequest +func request_AttributesService_UpdateAttribute_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateAttributeRequest var metadata runtime.ServerMetadata + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Attribute); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + var ( val string ok bool @@ -125,165 +141,163 @@ func local_request_AttributesService_GetAttributeGroup_0(ctx context.Context, ma return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.GetAttributeGroup(ctx, &protoReq) + msg, err := client.UpdateAttribute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -var ( - filter_AttributesService_ListAttributes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AttributesService_ListAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAttributesRequest +func local_request_AttributesService_UpdateAttribute_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateAttributeRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AttributesService_ListAttributes_0); err != nil { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Attribute); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.ListAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_AttributesService_ListAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAttributesRequest - var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AttributesService_ListAttributes_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - msg, err := server.ListAttributes(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_AttributesService_ListAttributeGroups_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_AttributesService_ListAttributeGroups_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAttributeGroupsRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AttributesService_ListAttributeGroups_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.ListAttributeGroups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := server.UpdateAttribute(ctx, &protoReq) return msg, metadata, err } -func local_request_AttributesService_ListAttributeGroups_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListAttributeGroupsRequest +func request_AttributesService_DeleteAttribute_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteAttributeRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_AttributesService_ListAttributeGroups_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListAttributeGroups(ctx, &protoReq) - return msg, metadata, err - -} - -func request_AttributesService_CreateAttribute_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAttributeRequest - var metadata runtime.ServerMetadata + var ( + val string + ok bool + err error + _ = err + ) - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Definition); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.CreateAttribute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DeleteAttribute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_AttributesService_CreateAttribute_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAttributeRequest +func local_request_AttributesService_DeleteAttribute_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteAttributeRequest var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Definition); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.CreateAttribute(ctx, &protoReq) + msg, err := server.DeleteAttribute(ctx, &protoReq) return msg, metadata, err } -func request_AttributesService_CreateAttributeGroup_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAttributeGroupRequest +func request_AttributesService_GetAttributeValue_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAttributeValueRequest var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.CreateAttributeGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetAttributeValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_AttributesService_CreateAttributeGroup_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateAttributeGroupRequest +func local_request_AttributesService_GetAttributeValue_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetAttributeValueRequest var metadata runtime.ServerMetadata - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.CreateAttributeGroup(ctx, &protoReq) + msg, err := server.GetAttributeValue(ctx, &protoReq) return msg, metadata, err } -func request_AttributesService_UpdateAttribute_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateAttributeRequest +func request_AttributesService_CreateAttributeValue_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateAttributeValueRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Definition); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Value); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -294,30 +308,30 @@ func request_AttributesService_UpdateAttribute_0(ctx context.Context, marshaler _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["attribute_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "attribute_id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.AttributeId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "attribute_id", err) } - msg, err := client.UpdateAttribute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.CreateAttributeValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_AttributesService_UpdateAttribute_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateAttributeRequest +func local_request_AttributesService_CreateAttributeValue_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateAttributeValueRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Definition); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Value); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -328,30 +342,30 @@ func local_request_AttributesService_UpdateAttribute_0(ctx context.Context, mars _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["attribute_id"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "attribute_id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.AttributeId, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "attribute_id", err) } - msg, err := server.UpdateAttribute(ctx, &protoReq) + msg, err := server.CreateAttributeValue(ctx, &protoReq) return msg, metadata, err } -func request_AttributesService_UpdateAttributeGroup_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateAttributeGroupRequest +func request_AttributesService_UpdateAttributeValue_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateAttributeValueRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Value); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -362,30 +376,40 @@ func request_AttributesService_UpdateAttributeGroup_0(ctx context.Context, marsh _ = err ) + val, ok = pathParams["attribute_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "attribute_id") + } + + protoReq.AttributeId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "attribute_id", err) + } + val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.UpdateAttributeGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.UpdateAttributeValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_AttributesService_UpdateAttributeGroup_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateAttributeGroupRequest +func local_request_AttributesService_UpdateAttributeValue_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateAttributeValueRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Group); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Value); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -396,23 +420,33 @@ func local_request_AttributesService_UpdateAttributeGroup_0(ctx context.Context, _ = err ) + val, ok = pathParams["attribute_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "attribute_id") + } + + protoReq.AttributeId, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "attribute_id", err) + } + val, ok = pathParams["id"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.UpdateAttributeGroup(ctx, &protoReq) + msg, err := server.UpdateAttributeValue(ctx, &protoReq) return msg, metadata, err } -func request_AttributesService_DeleteAttribute_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAttributeRequest +func request_AttributesService_DeleteAttributeValue_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteAttributeValueRequest var metadata runtime.ServerMetadata var ( @@ -427,18 +461,18 @@ func request_AttributesService_DeleteAttribute_0(ctx context.Context, marshaler return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.DeleteAttribute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DeleteAttributeValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_AttributesService_DeleteAttribute_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAttributeRequest +func local_request_AttributesService_DeleteAttributeValue_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteAttributeValueRequest var metadata runtime.ServerMetadata var ( @@ -453,64 +487,148 @@ func local_request_AttributesService_DeleteAttribute_0(ctx context.Context, mars return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.DeleteAttribute(ctx, &protoReq) + msg, err := server.DeleteAttributeValue(ctx, &protoReq) return msg, metadata, err } -func request_AttributesService_DeleteAttributeGroup_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAttributeGroupRequest +func request_AttributesService_AssignKeyAccessServerToAttribute_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AssignKeyAccessServerToAttributeRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.AttributeKeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + msg, err := client.AssignKeyAccessServerToAttribute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AttributesService_AssignKeyAccessServerToAttribute_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AssignKeyAccessServerToAttributeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.AttributeKeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + msg, err := server.AssignKeyAccessServerToAttribute(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AttributesService_AssignKeyAccessServerToValue_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AssignKeyAccessServerToValueRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ValueKeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.DeleteAttributeGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.AssignKeyAccessServerToValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_AttributesService_DeleteAttributeGroup_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteAttributeGroupRequest +func local_request_AttributesService_AssignKeyAccessServerToValue_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AssignKeyAccessServerToValueRequest var metadata runtime.ServerMetadata - var ( - val string - ok bool - err error - _ = err - ) + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ValueKeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } - val, ok = pathParams["id"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + msg, err := server.AssignKeyAccessServerToValue(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AttributesService_RemoveKeyAccessServerFromAttribute_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveKeyAccessServerFromAttributeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.AttributeKeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - protoReq.Id, err = runtime.Int32(val) - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + msg, err := client.RemoveKeyAccessServerFromAttribute(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AttributesService_RemoveKeyAccessServerFromAttribute_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveKeyAccessServerFromAttributeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.AttributeKeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RemoveKeyAccessServerFromAttribute(ctx, &protoReq) + return msg, metadata, err + +} + +func request_AttributesService_RemoveKeyAccessServerFromValue_0(ctx context.Context, marshaler runtime.Marshaler, client AttributesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveKeyAccessServerFromValueRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ValueKeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RemoveKeyAccessServerFromValue(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_AttributesService_RemoveKeyAccessServerFromValue_0(ctx context.Context, marshaler runtime.Marshaler, server AttributesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RemoveKeyAccessServerFromValueRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ValueKeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.DeleteAttributeGroup(ctx, &protoReq) + msg, err := server.RemoveKeyAccessServerFromValue(ctx, &protoReq) return msg, metadata, err } @@ -529,7 +647,7 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/GetAttribute", runtime.WithHTTPPathPattern("/v1/attribute/definitions/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/GetAttribute", runtime.WithHTTPPathPattern("/attributes/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -546,7 +664,7 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se }) - mux.Handle("GET", pattern_AttributesService_GetAttributeGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_CreateAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -554,12 +672,12 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/GetAttributeGroup", runtime.WithHTTPPathPattern("/v1/attribute/groups/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/CreateAttribute", runtime.WithHTTPPathPattern("/attributes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AttributesService_GetAttributeGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AttributesService_CreateAttribute_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -567,11 +685,11 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_AttributesService_GetAttributeGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_CreateAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AttributesService_ListAttributes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_UpdateAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -579,12 +697,12 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/ListAttributes", runtime.WithHTTPPathPattern("/v1/attribute/definitions")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/UpdateAttribute", runtime.WithHTTPPathPattern("/attributes/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AttributesService_ListAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AttributesService_UpdateAttribute_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -592,11 +710,11 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_AttributesService_ListAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_UpdateAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AttributesService_ListAttributeGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_AttributesService_DeleteAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -604,12 +722,12 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/ListAttributeGroups", runtime.WithHTTPPathPattern("/v1/attribute/groups")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/DeleteAttribute", runtime.WithHTTPPathPattern("/attributes/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AttributesService_ListAttributeGroups_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AttributesService_DeleteAttribute_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -617,11 +735,11 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_AttributesService_ListAttributeGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_DeleteAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AttributesService_CreateAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AttributesService_GetAttributeValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -629,12 +747,12 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/CreateAttribute", runtime.WithHTTPPathPattern("/v1/attributes/definitions")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/GetAttributeValue", runtime.WithHTTPPathPattern("/attributes/_/values/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AttributesService_CreateAttribute_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AttributesService_GetAttributeValue_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -642,11 +760,11 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_AttributesService_CreateAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_GetAttributeValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AttributesService_CreateAttributeGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_CreateAttributeValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -654,12 +772,12 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/CreateAttributeGroup", runtime.WithHTTPPathPattern("/v1/attributes/groups")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/CreateAttributeValue", runtime.WithHTTPPathPattern("/attributes/{attribute_id}/values")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AttributesService_CreateAttributeGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AttributesService_CreateAttributeValue_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -667,11 +785,11 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_AttributesService_CreateAttributeGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_CreateAttributeValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AttributesService_UpdateAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_UpdateAttributeValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -679,12 +797,12 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/UpdateAttribute", runtime.WithHTTPPathPattern("/v1/attribute/definitions/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/UpdateAttributeValue", runtime.WithHTTPPathPattern("/attributes/{attribute_id}/values/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AttributesService_UpdateAttribute_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AttributesService_UpdateAttributeValue_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -692,11 +810,11 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_AttributesService_UpdateAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_UpdateAttributeValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AttributesService_UpdateAttributeGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_AttributesService_DeleteAttributeValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -704,12 +822,12 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/UpdateAttributeGroup", runtime.WithHTTPPathPattern("/v1/attribute/groups/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/DeleteAttributeValue", runtime.WithHTTPPathPattern("/attributes/_/values/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AttributesService_UpdateAttributeGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AttributesService_DeleteAttributeValue_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -717,11 +835,11 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_AttributesService_UpdateAttributeGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_DeleteAttributeValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_AttributesService_DeleteAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_AssignKeyAccessServerToAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -729,12 +847,12 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/DeleteAttribute", runtime.WithHTTPPathPattern("/v1/attribute/definitions/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/AssignKeyAccessServerToAttribute", runtime.WithHTTPPathPattern("/attributes/keyaccessserver/assign")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AttributesService_DeleteAttribute_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AttributesService_AssignKeyAccessServerToAttribute_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -742,11 +860,61 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_AttributesService_DeleteAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_AssignKeyAccessServerToAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AttributesService_AssignKeyAccessServerToValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/AssignKeyAccessServerToValue", runtime.WithHTTPPathPattern("/attributes/values/keyaccessserver/assign")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AttributesService_AssignKeyAccessServerToValue_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AttributesService_AssignKeyAccessServerToValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AttributesService_RemoveKeyAccessServerFromAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/RemoveKeyAccessServerFromAttribute", runtime.WithHTTPPathPattern("/attributes/keyaccessserver/remove")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_AttributesService_RemoveKeyAccessServerFromAttribute_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AttributesService_RemoveKeyAccessServerFromAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_AttributesService_DeleteAttributeGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_RemoveKeyAccessServerFromValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -754,12 +922,12 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/DeleteAttributeGroup", runtime.WithHTTPPathPattern("/v1/attribute/groups/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/attributes.AttributesService/RemoveKeyAccessServerFromValue", runtime.WithHTTPPathPattern("/attributes/values/keyaccessserver/remove")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_AttributesService_DeleteAttributeGroup_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_AttributesService_RemoveKeyAccessServerFromValue_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -767,7 +935,7 @@ func RegisterAttributesServiceHandlerServer(ctx context.Context, mux *runtime.Se return } - forward_AttributesService_DeleteAttributeGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_RemoveKeyAccessServerFromValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -818,7 +986,7 @@ func RegisterAttributesServiceHandlerClient(ctx context.Context, mux *runtime.Se inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/GetAttribute", runtime.WithHTTPPathPattern("/v1/attribute/definitions/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/GetAttribute", runtime.WithHTTPPathPattern("/attributes/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return @@ -834,201 +1002,245 @@ func RegisterAttributesServiceHandlerClient(ctx context.Context, mux *runtime.Se }) - mux.Handle("GET", pattern_AttributesService_GetAttributeGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_CreateAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/GetAttributeGroup", runtime.WithHTTPPathPattern("/v1/attribute/groups/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/CreateAttribute", runtime.WithHTTPPathPattern("/attributes")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AttributesService_GetAttributeGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AttributesService_CreateAttribute_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AttributesService_GetAttributeGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_CreateAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AttributesService_ListAttributes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_UpdateAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/ListAttributes", runtime.WithHTTPPathPattern("/v1/attribute/definitions")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/UpdateAttribute", runtime.WithHTTPPathPattern("/attributes/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AttributesService_ListAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AttributesService_UpdateAttribute_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AttributesService_ListAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_UpdateAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_AttributesService_ListAttributeGroups_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_AttributesService_DeleteAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/ListAttributeGroups", runtime.WithHTTPPathPattern("/v1/attribute/groups")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/DeleteAttribute", runtime.WithHTTPPathPattern("/attributes/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AttributesService_ListAttributeGroups_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AttributesService_DeleteAttribute_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AttributesService_ListAttributeGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_DeleteAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AttributesService_CreateAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_AttributesService_GetAttributeValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/CreateAttribute", runtime.WithHTTPPathPattern("/v1/attributes/definitions")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/GetAttributeValue", runtime.WithHTTPPathPattern("/attributes/_/values/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AttributesService_CreateAttribute_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AttributesService_GetAttributeValue_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AttributesService_CreateAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_GetAttributeValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AttributesService_CreateAttributeGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_CreateAttributeValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/CreateAttributeGroup", runtime.WithHTTPPathPattern("/v1/attributes/groups")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/CreateAttributeValue", runtime.WithHTTPPathPattern("/attributes/{attribute_id}/values")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AttributesService_CreateAttributeGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AttributesService_CreateAttributeValue_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AttributesService_CreateAttributeGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_CreateAttributeValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AttributesService_UpdateAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_UpdateAttributeValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/UpdateAttribute", runtime.WithHTTPPathPattern("/v1/attribute/definitions/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/UpdateAttributeValue", runtime.WithHTTPPathPattern("/attributes/{attribute_id}/values/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AttributesService_UpdateAttribute_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AttributesService_UpdateAttributeValue_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AttributesService_UpdateAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_UpdateAttributeValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_AttributesService_UpdateAttributeGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_AttributesService_DeleteAttributeValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/UpdateAttributeGroup", runtime.WithHTTPPathPattern("/v1/attribute/groups/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/DeleteAttributeValue", runtime.WithHTTPPathPattern("/attributes/_/values/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AttributesService_UpdateAttributeGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AttributesService_DeleteAttributeValue_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AttributesService_UpdateAttributeGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_DeleteAttributeValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_AttributesService_DeleteAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_AssignKeyAccessServerToAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/DeleteAttribute", runtime.WithHTTPPathPattern("/v1/attribute/definitions/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/AssignKeyAccessServerToAttribute", runtime.WithHTTPPathPattern("/attributes/keyaccessserver/assign")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AttributesService_DeleteAttribute_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AttributesService_AssignKeyAccessServerToAttribute_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AttributesService_DeleteAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_AssignKeyAccessServerToAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AttributesService_AssignKeyAccessServerToValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/AssignKeyAccessServerToValue", runtime.WithHTTPPathPattern("/attributes/values/keyaccessserver/assign")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AttributesService_AssignKeyAccessServerToValue_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AttributesService_AssignKeyAccessServerToValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_AttributesService_RemoveKeyAccessServerFromAttribute_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/RemoveKeyAccessServerFromAttribute", runtime.WithHTTPPathPattern("/attributes/keyaccessserver/remove")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_AttributesService_RemoveKeyAccessServerFromAttribute_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_AttributesService_RemoveKeyAccessServerFromAttribute_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_AttributesService_DeleteAttributeGroup_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_AttributesService_RemoveKeyAccessServerFromValue_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/DeleteAttributeGroup", runtime.WithHTTPPathPattern("/v1/attribute/groups/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/attributes.AttributesService/RemoveKeyAccessServerFromValue", runtime.WithHTTPPathPattern("/attributes/values/keyaccessserver/remove")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_AttributesService_DeleteAttributeGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_AttributesService_RemoveKeyAccessServerFromValue_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_AttributesService_DeleteAttributeGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_AttributesService_RemoveKeyAccessServerFromValue_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1036,45 +1248,53 @@ func RegisterAttributesServiceHandlerClient(ctx context.Context, mux *runtime.Se } var ( - pattern_AttributesService_GetAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "attribute", "definitions", "id"}, "")) + pattern_AttributesService_GetAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"attributes", "id"}, "")) + + pattern_AttributesService_CreateAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"attributes"}, "")) - pattern_AttributesService_GetAttributeGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "attribute", "groups", "id"}, "")) + pattern_AttributesService_UpdateAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"attributes", "id"}, "")) - pattern_AttributesService_ListAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "attribute", "definitions"}, "")) + pattern_AttributesService_DeleteAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"attributes", "id"}, "")) - pattern_AttributesService_ListAttributeGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "attribute", "groups"}, "")) + pattern_AttributesService_GetAttributeValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"attributes", "_", "values", "id"}, "")) - pattern_AttributesService_CreateAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "attributes", "definitions"}, "")) + pattern_AttributesService_CreateAttributeValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"attributes", "attribute_id", "values"}, "")) - pattern_AttributesService_CreateAttributeGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "attributes", "groups"}, "")) + pattern_AttributesService_UpdateAttributeValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"attributes", "attribute_id", "values", "id"}, "")) - pattern_AttributesService_UpdateAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "attribute", "definitions", "id"}, "")) + pattern_AttributesService_DeleteAttributeValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"attributes", "_", "values", "id"}, "")) - pattern_AttributesService_UpdateAttributeGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "attribute", "groups", "id"}, "")) + pattern_AttributesService_AssignKeyAccessServerToAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"attributes", "keyaccessserver", "assign"}, "")) - pattern_AttributesService_DeleteAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "attribute", "definitions", "id"}, "")) + pattern_AttributesService_AssignKeyAccessServerToValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"attributes", "values", "keyaccessserver", "assign"}, "")) - pattern_AttributesService_DeleteAttributeGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"v1", "attribute", "groups", "id"}, "")) + pattern_AttributesService_RemoveKeyAccessServerFromAttribute_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"attributes", "keyaccessserver", "remove"}, "")) + + pattern_AttributesService_RemoveKeyAccessServerFromValue_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"attributes", "values", "keyaccessserver", "remove"}, "")) ) var ( forward_AttributesService_GetAttribute_0 = runtime.ForwardResponseMessage - forward_AttributesService_GetAttributeGroup_0 = runtime.ForwardResponseMessage + forward_AttributesService_CreateAttribute_0 = runtime.ForwardResponseMessage - forward_AttributesService_ListAttributes_0 = runtime.ForwardResponseMessage + forward_AttributesService_UpdateAttribute_0 = runtime.ForwardResponseMessage - forward_AttributesService_ListAttributeGroups_0 = runtime.ForwardResponseMessage + forward_AttributesService_DeleteAttribute_0 = runtime.ForwardResponseMessage - forward_AttributesService_CreateAttribute_0 = runtime.ForwardResponseMessage + forward_AttributesService_GetAttributeValue_0 = runtime.ForwardResponseMessage - forward_AttributesService_CreateAttributeGroup_0 = runtime.ForwardResponseMessage + forward_AttributesService_CreateAttributeValue_0 = runtime.ForwardResponseMessage - forward_AttributesService_UpdateAttribute_0 = runtime.ForwardResponseMessage + forward_AttributesService_UpdateAttributeValue_0 = runtime.ForwardResponseMessage - forward_AttributesService_UpdateAttributeGroup_0 = runtime.ForwardResponseMessage + forward_AttributesService_DeleteAttributeValue_0 = runtime.ForwardResponseMessage - forward_AttributesService_DeleteAttribute_0 = runtime.ForwardResponseMessage + forward_AttributesService_AssignKeyAccessServerToAttribute_0 = runtime.ForwardResponseMessage + + forward_AttributesService_AssignKeyAccessServerToValue_0 = runtime.ForwardResponseMessage + + forward_AttributesService_RemoveKeyAccessServerFromAttribute_0 = runtime.ForwardResponseMessage - forward_AttributesService_DeleteAttributeGroup_0 = runtime.ForwardResponseMessage + forward_AttributesService_RemoveKeyAccessServerFromValue_0 = runtime.ForwardResponseMessage ) diff --git a/sdk/attributes/attributes_grpc.pb.go b/sdk/attributes/attributes_grpc.pb.go index 48b316af89..726eee562b 100644 --- a/sdk/attributes/attributes_grpc.pb.go +++ b/sdk/attributes/attributes_grpc.pb.go @@ -19,32 +19,55 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - AttributesService_GetAttribute_FullMethodName = "/attributes.AttributesService/GetAttribute" - AttributesService_GetAttributeGroup_FullMethodName = "/attributes.AttributesService/GetAttributeGroup" - AttributesService_ListAttributes_FullMethodName = "/attributes.AttributesService/ListAttributes" - AttributesService_ListAttributeGroups_FullMethodName = "/attributes.AttributesService/ListAttributeGroups" - AttributesService_CreateAttribute_FullMethodName = "/attributes.AttributesService/CreateAttribute" - AttributesService_CreateAttributeGroup_FullMethodName = "/attributes.AttributesService/CreateAttributeGroup" - AttributesService_UpdateAttribute_FullMethodName = "/attributes.AttributesService/UpdateAttribute" - AttributesService_UpdateAttributeGroup_FullMethodName = "/attributes.AttributesService/UpdateAttributeGroup" - AttributesService_DeleteAttribute_FullMethodName = "/attributes.AttributesService/DeleteAttribute" - AttributesService_DeleteAttributeGroup_FullMethodName = "/attributes.AttributesService/DeleteAttributeGroup" + AttributesService_ListAttributes_FullMethodName = "/attributes.AttributesService/ListAttributes" + AttributesService_ListAttributeValues_FullMethodName = "/attributes.AttributesService/ListAttributeValues" + AttributesService_GetAttribute_FullMethodName = "/attributes.AttributesService/GetAttribute" + AttributesService_CreateAttribute_FullMethodName = "/attributes.AttributesService/CreateAttribute" + AttributesService_UpdateAttribute_FullMethodName = "/attributes.AttributesService/UpdateAttribute" + AttributesService_DeleteAttribute_FullMethodName = "/attributes.AttributesService/DeleteAttribute" + AttributesService_GetAttributeValue_FullMethodName = "/attributes.AttributesService/GetAttributeValue" + AttributesService_CreateAttributeValue_FullMethodName = "/attributes.AttributesService/CreateAttributeValue" + AttributesService_UpdateAttributeValue_FullMethodName = "/attributes.AttributesService/UpdateAttributeValue" + AttributesService_DeleteAttributeValue_FullMethodName = "/attributes.AttributesService/DeleteAttributeValue" + AttributesService_AssignKeyAccessServerToAttribute_FullMethodName = "/attributes.AttributesService/AssignKeyAccessServerToAttribute" + AttributesService_AssignKeyAccessServerToValue_FullMethodName = "/attributes.AttributesService/AssignKeyAccessServerToValue" + AttributesService_RemoveKeyAccessServerFromAttribute_FullMethodName = "/attributes.AttributesService/RemoveKeyAccessServerFromAttribute" + AttributesService_RemoveKeyAccessServerFromValue_FullMethodName = "/attributes.AttributesService/RemoveKeyAccessServerFromValue" ) // AttributesServiceClient is the client API for AttributesService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type AttributesServiceClient interface { - GetAttribute(ctx context.Context, in *GetAttributeRequest, opts ...grpc.CallOption) (*GetAttributeResponse, error) - GetAttributeGroup(ctx context.Context, in *GetAttributeGroupRequest, opts ...grpc.CallOption) (*GetAttributeGroupResponse, error) + // List Attributes + // Example: + // grpcurl -plaintext localhost:9000 attributes.AttributesService/ListAttributes ListAttributes(ctx context.Context, in *ListAttributesRequest, opts ...grpc.CallOption) (*ListAttributesResponse, error) - ListAttributeGroups(ctx context.Context, in *ListAttributeGroupsRequest, opts ...grpc.CallOption) (*ListAttributeGroupsResponse, error) + // List Values + // Example: + // grpcurl -plaintext -d '{"attribute_id": "attribute_id"}' localhost:8080 attributes.AttributesService/ListValues + ListAttributeValues(ctx context.Context, in *ListAttributeValuesRequest, opts ...grpc.CallOption) (*ListAttributeValuesResponse, error) + GetAttribute(ctx context.Context, in *GetAttributeRequest, opts ...grpc.CallOption) (*GetAttributeResponse, error) + // Create Attribute + // Example: + // + // grpcurl -plaintext -d '{"attribute": {"namespace_id": "namespace_id", "name": "attribute_name", "rule": "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF"}}' localhost:8080 attributes.AttributesService/CreateAttribute CreateAttribute(ctx context.Context, in *CreateAttributeRequest, opts ...grpc.CallOption) (*CreateAttributeResponse, error) - CreateAttributeGroup(ctx context.Context, in *CreateAttributeGroupRequest, opts ...grpc.CallOption) (*CreateAttributeGroupResponse, error) UpdateAttribute(ctx context.Context, in *UpdateAttributeRequest, opts ...grpc.CallOption) (*UpdateAttributeResponse, error) - UpdateAttributeGroup(ctx context.Context, in *UpdateAttributeGroupRequest, opts ...grpc.CallOption) (*UpdateAttributeGroupResponse, error) DeleteAttribute(ctx context.Context, in *DeleteAttributeRequest, opts ...grpc.CallOption) (*DeleteAttributeResponse, error) - DeleteAttributeGroup(ctx context.Context, in *DeleteAttributeGroupRequest, opts ...grpc.CallOption) (*DeleteAttributeGroupResponse, error) + // * Attribute Value * + GetAttributeValue(ctx context.Context, in *GetAttributeValueRequest, opts ...grpc.CallOption) (*GetAttributeValueResponse, error) + // Create Attribute Value + // Example: + // + // grpcurl -plaintext -d '{"attribute_id": "attribute_id", "value": {"value": "value"}}' localhost:8080 attributes.AttributesService/CreateValue + CreateAttributeValue(ctx context.Context, in *CreateAttributeValueRequest, opts ...grpc.CallOption) (*CreateAttributeValueResponse, error) + UpdateAttributeValue(ctx context.Context, in *UpdateAttributeValueRequest, opts ...grpc.CallOption) (*UpdateAttributeValueResponse, error) + DeleteAttributeValue(ctx context.Context, in *DeleteAttributeValueRequest, opts ...grpc.CallOption) (*DeleteAttributeValueResponse, error) + AssignKeyAccessServerToAttribute(ctx context.Context, in *AssignKeyAccessServerToAttributeRequest, opts ...grpc.CallOption) (*AssignKeyAccessServerToAttributeResponse, error) + AssignKeyAccessServerToValue(ctx context.Context, in *AssignKeyAccessServerToValueRequest, opts ...grpc.CallOption) (*AssignKeyAccessServerToValueResponse, error) + RemoveKeyAccessServerFromAttribute(ctx context.Context, in *RemoveKeyAccessServerFromAttributeRequest, opts ...grpc.CallOption) (*RemoveKeyAccessServerFromAttributeResponse, error) + RemoveKeyAccessServerFromValue(ctx context.Context, in *RemoveKeyAccessServerFromValueRequest, opts ...grpc.CallOption) (*RemoveKeyAccessServerFromValueResponse, error) } type attributesServiceClient struct { @@ -55,6 +78,24 @@ func NewAttributesServiceClient(cc grpc.ClientConnInterface) AttributesServiceCl return &attributesServiceClient{cc} } +func (c *attributesServiceClient) ListAttributes(ctx context.Context, in *ListAttributesRequest, opts ...grpc.CallOption) (*ListAttributesResponse, error) { + out := new(ListAttributesResponse) + err := c.cc.Invoke(ctx, AttributesService_ListAttributes_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *attributesServiceClient) ListAttributeValues(ctx context.Context, in *ListAttributeValuesRequest, opts ...grpc.CallOption) (*ListAttributeValuesResponse, error) { + out := new(ListAttributeValuesResponse) + err := c.cc.Invoke(ctx, AttributesService_ListAttributeValues_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *attributesServiceClient) GetAttribute(ctx context.Context, in *GetAttributeRequest, opts ...grpc.CallOption) (*GetAttributeResponse, error) { out := new(GetAttributeResponse) err := c.cc.Invoke(ctx, AttributesService_GetAttribute_FullMethodName, in, out, opts...) @@ -64,81 +105,99 @@ func (c *attributesServiceClient) GetAttribute(ctx context.Context, in *GetAttri return out, nil } -func (c *attributesServiceClient) GetAttributeGroup(ctx context.Context, in *GetAttributeGroupRequest, opts ...grpc.CallOption) (*GetAttributeGroupResponse, error) { - out := new(GetAttributeGroupResponse) - err := c.cc.Invoke(ctx, AttributesService_GetAttributeGroup_FullMethodName, in, out, opts...) +func (c *attributesServiceClient) CreateAttribute(ctx context.Context, in *CreateAttributeRequest, opts ...grpc.CallOption) (*CreateAttributeResponse, error) { + out := new(CreateAttributeResponse) + err := c.cc.Invoke(ctx, AttributesService_CreateAttribute_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *attributesServiceClient) ListAttributes(ctx context.Context, in *ListAttributesRequest, opts ...grpc.CallOption) (*ListAttributesResponse, error) { - out := new(ListAttributesResponse) - err := c.cc.Invoke(ctx, AttributesService_ListAttributes_FullMethodName, in, out, opts...) +func (c *attributesServiceClient) UpdateAttribute(ctx context.Context, in *UpdateAttributeRequest, opts ...grpc.CallOption) (*UpdateAttributeResponse, error) { + out := new(UpdateAttributeResponse) + err := c.cc.Invoke(ctx, AttributesService_UpdateAttribute_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *attributesServiceClient) ListAttributeGroups(ctx context.Context, in *ListAttributeGroupsRequest, opts ...grpc.CallOption) (*ListAttributeGroupsResponse, error) { - out := new(ListAttributeGroupsResponse) - err := c.cc.Invoke(ctx, AttributesService_ListAttributeGroups_FullMethodName, in, out, opts...) +func (c *attributesServiceClient) DeleteAttribute(ctx context.Context, in *DeleteAttributeRequest, opts ...grpc.CallOption) (*DeleteAttributeResponse, error) { + out := new(DeleteAttributeResponse) + err := c.cc.Invoke(ctx, AttributesService_DeleteAttribute_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *attributesServiceClient) CreateAttribute(ctx context.Context, in *CreateAttributeRequest, opts ...grpc.CallOption) (*CreateAttributeResponse, error) { - out := new(CreateAttributeResponse) - err := c.cc.Invoke(ctx, AttributesService_CreateAttribute_FullMethodName, in, out, opts...) +func (c *attributesServiceClient) GetAttributeValue(ctx context.Context, in *GetAttributeValueRequest, opts ...grpc.CallOption) (*GetAttributeValueResponse, error) { + out := new(GetAttributeValueResponse) + err := c.cc.Invoke(ctx, AttributesService_GetAttributeValue_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *attributesServiceClient) CreateAttributeGroup(ctx context.Context, in *CreateAttributeGroupRequest, opts ...grpc.CallOption) (*CreateAttributeGroupResponse, error) { - out := new(CreateAttributeGroupResponse) - err := c.cc.Invoke(ctx, AttributesService_CreateAttributeGroup_FullMethodName, in, out, opts...) +func (c *attributesServiceClient) CreateAttributeValue(ctx context.Context, in *CreateAttributeValueRequest, opts ...grpc.CallOption) (*CreateAttributeValueResponse, error) { + out := new(CreateAttributeValueResponse) + err := c.cc.Invoke(ctx, AttributesService_CreateAttributeValue_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *attributesServiceClient) UpdateAttribute(ctx context.Context, in *UpdateAttributeRequest, opts ...grpc.CallOption) (*UpdateAttributeResponse, error) { - out := new(UpdateAttributeResponse) - err := c.cc.Invoke(ctx, AttributesService_UpdateAttribute_FullMethodName, in, out, opts...) +func (c *attributesServiceClient) UpdateAttributeValue(ctx context.Context, in *UpdateAttributeValueRequest, opts ...grpc.CallOption) (*UpdateAttributeValueResponse, error) { + out := new(UpdateAttributeValueResponse) + err := c.cc.Invoke(ctx, AttributesService_UpdateAttributeValue_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *attributesServiceClient) UpdateAttributeGroup(ctx context.Context, in *UpdateAttributeGroupRequest, opts ...grpc.CallOption) (*UpdateAttributeGroupResponse, error) { - out := new(UpdateAttributeGroupResponse) - err := c.cc.Invoke(ctx, AttributesService_UpdateAttributeGroup_FullMethodName, in, out, opts...) +func (c *attributesServiceClient) DeleteAttributeValue(ctx context.Context, in *DeleteAttributeValueRequest, opts ...grpc.CallOption) (*DeleteAttributeValueResponse, error) { + out := new(DeleteAttributeValueResponse) + err := c.cc.Invoke(ctx, AttributesService_DeleteAttributeValue_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *attributesServiceClient) DeleteAttribute(ctx context.Context, in *DeleteAttributeRequest, opts ...grpc.CallOption) (*DeleteAttributeResponse, error) { - out := new(DeleteAttributeResponse) - err := c.cc.Invoke(ctx, AttributesService_DeleteAttribute_FullMethodName, in, out, opts...) +func (c *attributesServiceClient) AssignKeyAccessServerToAttribute(ctx context.Context, in *AssignKeyAccessServerToAttributeRequest, opts ...grpc.CallOption) (*AssignKeyAccessServerToAttributeResponse, error) { + out := new(AssignKeyAccessServerToAttributeResponse) + err := c.cc.Invoke(ctx, AttributesService_AssignKeyAccessServerToAttribute_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *attributesServiceClient) AssignKeyAccessServerToValue(ctx context.Context, in *AssignKeyAccessServerToValueRequest, opts ...grpc.CallOption) (*AssignKeyAccessServerToValueResponse, error) { + out := new(AssignKeyAccessServerToValueResponse) + err := c.cc.Invoke(ctx, AttributesService_AssignKeyAccessServerToValue_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *attributesServiceClient) RemoveKeyAccessServerFromAttribute(ctx context.Context, in *RemoveKeyAccessServerFromAttributeRequest, opts ...grpc.CallOption) (*RemoveKeyAccessServerFromAttributeResponse, error) { + out := new(RemoveKeyAccessServerFromAttributeResponse) + err := c.cc.Invoke(ctx, AttributesService_RemoveKeyAccessServerFromAttribute_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *attributesServiceClient) DeleteAttributeGroup(ctx context.Context, in *DeleteAttributeGroupRequest, opts ...grpc.CallOption) (*DeleteAttributeGroupResponse, error) { - out := new(DeleteAttributeGroupResponse) - err := c.cc.Invoke(ctx, AttributesService_DeleteAttributeGroup_FullMethodName, in, out, opts...) +func (c *attributesServiceClient) RemoveKeyAccessServerFromValue(ctx context.Context, in *RemoveKeyAccessServerFromValueRequest, opts ...grpc.CallOption) (*RemoveKeyAccessServerFromValueResponse, error) { + out := new(RemoveKeyAccessServerFromValueResponse) + err := c.cc.Invoke(ctx, AttributesService_RemoveKeyAccessServerFromValue_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -149,16 +208,35 @@ func (c *attributesServiceClient) DeleteAttributeGroup(ctx context.Context, in * // All implementations must embed UnimplementedAttributesServiceServer // for forward compatibility type AttributesServiceServer interface { - GetAttribute(context.Context, *GetAttributeRequest) (*GetAttributeResponse, error) - GetAttributeGroup(context.Context, *GetAttributeGroupRequest) (*GetAttributeGroupResponse, error) + // List Attributes + // Example: + // grpcurl -plaintext localhost:9000 attributes.AttributesService/ListAttributes ListAttributes(context.Context, *ListAttributesRequest) (*ListAttributesResponse, error) - ListAttributeGroups(context.Context, *ListAttributeGroupsRequest) (*ListAttributeGroupsResponse, error) + // List Values + // Example: + // grpcurl -plaintext -d '{"attribute_id": "attribute_id"}' localhost:8080 attributes.AttributesService/ListValues + ListAttributeValues(context.Context, *ListAttributeValuesRequest) (*ListAttributeValuesResponse, error) + GetAttribute(context.Context, *GetAttributeRequest) (*GetAttributeResponse, error) + // Create Attribute + // Example: + // + // grpcurl -plaintext -d '{"attribute": {"namespace_id": "namespace_id", "name": "attribute_name", "rule": "ATTRIBUTE_RULE_TYPE_ENUM_ALL_OF"}}' localhost:8080 attributes.AttributesService/CreateAttribute CreateAttribute(context.Context, *CreateAttributeRequest) (*CreateAttributeResponse, error) - CreateAttributeGroup(context.Context, *CreateAttributeGroupRequest) (*CreateAttributeGroupResponse, error) UpdateAttribute(context.Context, *UpdateAttributeRequest) (*UpdateAttributeResponse, error) - UpdateAttributeGroup(context.Context, *UpdateAttributeGroupRequest) (*UpdateAttributeGroupResponse, error) DeleteAttribute(context.Context, *DeleteAttributeRequest) (*DeleteAttributeResponse, error) - DeleteAttributeGroup(context.Context, *DeleteAttributeGroupRequest) (*DeleteAttributeGroupResponse, error) + // * Attribute Value * + GetAttributeValue(context.Context, *GetAttributeValueRequest) (*GetAttributeValueResponse, error) + // Create Attribute Value + // Example: + // + // grpcurl -plaintext -d '{"attribute_id": "attribute_id", "value": {"value": "value"}}' localhost:8080 attributes.AttributesService/CreateValue + CreateAttributeValue(context.Context, *CreateAttributeValueRequest) (*CreateAttributeValueResponse, error) + UpdateAttributeValue(context.Context, *UpdateAttributeValueRequest) (*UpdateAttributeValueResponse, error) + DeleteAttributeValue(context.Context, *DeleteAttributeValueRequest) (*DeleteAttributeValueResponse, error) + AssignKeyAccessServerToAttribute(context.Context, *AssignKeyAccessServerToAttributeRequest) (*AssignKeyAccessServerToAttributeResponse, error) + AssignKeyAccessServerToValue(context.Context, *AssignKeyAccessServerToValueRequest) (*AssignKeyAccessServerToValueResponse, error) + RemoveKeyAccessServerFromAttribute(context.Context, *RemoveKeyAccessServerFromAttributeRequest) (*RemoveKeyAccessServerFromAttributeResponse, error) + RemoveKeyAccessServerFromValue(context.Context, *RemoveKeyAccessServerFromValueRequest) (*RemoveKeyAccessServerFromValueResponse, error) mustEmbedUnimplementedAttributesServiceServer() } @@ -166,35 +244,47 @@ type AttributesServiceServer interface { type UnimplementedAttributesServiceServer struct { } -func (UnimplementedAttributesServiceServer) GetAttribute(context.Context, *GetAttributeRequest) (*GetAttributeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAttribute not implemented") -} -func (UnimplementedAttributesServiceServer) GetAttributeGroup(context.Context, *GetAttributeGroupRequest) (*GetAttributeGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetAttributeGroup not implemented") -} func (UnimplementedAttributesServiceServer) ListAttributes(context.Context, *ListAttributesRequest) (*ListAttributesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAttributes not implemented") } -func (UnimplementedAttributesServiceServer) ListAttributeGroups(context.Context, *ListAttributeGroupsRequest) (*ListAttributeGroupsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListAttributeGroups not implemented") +func (UnimplementedAttributesServiceServer) ListAttributeValues(context.Context, *ListAttributeValuesRequest) (*ListAttributeValuesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListAttributeValues not implemented") +} +func (UnimplementedAttributesServiceServer) GetAttribute(context.Context, *GetAttributeRequest) (*GetAttributeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttribute not implemented") } func (UnimplementedAttributesServiceServer) CreateAttribute(context.Context, *CreateAttributeRequest) (*CreateAttributeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateAttribute not implemented") } -func (UnimplementedAttributesServiceServer) CreateAttributeGroup(context.Context, *CreateAttributeGroupRequest) (*CreateAttributeGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateAttributeGroup not implemented") -} func (UnimplementedAttributesServiceServer) UpdateAttribute(context.Context, *UpdateAttributeRequest) (*UpdateAttributeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateAttribute not implemented") } -func (UnimplementedAttributesServiceServer) UpdateAttributeGroup(context.Context, *UpdateAttributeGroupRequest) (*UpdateAttributeGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateAttributeGroup not implemented") -} func (UnimplementedAttributesServiceServer) DeleteAttribute(context.Context, *DeleteAttributeRequest) (*DeleteAttributeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteAttribute not implemented") } -func (UnimplementedAttributesServiceServer) DeleteAttributeGroup(context.Context, *DeleteAttributeGroupRequest) (*DeleteAttributeGroupResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteAttributeGroup not implemented") +func (UnimplementedAttributesServiceServer) GetAttributeValue(context.Context, *GetAttributeValueRequest) (*GetAttributeValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetAttributeValue not implemented") +} +func (UnimplementedAttributesServiceServer) CreateAttributeValue(context.Context, *CreateAttributeValueRequest) (*CreateAttributeValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateAttributeValue not implemented") +} +func (UnimplementedAttributesServiceServer) UpdateAttributeValue(context.Context, *UpdateAttributeValueRequest) (*UpdateAttributeValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateAttributeValue not implemented") +} +func (UnimplementedAttributesServiceServer) DeleteAttributeValue(context.Context, *DeleteAttributeValueRequest) (*DeleteAttributeValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteAttributeValue not implemented") +} +func (UnimplementedAttributesServiceServer) AssignKeyAccessServerToAttribute(context.Context, *AssignKeyAccessServerToAttributeRequest) (*AssignKeyAccessServerToAttributeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AssignKeyAccessServerToAttribute not implemented") +} +func (UnimplementedAttributesServiceServer) AssignKeyAccessServerToValue(context.Context, *AssignKeyAccessServerToValueRequest) (*AssignKeyAccessServerToValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AssignKeyAccessServerToValue not implemented") +} +func (UnimplementedAttributesServiceServer) RemoveKeyAccessServerFromAttribute(context.Context, *RemoveKeyAccessServerFromAttributeRequest) (*RemoveKeyAccessServerFromAttributeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveKeyAccessServerFromAttribute not implemented") +} +func (UnimplementedAttributesServiceServer) RemoveKeyAccessServerFromValue(context.Context, *RemoveKeyAccessServerFromValueRequest) (*RemoveKeyAccessServerFromValueResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RemoveKeyAccessServerFromValue not implemented") } func (UnimplementedAttributesServiceServer) mustEmbedUnimplementedAttributesServiceServer() {} @@ -209,6 +299,42 @@ func RegisterAttributesServiceServer(s grpc.ServiceRegistrar, srv AttributesServ s.RegisterService(&AttributesService_ServiceDesc, srv) } +func _AttributesService_ListAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAttributesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttributesServiceServer).ListAttributes(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AttributesService_ListAttributes_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttributesServiceServer).ListAttributes(ctx, req.(*ListAttributesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AttributesService_ListAttributeValues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListAttributeValuesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttributesServiceServer).ListAttributeValues(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AttributesService_ListAttributeValues_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttributesServiceServer).ListAttributeValues(ctx, req.(*ListAttributeValuesRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _AttributesService_GetAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetAttributeRequest) if err := dec(in); err != nil { @@ -227,164 +353,200 @@ func _AttributesService_GetAttribute_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } -func _AttributesService_GetAttributeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetAttributeGroupRequest) +func _AttributesService_CreateAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AttributesServiceServer).GetAttributeGroup(ctx, in) + return srv.(AttributesServiceServer).CreateAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AttributesService_GetAttributeGroup_FullMethodName, + FullMethod: AttributesService_CreateAttribute_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttributesServiceServer).GetAttributeGroup(ctx, req.(*GetAttributeGroupRequest)) + return srv.(AttributesServiceServer).CreateAttribute(ctx, req.(*CreateAttributeRequest)) } return interceptor(ctx, in, info, handler) } -func _AttributesService_ListAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListAttributesRequest) +func _AttributesService_UpdateAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AttributesServiceServer).ListAttributes(ctx, in) + return srv.(AttributesServiceServer).UpdateAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AttributesService_ListAttributes_FullMethodName, + FullMethod: AttributesService_UpdateAttribute_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttributesServiceServer).ListAttributes(ctx, req.(*ListAttributesRequest)) + return srv.(AttributesServiceServer).UpdateAttribute(ctx, req.(*UpdateAttributeRequest)) } return interceptor(ctx, in, info, handler) } -func _AttributesService_ListAttributeGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListAttributeGroupsRequest) +func _AttributesService_DeleteAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AttributesServiceServer).ListAttributeGroups(ctx, in) + return srv.(AttributesServiceServer).DeleteAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AttributesService_ListAttributeGroups_FullMethodName, + FullMethod: AttributesService_DeleteAttribute_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttributesServiceServer).ListAttributeGroups(ctx, req.(*ListAttributeGroupsRequest)) + return srv.(AttributesServiceServer).DeleteAttribute(ctx, req.(*DeleteAttributeRequest)) } return interceptor(ctx, in, info, handler) } -func _AttributesService_CreateAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateAttributeRequest) +func _AttributesService_GetAttributeValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAttributeValueRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AttributesServiceServer).CreateAttribute(ctx, in) + return srv.(AttributesServiceServer).GetAttributeValue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AttributesService_CreateAttribute_FullMethodName, + FullMethod: AttributesService_GetAttributeValue_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttributesServiceServer).CreateAttribute(ctx, req.(*CreateAttributeRequest)) + return srv.(AttributesServiceServer).GetAttributeValue(ctx, req.(*GetAttributeValueRequest)) } return interceptor(ctx, in, info, handler) } -func _AttributesService_CreateAttributeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateAttributeGroupRequest) +func _AttributesService_CreateAttributeValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateAttributeValueRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AttributesServiceServer).CreateAttributeGroup(ctx, in) + return srv.(AttributesServiceServer).CreateAttributeValue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AttributesService_CreateAttributeGroup_FullMethodName, + FullMethod: AttributesService_CreateAttributeValue_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttributesServiceServer).CreateAttributeGroup(ctx, req.(*CreateAttributeGroupRequest)) + return srv.(AttributesServiceServer).CreateAttributeValue(ctx, req.(*CreateAttributeValueRequest)) } return interceptor(ctx, in, info, handler) } -func _AttributesService_UpdateAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateAttributeRequest) +func _AttributesService_UpdateAttributeValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateAttributeValueRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AttributesServiceServer).UpdateAttribute(ctx, in) + return srv.(AttributesServiceServer).UpdateAttributeValue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AttributesService_UpdateAttribute_FullMethodName, + FullMethod: AttributesService_UpdateAttributeValue_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttributesServiceServer).UpdateAttribute(ctx, req.(*UpdateAttributeRequest)) + return srv.(AttributesServiceServer).UpdateAttributeValue(ctx, req.(*UpdateAttributeValueRequest)) } return interceptor(ctx, in, info, handler) } -func _AttributesService_UpdateAttributeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateAttributeGroupRequest) +func _AttributesService_DeleteAttributeValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteAttributeValueRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AttributesServiceServer).UpdateAttributeGroup(ctx, in) + return srv.(AttributesServiceServer).DeleteAttributeValue(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AttributesService_UpdateAttributeGroup_FullMethodName, + FullMethod: AttributesService_DeleteAttributeValue_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttributesServiceServer).UpdateAttributeGroup(ctx, req.(*UpdateAttributeGroupRequest)) + return srv.(AttributesServiceServer).DeleteAttributeValue(ctx, req.(*DeleteAttributeValueRequest)) } return interceptor(ctx, in, info, handler) } -func _AttributesService_DeleteAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAttributeRequest) +func _AttributesService_AssignKeyAccessServerToAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AssignKeyAccessServerToAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AttributesServiceServer).DeleteAttribute(ctx, in) + return srv.(AttributesServiceServer).AssignKeyAccessServerToAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AttributesService_DeleteAttribute_FullMethodName, + FullMethod: AttributesService_AssignKeyAccessServerToAttribute_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttributesServiceServer).DeleteAttribute(ctx, req.(*DeleteAttributeRequest)) + return srv.(AttributesServiceServer).AssignKeyAccessServerToAttribute(ctx, req.(*AssignKeyAccessServerToAttributeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AttributesService_AssignKeyAccessServerToValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AssignKeyAccessServerToValueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttributesServiceServer).AssignKeyAccessServerToValue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AttributesService_AssignKeyAccessServerToValue_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttributesServiceServer).AssignKeyAccessServerToValue(ctx, req.(*AssignKeyAccessServerToValueRequest)) } return interceptor(ctx, in, info, handler) } -func _AttributesService_DeleteAttributeGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteAttributeGroupRequest) +func _AttributesService_RemoveKeyAccessServerFromAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveKeyAccessServerFromAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AttributesServiceServer).DeleteAttributeGroup(ctx, in) + return srv.(AttributesServiceServer).RemoveKeyAccessServerFromAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: AttributesService_DeleteAttributeGroup_FullMethodName, + FullMethod: AttributesService_RemoveKeyAccessServerFromAttribute_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AttributesServiceServer).DeleteAttributeGroup(ctx, req.(*DeleteAttributeGroupRequest)) + return srv.(AttributesServiceServer).RemoveKeyAccessServerFromAttribute(ctx, req.(*RemoveKeyAccessServerFromAttributeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _AttributesService_RemoveKeyAccessServerFromValue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RemoveKeyAccessServerFromValueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AttributesServiceServer).RemoveKeyAccessServerFromValue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: AttributesService_RemoveKeyAccessServerFromValue_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AttributesServiceServer).RemoveKeyAccessServerFromValue(ctx, req.(*RemoveKeyAccessServerFromValueRequest)) } return interceptor(ctx, in, info, handler) } @@ -396,45 +558,61 @@ var AttributesService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "attributes.AttributesService", HandlerType: (*AttributesServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "ListAttributes", + Handler: _AttributesService_ListAttributes_Handler, + }, + { + MethodName: "ListAttributeValues", + Handler: _AttributesService_ListAttributeValues_Handler, + }, { MethodName: "GetAttribute", Handler: _AttributesService_GetAttribute_Handler, }, { - MethodName: "GetAttributeGroup", - Handler: _AttributesService_GetAttributeGroup_Handler, + MethodName: "CreateAttribute", + Handler: _AttributesService_CreateAttribute_Handler, }, { - MethodName: "ListAttributes", - Handler: _AttributesService_ListAttributes_Handler, + MethodName: "UpdateAttribute", + Handler: _AttributesService_UpdateAttribute_Handler, }, { - MethodName: "ListAttributeGroups", - Handler: _AttributesService_ListAttributeGroups_Handler, + MethodName: "DeleteAttribute", + Handler: _AttributesService_DeleteAttribute_Handler, }, { - MethodName: "CreateAttribute", - Handler: _AttributesService_CreateAttribute_Handler, + MethodName: "GetAttributeValue", + Handler: _AttributesService_GetAttributeValue_Handler, }, { - MethodName: "CreateAttributeGroup", - Handler: _AttributesService_CreateAttributeGroup_Handler, + MethodName: "CreateAttributeValue", + Handler: _AttributesService_CreateAttributeValue_Handler, }, { - MethodName: "UpdateAttribute", - Handler: _AttributesService_UpdateAttribute_Handler, + MethodName: "UpdateAttributeValue", + Handler: _AttributesService_UpdateAttributeValue_Handler, }, { - MethodName: "UpdateAttributeGroup", - Handler: _AttributesService_UpdateAttributeGroup_Handler, + MethodName: "DeleteAttributeValue", + Handler: _AttributesService_DeleteAttributeValue_Handler, }, { - MethodName: "DeleteAttribute", - Handler: _AttributesService_DeleteAttribute_Handler, + MethodName: "AssignKeyAccessServerToAttribute", + Handler: _AttributesService_AssignKeyAccessServerToAttribute_Handler, + }, + { + MethodName: "AssignKeyAccessServerToValue", + Handler: _AttributesService_AssignKeyAccessServerToValue_Handler, + }, + { + MethodName: "RemoveKeyAccessServerFromAttribute", + Handler: _AttributesService_RemoveKeyAccessServerFromAttribute_Handler, }, { - MethodName: "DeleteAttributeGroup", - Handler: _AttributesService_DeleteAttributeGroup_Handler, + MethodName: "RemoveKeyAccessServerFromValue", + Handler: _AttributesService_RemoveKeyAccessServerFromValue_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/sdk/authorization/authorization.pb.go b/sdk/authorization/authorization.pb.go index 82797c5acd..0074e21c0e 100644 --- a/sdk/authorization/authorization.pb.go +++ b/sdk/authorization/authorization.pb.go @@ -7,7 +7,6 @@ package authorization import ( - attributes "github.com/opentdf/opentdf-v2-poc/sdk/attributes" _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -851,8 +850,8 @@ type EntityEntitlements struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` - AttributeValueReferences []*attributes.AttributeValueReference `protobuf:"bytes,2,rep,name=attribute_value_references,json=attributeValueReferences,proto3" json:"attribute_value_references,omitempty"` + EntityId string `protobuf:"bytes,1,opt,name=entity_id,json=entityId,proto3" json:"entity_id,omitempty"` + AttributeId []string `protobuf:"bytes,2,rep,name=attribute_id,json=attributeId,proto3" json:"attribute_id,omitempty"` } func (x *EntityEntitlements) Reset() { @@ -894,9 +893,9 @@ func (x *EntityEntitlements) GetEntityId() string { return "" } -func (x *EntityEntitlements) GetAttributeValueReferences() []*attributes.AttributeValueReference { +func (x *EntityEntitlements) GetAttributeId() []string { if x != nil { - return x.AttributeValueReferences + return x.AttributeId } return nil } @@ -907,8 +906,8 @@ type ResourceAttributes struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - AttributeValueReferences []*attributes.AttributeValueReference `protobuf:"bytes,2,rep,name=attribute_value_references,json=attributeValueReferences,proto3" json:"attribute_value_references,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + AttributeId []string `protobuf:"bytes,2,rep,name=attribute_id,json=attributeId,proto3" json:"attribute_id,omitempty"` } func (x *ResourceAttributes) Reset() { @@ -950,9 +949,9 @@ func (x *ResourceAttributes) GetId() string { return "" } -func (x *ResourceAttributes) GetAttributeValueReferences() []*attributes.AttributeValueReference { +func (x *ResourceAttributes) GetAttributeId() []string { if x != nil { - return x.AttributeValueReferences + return x.AttributeId } return nil } @@ -1032,163 +1031,153 @@ var file_authorization_authorization_proto_rawDesc = []byte{ 0x0a, 0x21, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x1a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x61, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, - 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x02, 0x0a, 0x06, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x6d, - 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x09, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, - 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, 0x72, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x43, 0x6c, - 0x61, 0x69, 0x6d, 0x73, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x03, 0x6a, 0x77, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6a, 0x77, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x63, - 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, - 0x79, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x12, 0x35, 0x0a, 0x06, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, - 0x74, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x42, 0x0d, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x22, 0x42, 0x0a, 0x0c, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x12, 0x32, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x0b, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x65, - 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xdd, 0x01, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x6e, - 0x64, 0x61, 0x72, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x08, 0x73, 0x74, - 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x22, 0x6c, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x5f, 0x41, - 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x5f, - 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, 0x54, 0x10, 0x01, - 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x5f, 0x41, 0x43, 0x54, - 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x42, 0x07, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x0f, 0x44, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x0d, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x52, - 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x52, 0x0a, - 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x52, 0x12, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x22, 0xd5, 0x02, 0x0a, 0x10, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, - 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x34, - 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x73, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x61, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x62, 0x6c, - 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, - 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4c, 0x0a, 0x08, 0x44, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x45, 0x43, 0x49, 0x53, - 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, - 0x4e, 0x59, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, - 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x22, 0x62, 0x0a, 0x13, 0x47, 0x65, 0x74, - 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x4b, 0x0a, 0x11, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x69, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, 0x64, 0x65, 0x63, - 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x22, 0x66, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x52, 0x11, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, - 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x31, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x69, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x88, 0x01, - 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x12, - 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, 0x64, 0x12, - 0x61, 0x0a, 0x1a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x18, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, - 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, - 0x65, 0x73, 0x22, 0x87, 0x01, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, - 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x61, 0x0a, 0x1a, 0x61, 0x74, 0x74, - 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x72, 0x65, 0x66, - 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x52, 0x18, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x17, + 0x6f, 0x6e, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, + 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x02, 0x0a, 0x06, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, + 0x0c, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, + 0x09, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x11, + 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x5f, 0x75, 0x72, + 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0f, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x55, 0x72, 0x6c, 0x12, 0x12, 0x0a, 0x03, 0x6a, 0x77, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, 0x6a, 0x77, 0x74, 0x12, 0x2e, + 0x0a, 0x06, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x41, 0x6e, 0x79, 0x48, 0x00, 0x52, 0x06, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x73, 0x12, 0x35, + 0x0a, 0x06, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x48, 0x00, 0x52, 0x06, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x42, 0x0d, 0x0a, 0x0b, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x22, 0x42, 0x0a, 0x0c, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x12, 0x32, 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x50, 0x0a, 0x0b, 0x45, 0x6e, 0x74, 0x69, + 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, + 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, + 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x22, 0xdd, 0x01, 0x0a, 0x06, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x42, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, + 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, + 0x08, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x06, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x22, 0x6c, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x41, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, + 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, + 0x52, 0x44, 0x5f, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x44, 0x45, 0x43, 0x52, 0x59, 0x50, + 0x54, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x41, 0x4e, 0x44, 0x41, 0x52, 0x44, 0x5f, + 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x4d, 0x49, 0x54, 0x10, + 0x02, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x0f, 0x44, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, + 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x3f, 0x0a, 0x0d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, + 0x12, 0x52, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x52, 0x12, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, + 0x75, 0x74, 0x65, 0x73, 0x22, 0xd5, 0x02, 0x0a, 0x10, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x65, 0x6e, 0x74, + 0x69, 0x74, 0x79, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x64, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x73, 0x49, 0x64, 0x12, 0x2d, 0x0a, 0x06, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x44, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x28, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, + 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0b, 0x6f, 0x62, 0x6c, 0x69, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x4c, + 0x0a, 0x08, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x14, 0x44, 0x45, + 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x44, 0x45, 0x43, 0x49, 0x53, 0x49, 0x4f, 0x4e, + 0x5f, 0x44, 0x45, 0x4e, 0x59, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x44, 0x45, 0x43, 0x49, 0x53, + 0x49, 0x4f, 0x4e, 0x5f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x22, 0x62, 0x0a, 0x13, + 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x4b, 0x0a, 0x11, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x5f, + 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x10, + 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, + 0x22, 0x66, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x12, 0x64, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x11, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, + 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x31, 0x0a, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52, 0x08, 0x65, 0x6e, + 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x3c, 0x0a, 0x05, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x54, + 0x0a, 0x12, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x5f, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, + 0x74, 0x65, 0x49, 0x64, 0x22, 0x47, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x61, 0x74, + 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x49, 0x64, 0x22, 0x60, 0x0a, + 0x17, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, + 0x6e, 0x74, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x73, 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x32, + 0x86, 0x02, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x44, + 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, + 0x44, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7a, 0x0a, 0x0f, + 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, + 0x25, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x45, 0x6e, - 0x74, 0x69, 0x74, 0x79, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x0c, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x32, 0x86, - 0x02, 0x0a, 0x14, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x72, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x44, 0x65, - 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x44, 0x65, 0x63, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x44, - 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x11, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x7a, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x25, - 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, - 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, 0x74, - 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0xb0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x12, 0x41, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, - 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, - 0x76, 0x32, 0x2d, 0x70, 0x6f, 0x63, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, - 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, - 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, - 0x19, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, - 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x41, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x6c, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x22, 0x10, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x74, 0x69, + 0x74, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x42, 0xb0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, + 0x2e, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x12, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, + 0x2d, 0x76, 0x32, 0x2d, 0x70, 0x6f, 0x63, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, + 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, + 0x02, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, + 0x02, 0x19, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x41, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1206,22 +1195,21 @@ func file_authorization_authorization_proto_rawDescGZIP() []byte { var file_authorization_authorization_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_authorization_authorization_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_authorization_authorization_proto_goTypes = []interface{}{ - (Action_StandardAction)(0), // 0: authorization.Action.StandardAction - (DecisionResponse_Decision)(0), // 1: authorization.DecisionResponse.Decision - (*Entity)(nil), // 2: authorization.Entity - (*EntityCustom)(nil), // 3: authorization.EntityCustom - (*EntityChain)(nil), // 4: authorization.EntityChain - (*Action)(nil), // 5: authorization.Action - (*DecisionRequest)(nil), // 6: authorization.DecisionRequest - (*DecisionResponse)(nil), // 7: authorization.DecisionResponse - (*GetDecisionsRequest)(nil), // 8: authorization.GetDecisionsRequest - (*GetDecisionsResponse)(nil), // 9: authorization.GetDecisionsResponse - (*GetEntitlementsRequest)(nil), // 10: authorization.GetEntitlementsRequest - (*EntityEntitlements)(nil), // 11: authorization.EntityEntitlements - (*ResourceAttributes)(nil), // 12: authorization.ResourceAttributes - (*GetEntitlementsResponse)(nil), // 13: authorization.GetEntitlementsResponse - (*anypb.Any)(nil), // 14: google.protobuf.Any - (*attributes.AttributeValueReference)(nil), // 15: attributes.AttributeValueReference + (Action_StandardAction)(0), // 0: authorization.Action.StandardAction + (DecisionResponse_Decision)(0), // 1: authorization.DecisionResponse.Decision + (*Entity)(nil), // 2: authorization.Entity + (*EntityCustom)(nil), // 3: authorization.EntityCustom + (*EntityChain)(nil), // 4: authorization.EntityChain + (*Action)(nil), // 5: authorization.Action + (*DecisionRequest)(nil), // 6: authorization.DecisionRequest + (*DecisionResponse)(nil), // 7: authorization.DecisionResponse + (*GetDecisionsRequest)(nil), // 8: authorization.GetDecisionsRequest + (*GetDecisionsResponse)(nil), // 9: authorization.GetDecisionsResponse + (*GetEntitlementsRequest)(nil), // 10: authorization.GetEntitlementsRequest + (*EntityEntitlements)(nil), // 11: authorization.EntityEntitlements + (*ResourceAttributes)(nil), // 12: authorization.ResourceAttributes + (*GetEntitlementsResponse)(nil), // 13: authorization.GetEntitlementsResponse + (*anypb.Any)(nil), // 14: google.protobuf.Any } var file_authorization_authorization_proto_depIdxs = []int32{ 14, // 0: authorization.Entity.claims:type_name -> google.protobuf.Any @@ -1238,18 +1226,16 @@ var file_authorization_authorization_proto_depIdxs = []int32{ 7, // 11: authorization.GetDecisionsResponse.decision_responses:type_name -> authorization.DecisionResponse 2, // 12: authorization.GetEntitlementsRequest.entities:type_name -> authorization.Entity 12, // 13: authorization.GetEntitlementsRequest.scope:type_name -> authorization.ResourceAttributes - 15, // 14: authorization.EntityEntitlements.attribute_value_references:type_name -> attributes.AttributeValueReference - 15, // 15: authorization.ResourceAttributes.attribute_value_references:type_name -> attributes.AttributeValueReference - 11, // 16: authorization.GetEntitlementsResponse.entitlements:type_name -> authorization.EntityEntitlements - 8, // 17: authorization.AuthorizationService.GetDecisions:input_type -> authorization.GetDecisionsRequest - 10, // 18: authorization.AuthorizationService.GetEntitlements:input_type -> authorization.GetEntitlementsRequest - 9, // 19: authorization.AuthorizationService.GetDecisions:output_type -> authorization.GetDecisionsResponse - 13, // 20: authorization.AuthorizationService.GetEntitlements:output_type -> authorization.GetEntitlementsResponse - 19, // [19:21] is the sub-list for method output_type - 17, // [17:19] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 11, // 14: authorization.GetEntitlementsResponse.entitlements:type_name -> authorization.EntityEntitlements + 8, // 15: authorization.AuthorizationService.GetDecisions:input_type -> authorization.GetDecisionsRequest + 10, // 16: authorization.AuthorizationService.GetEntitlements:input_type -> authorization.GetEntitlementsRequest + 9, // 17: authorization.AuthorizationService.GetDecisions:output_type -> authorization.GetDecisionsResponse + 13, // 18: authorization.AuthorizationService.GetEntitlements:output_type -> authorization.GetEntitlementsResponse + 17, // [17:19] is the sub-list for method output_type + 15, // [15:17] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_authorization_authorization_proto_init() } diff --git a/sdk/common/common.pb.go b/sdk/common/common.pb.go index c11e10315a..2702e9aee7 100644 --- a/sdk/common/common.pb.go +++ b/sdk/common/common.pb.go @@ -7,9 +7,9 @@ package common import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" ) @@ -21,106 +21,24 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type PolicyResourceType int32 - -const ( - PolicyResourceType_POLICY_RESOURCE_TYPE_UNSPECIFIED PolicyResourceType = 0 - PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING PolicyResourceType = 1 - PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM PolicyResourceType = 2 - PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_MAPPING PolicyResourceType = 3 - PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_GROUP PolicyResourceType = 4 - PolicyResourceType_POLICY_RESOURCE_TYPE_SUBJECT_ENCODING_MAPPING PolicyResourceType = 5 - PolicyResourceType_POLICY_RESOURCE_TYPE_KEY_ACCESS PolicyResourceType = 6 - PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION PolicyResourceType = 7 - PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP PolicyResourceType = 8 - PolicyResourceType_POLICY_RESOURCE_TYPE_KEY_ACCESS_GRANTS PolicyResourceType = 9 -) - -// Enum value maps for PolicyResourceType. -var ( - PolicyResourceType_name = map[int32]string{ - 0: "POLICY_RESOURCE_TYPE_UNSPECIFIED", - 1: "POLICY_RESOURCE_TYPE_RESOURCE_ENCODING", - 2: "POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM", - 3: "POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_MAPPING", - 4: "POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_GROUP", - 5: "POLICY_RESOURCE_TYPE_SUBJECT_ENCODING_MAPPING", - 6: "POLICY_RESOURCE_TYPE_KEY_ACCESS", - 7: "POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION", - 8: "POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP", - 9: "POLICY_RESOURCE_TYPE_KEY_ACCESS_GRANTS", - } - PolicyResourceType_value = map[string]int32{ - "POLICY_RESOURCE_TYPE_UNSPECIFIED": 0, - "POLICY_RESOURCE_TYPE_RESOURCE_ENCODING": 1, - "POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM": 2, - "POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_MAPPING": 3, - "POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_GROUP": 4, - "POLICY_RESOURCE_TYPE_SUBJECT_ENCODING_MAPPING": 5, - "POLICY_RESOURCE_TYPE_KEY_ACCESS": 6, - "POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION": 7, - "POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP": 8, - "POLICY_RESOURCE_TYPE_KEY_ACCESS_GRANTS": 9, - } -) - -func (x PolicyResourceType) Enum() *PolicyResourceType { - p := new(PolicyResourceType) - *p = x - return p -} - -func (x PolicyResourceType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PolicyResourceType) Descriptor() protoreflect.EnumDescriptor { - return file_common_common_proto_enumTypes[0].Descriptor() -} - -func (PolicyResourceType) Type() protoreflect.EnumType { - return &file_common_common_proto_enumTypes[0] -} - -func (x PolicyResourceType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PolicyResourceType.Descriptor instead. -func (PolicyResourceType) EnumDescriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{0} -} - // Struct to uniquely identify a resource with optional additional metadata -type ResourceDescriptor struct { +type Metadata struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type PolicyResourceType `protobuf:"varint,1,opt,name=type,proto3,enum=common.PolicyResourceType" json:"type,omitempty"` - // unique resource identifier - Id int32 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - // resource version - Version int32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - // resource name - Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"` - // resource namespace; used to partition resources, support by namespace AuthN and enable federation - Namespace string `protobuf:"bytes,5,opt,name=namespace,proto3" json:"namespace,omitempty"` - // optional fully qualified name of the resource. FQN is used to support direct references and to eliminate the need - // for clients to compose an FQN at run time. - // - // the fqn may be specific to the resource type. - Fqn string `protobuf:"bytes,6,opt,name=fqn,proto3" json:"fqn,omitempty"` - // optional short description / label - Labels map[string]string `protobuf:"bytes,7,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // created_at set by server (entity who created will recorded in an audit event) + CreatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + // updated_at set by server (entity who updated will recorded in an audit event) + UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` + // optional short description + Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // optional long description - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - // optional list of resource dependencies - Dependencies []*ResourceDependency `protobuf:"bytes,9,rep,name=dependencies,proto3" json:"dependencies,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` } -func (x *ResourceDescriptor) Reset() { - *x = ResourceDescriptor{} +func (x *Metadata) Reset() { + *x = Metadata{} if protoimpl.UnsafeEnabled { mi := &file_common_common_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -128,13 +46,13 @@ func (x *ResourceDescriptor) Reset() { } } -func (x *ResourceDescriptor) String() string { +func (x *Metadata) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResourceDescriptor) ProtoMessage() {} +func (*Metadata) ProtoMessage() {} -func (x *ResourceDescriptor) ProtoReflect() protoreflect.Message { +func (x *Metadata) ProtoReflect() protoreflect.Message { mi := &file_common_common_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -146,90 +64,52 @@ func (x *ResourceDescriptor) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResourceDescriptor.ProtoReflect.Descriptor instead. -func (*ResourceDescriptor) Descriptor() ([]byte, []int) { +// Deprecated: Use Metadata.ProtoReflect.Descriptor instead. +func (*Metadata) Descriptor() ([]byte, []int) { return file_common_common_proto_rawDescGZIP(), []int{0} } -func (x *ResourceDescriptor) GetType() PolicyResourceType { +func (x *Metadata) GetCreatedAt() *timestamppb.Timestamp { if x != nil { - return x.Type + return x.CreatedAt } - return PolicyResourceType_POLICY_RESOURCE_TYPE_UNSPECIFIED -} - -func (x *ResourceDescriptor) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *ResourceDescriptor) GetVersion() int32 { - if x != nil { - return x.Version - } - return 0 -} - -func (x *ResourceDescriptor) GetName() string { - if x != nil { - return x.Name - } - return "" -} - -func (x *ResourceDescriptor) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" + return nil } -func (x *ResourceDescriptor) GetFqn() string { +func (x *Metadata) GetUpdatedAt() *timestamppb.Timestamp { if x != nil { - return x.Fqn + return x.UpdatedAt } - return "" + return nil } -func (x *ResourceDescriptor) GetLabels() map[string]string { +func (x *Metadata) GetLabels() map[string]string { if x != nil { return x.Labels } return nil } -func (x *ResourceDescriptor) GetDescription() string { +func (x *Metadata) GetDescription() string { if x != nil { return x.Description } return "" } -func (x *ResourceDescriptor) GetDependencies() []*ResourceDependency { - if x != nil { - return x.Dependencies - } - return nil -} - -// Define a resource dependency -type ResourceDependency struct { +type MetadataMutable struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // namespace of referenced resource - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - // version of reference resource - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // type of dependency - Type PolicyResourceType `protobuf:"varint,3,opt,name=type,proto3,enum=common.PolicyResourceType" json:"type,omitempty"` + // optional short description + Labels map[string]string `protobuf:"bytes,3,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // optional long description + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` } -func (x *ResourceDependency) Reset() { - *x = ResourceDependency{} +func (x *MetadataMutable) Reset() { + *x = MetadataMutable{} if protoimpl.UnsafeEnabled { mi := &file_common_common_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -237,13 +117,13 @@ func (x *ResourceDependency) Reset() { } } -func (x *ResourceDependency) String() string { +func (x *MetadataMutable) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ResourceDependency) ProtoMessage() {} +func (*MetadataMutable) ProtoMessage() {} -func (x *ResourceDependency) ProtoReflect() protoreflect.Message { +func (x *MetadataMutable) ProtoReflect() protoreflect.Message { mi := &file_common_common_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -255,317 +135,69 @@ func (x *ResourceDependency) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ResourceDependency.ProtoReflect.Descriptor instead. -func (*ResourceDependency) Descriptor() ([]byte, []int) { +// Deprecated: Use MetadataMutable.ProtoReflect.Descriptor instead. +func (*MetadataMutable) Descriptor() ([]byte, []int) { return file_common_common_proto_rawDescGZIP(), []int{1} } -func (x *ResourceDependency) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ResourceDependency) GetVersion() string { +func (x *MetadataMutable) GetLabels() map[string]string { if x != nil { - return x.Version - } - return "" -} - -func (x *ResourceDependency) GetType() PolicyResourceType { - if x != nil { - return x.Type - } - return PolicyResourceType_POLICY_RESOURCE_TYPE_UNSPECIFIED -} - -// Define a resource selector -type ResourceSelector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // namespace of referenced resource - Namespace string `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` - // version of reference resource - Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"` - // You can select a resource by name or by labels - // - // Types that are assignable to Selector: - // - // *ResourceSelector_Name - // *ResourceSelector_LabelSelector_ - Selector isResourceSelector_Selector `protobuf_oneof:"selector"` -} - -func (x *ResourceSelector) Reset() { - *x = ResourceSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceSelector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceSelector) ProtoMessage() {} - -func (x *ResourceSelector) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceSelector.ProtoReflect.Descriptor instead. -func (*ResourceSelector) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{2} -} - -func (x *ResourceSelector) GetNamespace() string { - if x != nil { - return x.Namespace - } - return "" -} - -func (x *ResourceSelector) GetVersion() int32 { - if x != nil { - return x.Version - } - return 0 -} - -func (m *ResourceSelector) GetSelector() isResourceSelector_Selector { - if m != nil { - return m.Selector - } - return nil -} - -func (x *ResourceSelector) GetName() string { - if x, ok := x.GetSelector().(*ResourceSelector_Name); ok { - return x.Name - } - return "" -} - -func (x *ResourceSelector) GetLabelSelector() *ResourceSelector_LabelSelector { - if x, ok := x.GetSelector().(*ResourceSelector_LabelSelector_); ok { - return x.LabelSelector + return x.Labels } return nil } -type isResourceSelector_Selector interface { - isResourceSelector_Selector() -} - -type ResourceSelector_Name struct { - // name of referenced resource - Name string `protobuf:"bytes,3,opt,name=name,proto3,oneof"` -} - -type ResourceSelector_LabelSelector_ struct { - // labels to match a against a resource - LabelSelector *ResourceSelector_LabelSelector `protobuf:"bytes,4,opt,name=label_selector,json=labelSelector,proto3,oneof"` -} - -func (*ResourceSelector_Name) isResourceSelector_Selector() {} - -func (*ResourceSelector_LabelSelector_) isResourceSelector_Selector() {} - -// Define a label selector -type ResourceSelector_LabelSelector struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // labels to match a against a resource - Labels map[string]string `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *ResourceSelector_LabelSelector) Reset() { - *x = ResourceSelector_LabelSelector{} - if protoimpl.UnsafeEnabled { - mi := &file_common_common_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ResourceSelector_LabelSelector) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ResourceSelector_LabelSelector) ProtoMessage() {} - -func (x *ResourceSelector_LabelSelector) ProtoReflect() protoreflect.Message { - mi := &file_common_common_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ResourceSelector_LabelSelector.ProtoReflect.Descriptor instead. -func (*ResourceSelector_LabelSelector) Descriptor() ([]byte, []int) { - return file_common_common_proto_rawDescGZIP(), []int{2, 0} -} - -func (x *ResourceSelector_LabelSelector) GetLabels() map[string]string { +func (x *MetadataMutable) GetDescription() string { if x != nil { - return x.Labels + return x.Description } - return nil + return "" } var File_common_common_proto protoreflect.FileDescriptor var file_common_common_proto_rawDesc = []byte{ 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x1b, 0x62, - 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x07, 0x0a, 0x12, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x12, 0x3b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x42, 0x0b, 0xba, 0x48, 0x08, - 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x81, 0x04, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x42, 0xe2, 0x03, 0xba, 0x48, 0xde, 0x03, 0xba, - 0x01, 0xd2, 0x03, 0x0a, 0x10, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x66, - 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0xea, 0x02, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x73, - 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x61, 0x74, - 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x64, 0x6f, 0x74, 0x2c, 0x20, - 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, - 0x74, 0x20, 0x28, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x29, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, - 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, - 0x74, 0x68, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x6e, 0x75, 0x6d, 0x65, 0x72, - 0x69, 0x63, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x45, 0x61, - 0x63, 0x68, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, - 0x20, 0x31, 0x20, 0x74, 0x6f, 0x20, 0x36, 0x33, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, - 0x65, 0x72, 0x73, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x2c, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x69, - 0x6e, 0x67, 0x20, 0x68, 0x79, 0x70, 0x68, 0x65, 0x6e, 0x73, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6e, - 0x6f, 0x74, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, - 0x6f, 0x72, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, - 0x72, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x74, 0x6f, 0x70, 0x2d, 0x6c, 0x65, 0x76, 0x65, 0x6c, - 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, - 0x74, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x64, 0x6f, 0x74, 0x29, 0x20, 0x6d, - 0x75, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, - 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, 0x74, 0x77, 0x6f, 0x20, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x62, 0x65, 0x74, 0x69, 0x63, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, - 0x73, 0x2e, 0x1a, 0x51, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, - 0x28, 0x27, 0x5e, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x28, - 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5c, 0x5c, 0x2d, 0x5d, 0x7b, 0x30, - 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, - 0x3f, 0x5c, 0x5c, 0x2e, 0x29, 0x2b, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5d, 0x7b, 0x32, - 0x2c, 0x7d, 0x24, 0x27, 0x29, 0xc8, 0x01, 0x01, 0x72, 0x03, 0x18, 0xfd, 0x01, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x66, 0x71, 0x6e, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x66, 0x71, 0x6e, 0x12, 0x3e, 0x0a, 0x06, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x0c, - 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x0c, - 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x1a, 0x39, 0x0a, 0x0b, - 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, - 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x7c, 0x0a, 0x12, 0x52, 0x65, 0x73, 0x6f, 0x75, - 0x72, 0x63, 0x65, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x1c, 0x0a, - 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xd6, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, - 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x48, 0x00, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4f, 0x0a, 0x0e, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x5f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, - 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x6c, 0x61, 0x62, 0x65, - 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x1a, 0x96, 0x01, 0x0a, 0x0d, 0x4c, 0x61, - 0x62, 0x65, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x06, 0x6c, - 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x63, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x53, 0x65, 0x6c, 0x65, 0x63, - 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x1a, 0x1f, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x93, + 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x39, 0x0a, 0x0a, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, + 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x63, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x34, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1c, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x06, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, + 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xab, 0x01, 0x0a, 0x0f, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, + 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x39, 0x0a, 0x0b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x2a, 0xdd, - 0x03, 0x0a, 0x12, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, - 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2a, 0x0a, 0x26, 0x50, - 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x4e, 0x43, - 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x32, 0x0a, 0x2e, 0x50, 0x4f, 0x4c, 0x49, 0x43, - 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x53, 0x59, 0x4e, 0x4f, 0x4e, 0x59, 0x4d, 0x10, 0x02, 0x12, 0x32, 0x0a, 0x2e, 0x50, - 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x45, 0x4e, 0x43, - 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x12, - 0x30, 0x0a, 0x2c, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, - 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, - 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x10, - 0x04, 0x12, 0x31, 0x0a, 0x2d, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, - 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, - 0x54, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4d, 0x41, 0x50, 0x50, 0x49, - 0x4e, 0x47, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, - 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x45, 0x59, - 0x5f, 0x41, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x06, 0x12, 0x2d, 0x0a, 0x29, 0x50, 0x4f, 0x4c, - 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, - 0x45, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x44, 0x45, 0x46, 0x49, - 0x4e, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x4f, 0x4c, 0x49, - 0x43, 0x59, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, - 0x5f, 0x41, 0x54, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, - 0x10, 0x08, 0x12, 0x2a, 0x0a, 0x26, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x5f, 0x52, 0x45, 0x53, - 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x41, - 0x43, 0x43, 0x45, 0x53, 0x53, 0x5f, 0x47, 0x52, 0x41, 0x4e, 0x54, 0x53, 0x10, 0x09, 0x42, 0x7f, - 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x42, 0x0b, 0x43, 0x6f, - 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, - 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, 0x76, 0x32, 0x2d, 0x70, 0x6f, 0x63, 0x2f, 0x73, - 0x64, 0x6b, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x43, 0x58, 0x58, 0xaa, - 0x02, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0xca, 0x02, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0xe2, 0x02, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x38, 0x01, 0x42, 0x7f, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x42, 0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, + 0x74, 0x64, 0x66, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, 0x76, 0x32, 0x2d, 0x70, + 0x6f, 0x63, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0xa2, 0x02, 0x03, + 0x43, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0xca, 0x02, 0x06, 0x43, + 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0xe2, 0x02, 0x12, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x06, 0x43, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -580,29 +212,24 @@ func file_common_common_proto_rawDescGZIP() []byte { return file_common_common_proto_rawDescData } -var file_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_common_common_proto_goTypes = []interface{}{ - (PolicyResourceType)(0), // 0: common.PolicyResourceType - (*ResourceDescriptor)(nil), // 1: common.ResourceDescriptor - (*ResourceDependency)(nil), // 2: common.ResourceDependency - (*ResourceSelector)(nil), // 3: common.ResourceSelector - nil, // 4: common.ResourceDescriptor.LabelsEntry - (*ResourceSelector_LabelSelector)(nil), // 5: common.ResourceSelector.LabelSelector - nil, // 6: common.ResourceSelector.LabelSelector.LabelsEntry + (*Metadata)(nil), // 0: common.Metadata + (*MetadataMutable)(nil), // 1: common.MetadataMutable + nil, // 2: common.Metadata.LabelsEntry + nil, // 3: common.MetadataMutable.LabelsEntry + (*timestamppb.Timestamp)(nil), // 4: google.protobuf.Timestamp } var file_common_common_proto_depIdxs = []int32{ - 0, // 0: common.ResourceDescriptor.type:type_name -> common.PolicyResourceType - 4, // 1: common.ResourceDescriptor.labels:type_name -> common.ResourceDescriptor.LabelsEntry - 2, // 2: common.ResourceDescriptor.dependencies:type_name -> common.ResourceDependency - 0, // 3: common.ResourceDependency.type:type_name -> common.PolicyResourceType - 5, // 4: common.ResourceSelector.label_selector:type_name -> common.ResourceSelector.LabelSelector - 6, // 5: common.ResourceSelector.LabelSelector.labels:type_name -> common.ResourceSelector.LabelSelector.LabelsEntry - 6, // [6:6] is the sub-list for method output_type - 6, // [6:6] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 4, // 0: common.Metadata.created_at:type_name -> google.protobuf.Timestamp + 4, // 1: common.Metadata.updated_at:type_name -> google.protobuf.Timestamp + 2, // 2: common.Metadata.labels:type_name -> common.Metadata.LabelsEntry + 3, // 3: common.MetadataMutable.labels:type_name -> common.MetadataMutable.LabelsEntry + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_common_common_proto_init() } @@ -612,7 +239,7 @@ func file_common_common_proto_init() { } if !protoimpl.UnsafeEnabled { file_common_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceDescriptor); i { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: @@ -624,7 +251,7 @@ func file_common_common_proto_init() { } } file_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceDependency); i { + switch v := v.(*MetadataMutable); i { case 0: return &v.state case 1: @@ -635,48 +262,19 @@ func file_common_common_proto_init() { return nil } } - file_common_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_common_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResourceSelector_LabelSelector); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_common_common_proto_msgTypes[2].OneofWrappers = []interface{}{ - (*ResourceSelector_Name)(nil), - (*ResourceSelector_LabelSelector_)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_common_common_proto_rawDesc, - NumEnums: 1, - NumMessages: 6, + NumEnums: 0, + NumMessages: 4, NumExtensions: 0, NumServices: 0, }, GoTypes: file_common_common_proto_goTypes, DependencyIndexes: file_common_common_proto_depIdxs, - EnumInfos: file_common_common_proto_enumTypes, MessageInfos: file_common_common_proto_msgTypes, }.Build() File_common_common_proto = out.File diff --git a/sdk/kasregistry/key_access_server_registry.pb.go b/sdk/kasregistry/key_access_server_registry.pb.go new file mode 100644 index 0000000000..f6990e310b --- /dev/null +++ b/sdk/kasregistry/key_access_server_registry.pb.go @@ -0,0 +1,1143 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: kasregistry/key_access_server_registry.proto + +package kasregistry + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + common "github.com/opentdf/opentdf-v2-poc/sdk/common" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// Descriptor for a KAS +type KeyAccessServer struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Metadata *common.Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Address of a KAS instance + Uri string `protobuf:"bytes,3,opt,name=uri,proto3" json:"uri,omitempty"` + PublicKey *PublicKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (x *KeyAccessServer) Reset() { + *x = KeyAccessServer{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyAccessServer) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyAccessServer) ProtoMessage() {} + +func (x *KeyAccessServer) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyAccessServer.ProtoReflect.Descriptor instead. +func (*KeyAccessServer) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{0} +} + +func (x *KeyAccessServer) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *KeyAccessServer) GetMetadata() *common.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *KeyAccessServer) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *KeyAccessServer) GetPublicKey() *PublicKey { + if x != nil { + return x.PublicKey + } + return nil +} + +type KeyAccessServerCreateUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Optional metadata for the attribute definition + Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Address of a KAS instance + Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"` + PublicKey *PublicKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` +} + +func (x *KeyAccessServerCreateUpdate) Reset() { + *x = KeyAccessServerCreateUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *KeyAccessServerCreateUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*KeyAccessServerCreateUpdate) ProtoMessage() {} + +func (x *KeyAccessServerCreateUpdate) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use KeyAccessServerCreateUpdate.ProtoReflect.Descriptor instead. +func (*KeyAccessServerCreateUpdate) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{1} +} + +func (x *KeyAccessServerCreateUpdate) GetMetadata() *common.MetadataMutable { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *KeyAccessServerCreateUpdate) GetUri() string { + if x != nil { + return x.Uri + } + return "" +} + +func (x *KeyAccessServerCreateUpdate) GetPublicKey() *PublicKey { + if x != nil { + return x.PublicKey + } + return nil +} + +type PublicKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Types that are assignable to PublicKey: + // + // *PublicKey_Remote + // *PublicKey_Local + PublicKey isPublicKey_PublicKey `protobuf_oneof:"public_key"` +} + +func (x *PublicKey) Reset() { + *x = PublicKey{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PublicKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PublicKey) ProtoMessage() {} + +func (x *PublicKey) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PublicKey.ProtoReflect.Descriptor instead. +func (*PublicKey) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{2} +} + +func (m *PublicKey) GetPublicKey() isPublicKey_PublicKey { + if m != nil { + return m.PublicKey + } + return nil +} + +func (x *PublicKey) GetRemote() string { + if x, ok := x.GetPublicKey().(*PublicKey_Remote); ok { + return x.Remote + } + return "" +} + +func (x *PublicKey) GetLocal() string { + if x, ok := x.GetPublicKey().(*PublicKey_Local); ok { + return x.Local + } + return "" +} + +type isPublicKey_PublicKey interface { + isPublicKey_PublicKey() +} + +type PublicKey_Remote struct { + // kas public key url - optional since can also be retrieved via public key + Remote string `protobuf:"bytes,1,opt,name=remote,proto3,oneof"` +} + +type PublicKey_Local struct { + // public key - optional since can also be retrieved via url + Local string `protobuf:"bytes,2,opt,name=local,proto3,oneof"` +} + +func (*PublicKey_Remote) isPublicKey_PublicKey() {} + +func (*PublicKey_Local) isPublicKey_PublicKey() {} + +type GetKeyAccessServerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetKeyAccessServerRequest) Reset() { + *x = GetKeyAccessServerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetKeyAccessServerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetKeyAccessServerRequest) ProtoMessage() {} + +func (x *GetKeyAccessServerRequest) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetKeyAccessServerRequest.ProtoReflect.Descriptor instead. +func (*GetKeyAccessServerRequest) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{3} +} + +func (x *GetKeyAccessServerRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetKeyAccessServerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyAccessServer *KeyAccessServer `protobuf:"bytes,1,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"` +} + +func (x *GetKeyAccessServerResponse) Reset() { + *x = GetKeyAccessServerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetKeyAccessServerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetKeyAccessServerResponse) ProtoMessage() {} + +func (x *GetKeyAccessServerResponse) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetKeyAccessServerResponse.ProtoReflect.Descriptor instead. +func (*GetKeyAccessServerResponse) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{4} +} + +func (x *GetKeyAccessServerResponse) GetKeyAccessServer() *KeyAccessServer { + if x != nil { + return x.KeyAccessServer + } + return nil +} + +type ListKeyAccessServersRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListKeyAccessServersRequest) Reset() { + *x = ListKeyAccessServersRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListKeyAccessServersRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeyAccessServersRequest) ProtoMessage() {} + +func (x *ListKeyAccessServersRequest) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeyAccessServersRequest.ProtoReflect.Descriptor instead. +func (*ListKeyAccessServersRequest) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{5} +} + +type ListKeyAccessServersResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyAccessServers []*KeyAccessServer `protobuf:"bytes,1,rep,name=key_access_servers,json=keyAccessServers,proto3" json:"key_access_servers,omitempty"` +} + +func (x *ListKeyAccessServersResponse) Reset() { + *x = ListKeyAccessServersResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListKeyAccessServersResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListKeyAccessServersResponse) ProtoMessage() {} + +func (x *ListKeyAccessServersResponse) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListKeyAccessServersResponse.ProtoReflect.Descriptor instead. +func (*ListKeyAccessServersResponse) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{6} +} + +func (x *ListKeyAccessServersResponse) GetKeyAccessServers() []*KeyAccessServer { + if x != nil { + return x.KeyAccessServers + } + return nil +} + +type CreateKeyAccessServerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyAccessServer *KeyAccessServerCreateUpdate `protobuf:"bytes,1,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"` +} + +func (x *CreateKeyAccessServerRequest) Reset() { + *x = CreateKeyAccessServerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateKeyAccessServerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateKeyAccessServerRequest) ProtoMessage() {} + +func (x *CreateKeyAccessServerRequest) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateKeyAccessServerRequest.ProtoReflect.Descriptor instead. +func (*CreateKeyAccessServerRequest) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateKeyAccessServerRequest) GetKeyAccessServer() *KeyAccessServerCreateUpdate { + if x != nil { + return x.KeyAccessServer + } + return nil +} + +type CreateKeyAccessServerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyAccessServer *KeyAccessServer `protobuf:"bytes,1,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"` +} + +func (x *CreateKeyAccessServerResponse) Reset() { + *x = CreateKeyAccessServerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateKeyAccessServerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateKeyAccessServerResponse) ProtoMessage() {} + +func (x *CreateKeyAccessServerResponse) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateKeyAccessServerResponse.ProtoReflect.Descriptor instead. +func (*CreateKeyAccessServerResponse) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{8} +} + +func (x *CreateKeyAccessServerResponse) GetKeyAccessServer() *KeyAccessServer { + if x != nil { + return x.KeyAccessServer + } + return nil +} + +type UpdateKeyAccessServerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + KeyAccessServer *KeyAccessServerCreateUpdate `protobuf:"bytes,2,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"` +} + +func (x *UpdateKeyAccessServerRequest) Reset() { + *x = UpdateKeyAccessServerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateKeyAccessServerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateKeyAccessServerRequest) ProtoMessage() {} + +func (x *UpdateKeyAccessServerRequest) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateKeyAccessServerRequest.ProtoReflect.Descriptor instead. +func (*UpdateKeyAccessServerRequest) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateKeyAccessServerRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateKeyAccessServerRequest) GetKeyAccessServer() *KeyAccessServerCreateUpdate { + if x != nil { + return x.KeyAccessServer + } + return nil +} + +type UpdateKeyAccessServerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyAccessServer *KeyAccessServer `protobuf:"bytes,1,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"` +} + +func (x *UpdateKeyAccessServerResponse) Reset() { + *x = UpdateKeyAccessServerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateKeyAccessServerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateKeyAccessServerResponse) ProtoMessage() {} + +func (x *UpdateKeyAccessServerResponse) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateKeyAccessServerResponse.ProtoReflect.Descriptor instead. +func (*UpdateKeyAccessServerResponse) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{10} +} + +func (x *UpdateKeyAccessServerResponse) GetKeyAccessServer() *KeyAccessServer { + if x != nil { + return x.KeyAccessServer + } + return nil +} + +type DeleteKeyAccessServerRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteKeyAccessServerRequest) Reset() { + *x = DeleteKeyAccessServerRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteKeyAccessServerRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteKeyAccessServerRequest) ProtoMessage() {} + +func (x *DeleteKeyAccessServerRequest) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteKeyAccessServerRequest.ProtoReflect.Descriptor instead. +func (*DeleteKeyAccessServerRequest) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{11} +} + +func (x *DeleteKeyAccessServerRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteKeyAccessServerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + KeyAccessServer *KeyAccessServer `protobuf:"bytes,1,opt,name=key_access_server,json=keyAccessServer,proto3" json:"key_access_server,omitempty"` +} + +func (x *DeleteKeyAccessServerResponse) Reset() { + *x = DeleteKeyAccessServerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteKeyAccessServerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteKeyAccessServerResponse) ProtoMessage() {} + +func (x *DeleteKeyAccessServerResponse) ProtoReflect() protoreflect.Message { + mi := &file_kasregistry_key_access_server_registry_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteKeyAccessServerResponse.ProtoReflect.Descriptor instead. +func (*DeleteKeyAccessServerResponse) Descriptor() ([]byte, []int) { + return file_kasregistry_key_access_server_registry_proto_rawDescGZIP(), []int{12} +} + +func (x *DeleteKeyAccessServerResponse) GetKeyAccessServer() *KeyAccessServer { + if x != nil { + return x.KeyAccessServer + } + return nil +} + +var File_kasregistry_key_access_server_registry_proto protoreflect.FileDescriptor + +var file_kasregistry_key_access_server_registry_proto_rawDesc = []byte{ + 0x0a, 0x2c, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x6b, 0x65, + 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, + 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x1a, 0x1b, 0x62, 0x75, 0x66, + 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x98, 0x01, 0x0a, 0x0f, + 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, + 0x35, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x22, 0xab, 0x01, 0x0a, 0x1b, 0x4b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, 0x62, 0x6c, + 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x03, 0x75, + 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x3d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6b, 0x61, 0x73, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x22, 0xc0, 0x03, 0x0a, 0x09, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, + 0x65, 0x79, 0x12, 0x8c, 0x03, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0xf1, 0x02, 0xba, 0x48, 0xed, 0x02, 0xba, 0x01, 0xe9, 0x02, 0x0a, 0x0a, + 0x66, 0x71, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0xd7, 0x01, 0x46, 0x51, 0x4e, + 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, + 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x28, 0x65, 0x2e, + 0x67, 0x2e, 0x2c, 0x20, 0x27, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x6d, + 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x27, 0x29, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, + 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, + 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x73, + 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, + 0x6e, 0x20, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x63, + 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x68, 0x79, 0x70, 0x68, 0x65, 0x6e, 0x73, 0x2c, 0x20, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x63, 0x68, 0x61, 0x72, + 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6c, 0x61, 0x73, + 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x80, 0x01, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x5b, 0x61, + 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, + 0x5a, 0x30, 0x2d, 0x39, 0x5c, 0x5c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, + 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x28, 0x5c, 0x5c, 0x2e, 0x5b, + 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, + 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5c, 0x5c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x36, 0x31, 0x7d, 0x5b, + 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x29, 0x2a, 0x28, 0x2f, + 0x2e, 0x2a, 0x29, 0x3f, 0x24, 0x27, 0x29, 0x48, 0x00, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, + 0x65, 0x12, 0x16, 0x0a, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x48, 0x00, 0x52, 0x05, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x42, 0x0c, 0x0a, 0x0a, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x22, 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4b, 0x65, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x66, 0x0a, 0x1a, + 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x11, 0x6b, 0x65, + 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x22, 0x6a, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x12, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x1c, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4b, 0x65, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x10, 0x6b, + 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x22, + 0x7c, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x5c, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6b, 0x61, 0x73, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0f, 0x6b, 0x65, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x69, 0x0a, + 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, + 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x61, 0x73, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x94, 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x5c, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x6b, + 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0f, + 0x6b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, + 0x69, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x48, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6b, 0x61, + 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x0f, 0x6b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x1c, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x69, 0x0a, 0x1d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, + 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4b, 0x65, 0x79, + 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x0f, 0x6b, 0x65, + 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x32, 0x8f, 0x06, + 0x0a, 0x1e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x88, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x28, 0x2e, 0x6b, 0x61, 0x73, 0x72, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x6b, 0x65, 0x79, 0x2d, 0x61, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0x87, 0x01, 0x0a, 0x12, + 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x12, 0x26, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6b, 0x61, 0x73, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x6b, 0x65, + 0x79, 0x2d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9e, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, + 0x29, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6b, 0x61, 0x73, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, + 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x28, 0x3a, 0x11, + 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x22, 0x13, 0x2f, 0x6b, 0x65, 0x79, 0x2d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2d, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x12, 0xa3, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x12, 0x29, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6b, 0x61, + 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, + 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x1a, 0x18, 0x2f, 0x6b, 0x65, 0x79, 0x2d, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2d, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x90, 0x01, 0x0a, + 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x29, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x72, 0x79, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x2a, 0x18, 0x2f, 0x6b, 0x65, 0x79, 0x2d, 0x61, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x2d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, + 0xae, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x72, 0x79, 0x42, 0x1c, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, + 0x76, 0x32, 0x2d, 0x70, 0x6f, 0x63, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x6b, 0x61, 0x73, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xa2, 0x02, 0x03, 0x4b, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4b, + 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xca, 0x02, 0x0b, 0x4b, 0x61, 0x73, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0xe2, 0x02, 0x17, 0x4b, 0x61, 0x73, 0x72, 0x65, + 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0b, 0x4b, 0x61, 0x73, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_kasregistry_key_access_server_registry_proto_rawDescOnce sync.Once + file_kasregistry_key_access_server_registry_proto_rawDescData = file_kasregistry_key_access_server_registry_proto_rawDesc +) + +func file_kasregistry_key_access_server_registry_proto_rawDescGZIP() []byte { + file_kasregistry_key_access_server_registry_proto_rawDescOnce.Do(func() { + file_kasregistry_key_access_server_registry_proto_rawDescData = protoimpl.X.CompressGZIP(file_kasregistry_key_access_server_registry_proto_rawDescData) + }) + return file_kasregistry_key_access_server_registry_proto_rawDescData +} + +var file_kasregistry_key_access_server_registry_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_kasregistry_key_access_server_registry_proto_goTypes = []interface{}{ + (*KeyAccessServer)(nil), // 0: kasregistry.KeyAccessServer + (*KeyAccessServerCreateUpdate)(nil), // 1: kasregistry.KeyAccessServerCreateUpdate + (*PublicKey)(nil), // 2: kasregistry.PublicKey + (*GetKeyAccessServerRequest)(nil), // 3: kasregistry.GetKeyAccessServerRequest + (*GetKeyAccessServerResponse)(nil), // 4: kasregistry.GetKeyAccessServerResponse + (*ListKeyAccessServersRequest)(nil), // 5: kasregistry.ListKeyAccessServersRequest + (*ListKeyAccessServersResponse)(nil), // 6: kasregistry.ListKeyAccessServersResponse + (*CreateKeyAccessServerRequest)(nil), // 7: kasregistry.CreateKeyAccessServerRequest + (*CreateKeyAccessServerResponse)(nil), // 8: kasregistry.CreateKeyAccessServerResponse + (*UpdateKeyAccessServerRequest)(nil), // 9: kasregistry.UpdateKeyAccessServerRequest + (*UpdateKeyAccessServerResponse)(nil), // 10: kasregistry.UpdateKeyAccessServerResponse + (*DeleteKeyAccessServerRequest)(nil), // 11: kasregistry.DeleteKeyAccessServerRequest + (*DeleteKeyAccessServerResponse)(nil), // 12: kasregistry.DeleteKeyAccessServerResponse + (*common.Metadata)(nil), // 13: common.Metadata + (*common.MetadataMutable)(nil), // 14: common.MetadataMutable +} +var file_kasregistry_key_access_server_registry_proto_depIdxs = []int32{ + 13, // 0: kasregistry.KeyAccessServer.metadata:type_name -> common.Metadata + 2, // 1: kasregistry.KeyAccessServer.public_key:type_name -> kasregistry.PublicKey + 14, // 2: kasregistry.KeyAccessServerCreateUpdate.metadata:type_name -> common.MetadataMutable + 2, // 3: kasregistry.KeyAccessServerCreateUpdate.public_key:type_name -> kasregistry.PublicKey + 0, // 4: kasregistry.GetKeyAccessServerResponse.key_access_server:type_name -> kasregistry.KeyAccessServer + 0, // 5: kasregistry.ListKeyAccessServersResponse.key_access_servers:type_name -> kasregistry.KeyAccessServer + 1, // 6: kasregistry.CreateKeyAccessServerRequest.key_access_server:type_name -> kasregistry.KeyAccessServerCreateUpdate + 0, // 7: kasregistry.CreateKeyAccessServerResponse.key_access_server:type_name -> kasregistry.KeyAccessServer + 1, // 8: kasregistry.UpdateKeyAccessServerRequest.key_access_server:type_name -> kasregistry.KeyAccessServerCreateUpdate + 0, // 9: kasregistry.UpdateKeyAccessServerResponse.key_access_server:type_name -> kasregistry.KeyAccessServer + 0, // 10: kasregistry.DeleteKeyAccessServerResponse.key_access_server:type_name -> kasregistry.KeyAccessServer + 5, // 11: kasregistry.KeyAccessServerRegistryService.ListKeyAccessServers:input_type -> kasregistry.ListKeyAccessServersRequest + 3, // 12: kasregistry.KeyAccessServerRegistryService.GetKeyAccessServer:input_type -> kasregistry.GetKeyAccessServerRequest + 7, // 13: kasregistry.KeyAccessServerRegistryService.CreateKeyAccessServer:input_type -> kasregistry.CreateKeyAccessServerRequest + 9, // 14: kasregistry.KeyAccessServerRegistryService.UpdateKeyAccessServer:input_type -> kasregistry.UpdateKeyAccessServerRequest + 11, // 15: kasregistry.KeyAccessServerRegistryService.DeleteKeyAccessServer:input_type -> kasregistry.DeleteKeyAccessServerRequest + 6, // 16: kasregistry.KeyAccessServerRegistryService.ListKeyAccessServers:output_type -> kasregistry.ListKeyAccessServersResponse + 4, // 17: kasregistry.KeyAccessServerRegistryService.GetKeyAccessServer:output_type -> kasregistry.GetKeyAccessServerResponse + 8, // 18: kasregistry.KeyAccessServerRegistryService.CreateKeyAccessServer:output_type -> kasregistry.CreateKeyAccessServerResponse + 10, // 19: kasregistry.KeyAccessServerRegistryService.UpdateKeyAccessServer:output_type -> kasregistry.UpdateKeyAccessServerResponse + 12, // 20: kasregistry.KeyAccessServerRegistryService.DeleteKeyAccessServer:output_type -> kasregistry.DeleteKeyAccessServerResponse + 16, // [16:21] is the sub-list for method output_type + 11, // [11:16] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name +} + +func init() { file_kasregistry_key_access_server_registry_proto_init() } +func file_kasregistry_key_access_server_registry_proto_init() { + if File_kasregistry_key_access_server_registry_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_kasregistry_key_access_server_registry_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyAccessServer); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyAccessServerCreateUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PublicKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetKeyAccessServerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetKeyAccessServerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListKeyAccessServersRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListKeyAccessServersResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateKeyAccessServerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateKeyAccessServerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateKeyAccessServerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateKeyAccessServerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteKeyAccessServerRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteKeyAccessServerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_kasregistry_key_access_server_registry_proto_msgTypes[2].OneofWrappers = []interface{}{ + (*PublicKey_Remote)(nil), + (*PublicKey_Local)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_kasregistry_key_access_server_registry_proto_rawDesc, + NumEnums: 0, + NumMessages: 13, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_kasregistry_key_access_server_registry_proto_goTypes, + DependencyIndexes: file_kasregistry_key_access_server_registry_proto_depIdxs, + MessageInfos: file_kasregistry_key_access_server_registry_proto_msgTypes, + }.Build() + File_kasregistry_key_access_server_registry_proto = out.File + file_kasregistry_key_access_server_registry_proto_rawDesc = nil + file_kasregistry_key_access_server_registry_proto_goTypes = nil + file_kasregistry_key_access_server_registry_proto_depIdxs = nil +} diff --git a/sdk/kasregistry/key_access_server_registry.pb.gw.go b/sdk/kasregistry/key_access_server_registry.pb.gw.go new file mode 100644 index 0000000000..b28138646b --- /dev/null +++ b/sdk/kasregistry/key_access_server_registry.pb.gw.go @@ -0,0 +1,565 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: kasregistry/key_access_server_registry.proto + +/* +Package kasregistry is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package kasregistry + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_KeyAccessServerRegistryService_ListKeyAccessServers_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessServerRegistryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListKeyAccessServersRequest + var metadata runtime.ServerMetadata + + msg, err := client.ListKeyAccessServers(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KeyAccessServerRegistryService_ListKeyAccessServers_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessServerRegistryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListKeyAccessServersRequest + var metadata runtime.ServerMetadata + + msg, err := server.ListKeyAccessServers(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KeyAccessServerRegistryService_GetKeyAccessServer_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessServerRegistryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKeyAccessServerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetKeyAccessServer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KeyAccessServerRegistryService_GetKeyAccessServer_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessServerRegistryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetKeyAccessServerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetKeyAccessServer(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KeyAccessServerRegistryService_CreateKeyAccessServer_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessServerRegistryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateKeyAccessServerRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.KeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateKeyAccessServer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KeyAccessServerRegistryService_CreateKeyAccessServer_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessServerRegistryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateKeyAccessServerRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.KeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateKeyAccessServer(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KeyAccessServerRegistryService_UpdateKeyAccessServer_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessServerRegistryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKeyAccessServerRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.KeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.UpdateKeyAccessServer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KeyAccessServerRegistryService_UpdateKeyAccessServer_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessServerRegistryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateKeyAccessServerRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.KeyAccessServer); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.UpdateKeyAccessServer(ctx, &protoReq) + return msg, metadata, err + +} + +func request_KeyAccessServerRegistryService_DeleteKeyAccessServer_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessServerRegistryServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteKeyAccessServerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.DeleteKeyAccessServer(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_KeyAccessServerRegistryService_DeleteKeyAccessServer_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessServerRegistryServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteKeyAccessServerRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteKeyAccessServer(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterKeyAccessServerRegistryServiceHandlerServer registers the http handlers for service KeyAccessServerRegistryService to "mux". +// UnaryRPC :call KeyAccessServerRegistryServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterKeyAccessServerRegistryServiceHandlerFromEndpoint instead. +func RegisterKeyAccessServerRegistryServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KeyAccessServerRegistryServiceServer) error { + + mux.Handle("GET", pattern_KeyAccessServerRegistryService_ListKeyAccessServers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/ListKeyAccessServers", runtime.WithHTTPPathPattern("/key-access-servers")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KeyAccessServerRegistryService_ListKeyAccessServers_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_ListKeyAccessServers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KeyAccessServerRegistryService_GetKeyAccessServer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/GetKeyAccessServer", runtime.WithHTTPPathPattern("/key-access-servers/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KeyAccessServerRegistryService_GetKeyAccessServer_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_GetKeyAccessServer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KeyAccessServerRegistryService_CreateKeyAccessServer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/CreateKeyAccessServer", runtime.WithHTTPPathPattern("/key-access-servers")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KeyAccessServerRegistryService_CreateKeyAccessServer_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_CreateKeyAccessServer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_KeyAccessServerRegistryService_UpdateKeyAccessServer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/UpdateKeyAccessServer", runtime.WithHTTPPathPattern("/key-access-servers/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KeyAccessServerRegistryService_UpdateKeyAccessServer_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_UpdateKeyAccessServer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_KeyAccessServerRegistryService_DeleteKeyAccessServer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/DeleteKeyAccessServer", runtime.WithHTTPPathPattern("/key-access-servers/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_KeyAccessServerRegistryService_DeleteKeyAccessServer_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_DeleteKeyAccessServer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterKeyAccessServerRegistryServiceHandlerFromEndpoint is same as RegisterKeyAccessServerRegistryServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterKeyAccessServerRegistryServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterKeyAccessServerRegistryServiceHandler(ctx, mux, conn) +} + +// RegisterKeyAccessServerRegistryServiceHandler registers the http handlers for service KeyAccessServerRegistryService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterKeyAccessServerRegistryServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterKeyAccessServerRegistryServiceHandlerClient(ctx, mux, NewKeyAccessServerRegistryServiceClient(conn)) +} + +// RegisterKeyAccessServerRegistryServiceHandlerClient registers the http handlers for service KeyAccessServerRegistryService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KeyAccessServerRegistryServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KeyAccessServerRegistryServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "KeyAccessServerRegistryServiceClient" to call the correct interceptors. +func RegisterKeyAccessServerRegistryServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KeyAccessServerRegistryServiceClient) error { + + mux.Handle("GET", pattern_KeyAccessServerRegistryService_ListKeyAccessServers_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/ListKeyAccessServers", runtime.WithHTTPPathPattern("/key-access-servers")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KeyAccessServerRegistryService_ListKeyAccessServers_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_ListKeyAccessServers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_KeyAccessServerRegistryService_GetKeyAccessServer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/GetKeyAccessServer", runtime.WithHTTPPathPattern("/key-access-servers/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KeyAccessServerRegistryService_GetKeyAccessServer_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_GetKeyAccessServer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_KeyAccessServerRegistryService_CreateKeyAccessServer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/CreateKeyAccessServer", runtime.WithHTTPPathPattern("/key-access-servers")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KeyAccessServerRegistryService_CreateKeyAccessServer_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_CreateKeyAccessServer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_KeyAccessServerRegistryService_UpdateKeyAccessServer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/UpdateKeyAccessServer", runtime.WithHTTPPathPattern("/key-access-servers/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KeyAccessServerRegistryService_UpdateKeyAccessServer_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_UpdateKeyAccessServer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_KeyAccessServerRegistryService_DeleteKeyAccessServer_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/kasregistry.KeyAccessServerRegistryService/DeleteKeyAccessServer", runtime.WithHTTPPathPattern("/key-access-servers/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_KeyAccessServerRegistryService_DeleteKeyAccessServer_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_KeyAccessServerRegistryService_DeleteKeyAccessServer_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_KeyAccessServerRegistryService_ListKeyAccessServers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"key-access-servers"}, "")) + + pattern_KeyAccessServerRegistryService_GetKeyAccessServer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"key-access-servers", "id"}, "")) + + pattern_KeyAccessServerRegistryService_CreateKeyAccessServer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"key-access-servers"}, "")) + + pattern_KeyAccessServerRegistryService_UpdateKeyAccessServer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"key-access-servers", "id"}, "")) + + pattern_KeyAccessServerRegistryService_DeleteKeyAccessServer_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"key-access-servers", "id"}, "")) +) + +var ( + forward_KeyAccessServerRegistryService_ListKeyAccessServers_0 = runtime.ForwardResponseMessage + + forward_KeyAccessServerRegistryService_GetKeyAccessServer_0 = runtime.ForwardResponseMessage + + forward_KeyAccessServerRegistryService_CreateKeyAccessServer_0 = runtime.ForwardResponseMessage + + forward_KeyAccessServerRegistryService_UpdateKeyAccessServer_0 = runtime.ForwardResponseMessage + + forward_KeyAccessServerRegistryService_DeleteKeyAccessServer_0 = runtime.ForwardResponseMessage +) diff --git a/sdk/kasregistry/key_access_server_registry_grpc.pb.go b/sdk/kasregistry/key_access_server_registry_grpc.pb.go new file mode 100644 index 0000000000..db2e6ab814 --- /dev/null +++ b/sdk/kasregistry/key_access_server_registry_grpc.pb.go @@ -0,0 +1,588 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: kasregistry/key_access_server_registry.proto + +package kasregistry + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + KeyAccessServerRegistryService_ListKeyAccessServers_FullMethodName = "/kasregistry.KeyAccessServerRegistryService/ListKeyAccessServers" + KeyAccessServerRegistryService_GetKeyAccessServer_FullMethodName = "/kasregistry.KeyAccessServerRegistryService/GetKeyAccessServer" + KeyAccessServerRegistryService_CreateKeyAccessServer_FullMethodName = "/kasregistry.KeyAccessServerRegistryService/CreateKeyAccessServer" + KeyAccessServerRegistryService_UpdateKeyAccessServer_FullMethodName = "/kasregistry.KeyAccessServerRegistryService/UpdateKeyAccessServer" + KeyAccessServerRegistryService_DeleteKeyAccessServer_FullMethodName = "/kasregistry.KeyAccessServerRegistryService/DeleteKeyAccessServer" +) + +// KeyAccessServerRegistryServiceClient is the client API for KeyAccessServerRegistryService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type KeyAccessServerRegistryServiceClient interface { + // Request Examples: + // {} + // + // Response Examples: + // { + // "key_access_servers": [ + // { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // }, + // { + // "id": "cad1fc87-1193-456b-a217-d5cdae1fa67a", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971990", + // "nanos": 303386000 + // }, + // "updated_at": { + // "seconds": "1705971990", + // "nanos": 303386000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas3", + // "public_key": { + // "local": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ6ekNDQVhXZ0F3SUJBZ0lVT1J1VjNhdlU5QUU2enNCNlp4eWxsSHBpNWQ0d0NnWUlLb1pJemowRUF3SXcKUFRFTE1Ba0dBMVVFQmhNQ2RYTXhDekFKQmdOVkJBZ01BbU4wTVNFd0h3WURWUVFLREJoSmJuUmxjbTVsZENCWAphV1JuYVhSeklGQjBlU0JNZEdRd0hoY05NalF3TVRBeU1UWTFOalUyV2hjTk1qVXdNVEF4TVRZMU5qVTJXakE5Ck1Rc3dDUVlEVlFRR0V3SjFjekVMTUFrR0ExVUVDQXdDWTNReElUQWZCZ05WQkFvTUdFbHVkR1Z5Ym1WMElGZHAKWkdkcGRITWdVSFI1SUV4MFpEQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJMVjlmQ0pIRC9rYwpyWHJVSFF3QVp4ME1jMGRQdkxqc0ovb2pFdE1NbjBST2RlT3g4eWd4Z2NRVEZGQXh5Q3RCdWFkaEFkbS9pVkh0CjhnMkVNejVkTzNXalV6QlJNQjBHQTFVZERnUVdCQlFZTmt1aytKSXVSV3luK2JFOHNCaFJ3MjdPVlRBZkJnTlYKSFNNRUdEQVdnQlFZTmt1aytKSXVSV3luK2JFOHNCaFJ3MjdPVlRBUEJnTlZIUk1CQWY4RUJUQURBUUgvTUFvRwpDQ3FHU000OUJBTUNBMGdBTUVVQ0lRQ0FCMmppWWU4QVk2TUo0QURQU1FHRTQ3K2Eza1dGTGNHc0pob1pieHRnClV3SWdjZklJdVBmaDRmYmN2OGNUaTJCbEkzazdzV1B1QW1JRlZyaUkyZDNVeDVRPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" + // } + // } + // ] + // } + ListKeyAccessServers(ctx context.Context, in *ListKeyAccessServersRequest, opts ...grpc.CallOption) (*ListKeyAccessServersResponse, error) + // Request Examples: + // { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732" + // } + // + // Response Examples: + // { + // "key_access_server": { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + GetKeyAccessServer(ctx context.Context, in *GetKeyAccessServerRequest, opts ...grpc.CallOption) (*GetKeyAccessServerResponse, error) + // Request Examples: + // { + // "key_access_server": { + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + // + // Response Examples: + // { + // "key_access_server": { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + CreateKeyAccessServer(ctx context.Context, in *CreateKeyAccessServerRequest, opts ...grpc.CallOption) (*CreateKeyAccessServerResponse, error) + // Request Examples: + // { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "key_access_server": { + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + // + // Response Examples: + // { + // "key_access_server": { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + UpdateKeyAccessServer(ctx context.Context, in *UpdateKeyAccessServerRequest, opts ...grpc.CallOption) (*UpdateKeyAccessServerResponse, error) + // Request Examples: + // { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732" + // } + // + // Response Examples: + // { + // "key_access_server": { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + DeleteKeyAccessServer(ctx context.Context, in *DeleteKeyAccessServerRequest, opts ...grpc.CallOption) (*DeleteKeyAccessServerResponse, error) +} + +type keyAccessServerRegistryServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewKeyAccessServerRegistryServiceClient(cc grpc.ClientConnInterface) KeyAccessServerRegistryServiceClient { + return &keyAccessServerRegistryServiceClient{cc} +} + +func (c *keyAccessServerRegistryServiceClient) ListKeyAccessServers(ctx context.Context, in *ListKeyAccessServersRequest, opts ...grpc.CallOption) (*ListKeyAccessServersResponse, error) { + out := new(ListKeyAccessServersResponse) + err := c.cc.Invoke(ctx, KeyAccessServerRegistryService_ListKeyAccessServers_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyAccessServerRegistryServiceClient) GetKeyAccessServer(ctx context.Context, in *GetKeyAccessServerRequest, opts ...grpc.CallOption) (*GetKeyAccessServerResponse, error) { + out := new(GetKeyAccessServerResponse) + err := c.cc.Invoke(ctx, KeyAccessServerRegistryService_GetKeyAccessServer_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyAccessServerRegistryServiceClient) CreateKeyAccessServer(ctx context.Context, in *CreateKeyAccessServerRequest, opts ...grpc.CallOption) (*CreateKeyAccessServerResponse, error) { + out := new(CreateKeyAccessServerResponse) + err := c.cc.Invoke(ctx, KeyAccessServerRegistryService_CreateKeyAccessServer_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyAccessServerRegistryServiceClient) UpdateKeyAccessServer(ctx context.Context, in *UpdateKeyAccessServerRequest, opts ...grpc.CallOption) (*UpdateKeyAccessServerResponse, error) { + out := new(UpdateKeyAccessServerResponse) + err := c.cc.Invoke(ctx, KeyAccessServerRegistryService_UpdateKeyAccessServer_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *keyAccessServerRegistryServiceClient) DeleteKeyAccessServer(ctx context.Context, in *DeleteKeyAccessServerRequest, opts ...grpc.CallOption) (*DeleteKeyAccessServerResponse, error) { + out := new(DeleteKeyAccessServerResponse) + err := c.cc.Invoke(ctx, KeyAccessServerRegistryService_DeleteKeyAccessServer_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// KeyAccessServerRegistryServiceServer is the server API for KeyAccessServerRegistryService service. +// All implementations must embed UnimplementedKeyAccessServerRegistryServiceServer +// for forward compatibility +type KeyAccessServerRegistryServiceServer interface { + // Request Examples: + // {} + // + // Response Examples: + // { + // "key_access_servers": [ + // { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // }, + // { + // "id": "cad1fc87-1193-456b-a217-d5cdae1fa67a", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971990", + // "nanos": 303386000 + // }, + // "updated_at": { + // "seconds": "1705971990", + // "nanos": 303386000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas3", + // "public_key": { + // "local": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUJ6ekNDQVhXZ0F3SUJBZ0lVT1J1VjNhdlU5QUU2enNCNlp4eWxsSHBpNWQ0d0NnWUlLb1pJemowRUF3SXcKUFRFTE1Ba0dBMVVFQmhNQ2RYTXhDekFKQmdOVkJBZ01BbU4wTVNFd0h3WURWUVFLREJoSmJuUmxjbTVsZENCWAphV1JuYVhSeklGQjBlU0JNZEdRd0hoY05NalF3TVRBeU1UWTFOalUyV2hjTk1qVXdNVEF4TVRZMU5qVTJXakE5Ck1Rc3dDUVlEVlFRR0V3SjFjekVMTUFrR0ExVUVDQXdDWTNReElUQWZCZ05WQkFvTUdFbHVkR1Z5Ym1WMElGZHAKWkdkcGRITWdVSFI1SUV4MFpEQlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJMVjlmQ0pIRC9rYwpyWHJVSFF3QVp4ME1jMGRQdkxqc0ovb2pFdE1NbjBST2RlT3g4eWd4Z2NRVEZGQXh5Q3RCdWFkaEFkbS9pVkh0CjhnMkVNejVkTzNXalV6QlJNQjBHQTFVZERnUVdCQlFZTmt1aytKSXVSV3luK2JFOHNCaFJ3MjdPVlRBZkJnTlYKSFNNRUdEQVdnQlFZTmt1aytKSXVSV3luK2JFOHNCaFJ3MjdPVlRBUEJnTlZIUk1CQWY4RUJUQURBUUgvTUFvRwpDQ3FHU000OUJBTUNBMGdBTUVVQ0lRQ0FCMmppWWU4QVk2TUo0QURQU1FHRTQ3K2Eza1dGTGNHc0pob1pieHRnClV3SWdjZklJdVBmaDRmYmN2OGNUaTJCbEkzazdzV1B1QW1JRlZyaUkyZDNVeDVRPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==" + // } + // } + // ] + // } + ListKeyAccessServers(context.Context, *ListKeyAccessServersRequest) (*ListKeyAccessServersResponse, error) + // Request Examples: + // { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732" + // } + // + // Response Examples: + // { + // "key_access_server": { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + GetKeyAccessServer(context.Context, *GetKeyAccessServerRequest) (*GetKeyAccessServerResponse, error) + // Request Examples: + // { + // "key_access_server": { + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + // + // Response Examples: + // { + // "key_access_server": { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + CreateKeyAccessServer(context.Context, *CreateKeyAccessServerRequest) (*CreateKeyAccessServerResponse, error) + // Request Examples: + // { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "key_access_server": { + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + // + // Response Examples: + // { + // "key_access_server": { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + UpdateKeyAccessServer(context.Context, *UpdateKeyAccessServerRequest) (*UpdateKeyAccessServerResponse, error) + // Request Examples: + // { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732" + // } + // + // Response Examples: + // { + // "key_access_server": { + // "id": "71eae02f-6837-4980-8a2c-70abf6b68732", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "updated_at": { + // "seconds": "1705971719", + // "nanos": 534029000 + // }, + // "description": "test kas instance" + // }, + // "uri": "kas2", + // "public_key": { + // "remote": "https://platform.virtru.com/kas1" + // } + // } + // } + DeleteKeyAccessServer(context.Context, *DeleteKeyAccessServerRequest) (*DeleteKeyAccessServerResponse, error) + mustEmbedUnimplementedKeyAccessServerRegistryServiceServer() +} + +// UnimplementedKeyAccessServerRegistryServiceServer must be embedded to have forward compatible implementations. +type UnimplementedKeyAccessServerRegistryServiceServer struct { +} + +func (UnimplementedKeyAccessServerRegistryServiceServer) ListKeyAccessServers(context.Context, *ListKeyAccessServersRequest) (*ListKeyAccessServersResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListKeyAccessServers not implemented") +} +func (UnimplementedKeyAccessServerRegistryServiceServer) GetKeyAccessServer(context.Context, *GetKeyAccessServerRequest) (*GetKeyAccessServerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetKeyAccessServer not implemented") +} +func (UnimplementedKeyAccessServerRegistryServiceServer) CreateKeyAccessServer(context.Context, *CreateKeyAccessServerRequest) (*CreateKeyAccessServerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateKeyAccessServer not implemented") +} +func (UnimplementedKeyAccessServerRegistryServiceServer) UpdateKeyAccessServer(context.Context, *UpdateKeyAccessServerRequest) (*UpdateKeyAccessServerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateKeyAccessServer not implemented") +} +func (UnimplementedKeyAccessServerRegistryServiceServer) DeleteKeyAccessServer(context.Context, *DeleteKeyAccessServerRequest) (*DeleteKeyAccessServerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteKeyAccessServer not implemented") +} +func (UnimplementedKeyAccessServerRegistryServiceServer) mustEmbedUnimplementedKeyAccessServerRegistryServiceServer() { +} + +// UnsafeKeyAccessServerRegistryServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to KeyAccessServerRegistryServiceServer will +// result in compilation errors. +type UnsafeKeyAccessServerRegistryServiceServer interface { + mustEmbedUnimplementedKeyAccessServerRegistryServiceServer() +} + +func RegisterKeyAccessServerRegistryServiceServer(s grpc.ServiceRegistrar, srv KeyAccessServerRegistryServiceServer) { + s.RegisterService(&KeyAccessServerRegistryService_ServiceDesc, srv) +} + +func _KeyAccessServerRegistryService_ListKeyAccessServers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListKeyAccessServersRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyAccessServerRegistryServiceServer).ListKeyAccessServers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyAccessServerRegistryService_ListKeyAccessServers_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyAccessServerRegistryServiceServer).ListKeyAccessServers(ctx, req.(*ListKeyAccessServersRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyAccessServerRegistryService_GetKeyAccessServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetKeyAccessServerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyAccessServerRegistryServiceServer).GetKeyAccessServer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyAccessServerRegistryService_GetKeyAccessServer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyAccessServerRegistryServiceServer).GetKeyAccessServer(ctx, req.(*GetKeyAccessServerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyAccessServerRegistryService_CreateKeyAccessServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateKeyAccessServerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyAccessServerRegistryServiceServer).CreateKeyAccessServer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyAccessServerRegistryService_CreateKeyAccessServer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyAccessServerRegistryServiceServer).CreateKeyAccessServer(ctx, req.(*CreateKeyAccessServerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyAccessServerRegistryService_UpdateKeyAccessServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateKeyAccessServerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyAccessServerRegistryServiceServer).UpdateKeyAccessServer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyAccessServerRegistryService_UpdateKeyAccessServer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyAccessServerRegistryServiceServer).UpdateKeyAccessServer(ctx, req.(*UpdateKeyAccessServerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _KeyAccessServerRegistryService_DeleteKeyAccessServer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteKeyAccessServerRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(KeyAccessServerRegistryServiceServer).DeleteKeyAccessServer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: KeyAccessServerRegistryService_DeleteKeyAccessServer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(KeyAccessServerRegistryServiceServer).DeleteKeyAccessServer(ctx, req.(*DeleteKeyAccessServerRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// KeyAccessServerRegistryService_ServiceDesc is the grpc.ServiceDesc for KeyAccessServerRegistryService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var KeyAccessServerRegistryService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "kasregistry.KeyAccessServerRegistryService", + HandlerType: (*KeyAccessServerRegistryServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListKeyAccessServers", + Handler: _KeyAccessServerRegistryService_ListKeyAccessServers_Handler, + }, + { + MethodName: "GetKeyAccessServer", + Handler: _KeyAccessServerRegistryService_GetKeyAccessServer_Handler, + }, + { + MethodName: "CreateKeyAccessServer", + Handler: _KeyAccessServerRegistryService_CreateKeyAccessServer_Handler, + }, + { + MethodName: "UpdateKeyAccessServer", + Handler: _KeyAccessServerRegistryService_UpdateKeyAccessServer_Handler, + }, + { + MethodName: "DeleteKeyAccessServer", + Handler: _KeyAccessServerRegistryService_DeleteKeyAccessServer_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "kasregistry/key_access_server_registry.proto", +} diff --git a/sdk/keyaccessgrants/key_access_grants.pb.go b/sdk/keyaccessgrants/key_access_grants.pb.go deleted file mode 100644 index f4beae78ef..0000000000 --- a/sdk/keyaccessgrants/key_access_grants.pb.go +++ /dev/null @@ -1,1203 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.31.0 -// protoc (unknown) -// source: keyaccessgrants/key_access_grants.proto - -package keyaccessgrants - -import ( - _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" - attributes "github.com/opentdf/opentdf-v2-poc/sdk/attributes" - common "github.com/opentdf/opentdf-v2-poc/sdk/common" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Descriptor for a KAS -type KeyAccessServer struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` - // Kas Url - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` - // public key - optional since can also be retrieved via url - PublicKey string `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` -} - -func (x *KeyAccessServer) Reset() { - *x = KeyAccessServer{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyAccessServer) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyAccessServer) ProtoMessage() {} - -func (x *KeyAccessServer) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeyAccessServer.ProtoReflect.Descriptor instead. -func (*KeyAccessServer) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{0} -} - -func (x *KeyAccessServer) GetDescriptor_() *common.ResourceDescriptor { - if x != nil { - return x.Descriptor_ - } - return nil -} - -func (x *KeyAccessServer) GetUrl() string { - if x != nil { - return x.Url - } - return "" -} - -func (x *KeyAccessServer) GetPublicKey() string { - if x != nil { - return x.PublicKey - } - return "" -} - -// Shareable set of key access grants to help with encryption workflows -type KeyAccessGrants struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Descriptor_ *common.ResourceDescriptor `protobuf:"bytes,1,opt,name=descriptor,proto3" json:"descriptor,omitempty"` - // List of available key access servers - // Example: - // - id: KAS-USA-1 - // url: http://.... - // pubKey=xxx - // - .... - KeyAccessServers []*KeyAccessServer `protobuf:"bytes,2,rep,name=key_access_servers,json=keyAccessServers,proto3" json:"key_access_servers,omitempty"` - // list of key access grants - KeyAccessGrants []*KeyAccessGrant `protobuf:"bytes,3,rep,name=key_access_grants,json=keyAccessGrants,proto3" json:"key_access_grants,omitempty"` -} - -func (x *KeyAccessGrants) Reset() { - *x = KeyAccessGrants{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyAccessGrants) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyAccessGrants) ProtoMessage() {} - -func (x *KeyAccessGrants) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeyAccessGrants.ProtoReflect.Descriptor instead. -func (*KeyAccessGrants) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{1} -} - -func (x *KeyAccessGrants) GetDescriptor_() *common.ResourceDescriptor { - if x != nil { - return x.Descriptor_ - } - return nil -} - -func (x *KeyAccessGrants) GetKeyAccessServers() []*KeyAccessServer { - if x != nil { - return x.KeyAccessServers - } - return nil -} - -func (x *KeyAccessGrants) GetKeyAccessGrants() []*KeyAccessGrant { - if x != nil { - return x.KeyAccessGrants - } - return nil -} - -// Defines encryption settings for an attribute and it's values -// -// Example: All attribute values for attribute "Classification": -// attributeDefinition: -// descriptor: -// fqn: http://demo.com/attr/Classification -// type: ALL_OF -// attributeValueGrants: -// - kasIds: [KAS-USA-1, KAS-GBR-1] -// -// Example: Per attribute values for attribute "Classification": -// attributeDefinition: -// descriptor: -// fqn: http://demo.com/attr/Classification -// type: ALL_OF -// attributeValueGrants: -// - kasIds: [KAS-USA-1, KAS-GBR-1] -// value: -// descriptor: -// value: TopSecret -// - kasIds: [KAS-USA-3, KAS-GBR-2] -// value: -// descriptor: -// value: Secret -type KeyAccessGrant struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // the attribute associated with this - AttributeDefinition *attributes.AttributeDefinition `protobuf:"bytes,1,opt,name=attribute_definition,json=attributeDefinition,proto3" json:"attribute_definition,omitempty"` - // attribute value settings; if empty then applies to all values - AttributeValueGrants []*KeyAccessGrantAttributeValue `protobuf:"bytes,2,rep,name=attribute_value_grants,json=attributeValueGrants,proto3" json:"attribute_value_grants,omitempty"` -} - -func (x *KeyAccessGrant) Reset() { - *x = KeyAccessGrant{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyAccessGrant) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyAccessGrant) ProtoMessage() {} - -func (x *KeyAccessGrant) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeyAccessGrant.ProtoReflect.Descriptor instead. -func (*KeyAccessGrant) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{2} -} - -func (x *KeyAccessGrant) GetAttributeDefinition() *attributes.AttributeDefinition { - if x != nil { - return x.AttributeDefinition - } - return nil -} - -func (x *KeyAccessGrant) GetAttributeValueGrants() []*KeyAccessGrantAttributeValue { - if x != nil { - return x.AttributeValueGrants - } - return nil -} - -// Define the attribute value -> prioritized key access servers -// -// Example: Apply to all attribute value for enclosed attribute definition: -// kasIds: [KAS-USA-1, KAS-GBR-1] -// -// Example: Applies to only single attribute value -// kasIds: [KAS-USA-1, KAS-GBR-1] -// value: -// descriptor: -// value: FVEY -type KeyAccessGrantAttributeValue struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // optional - if this is empty - then applies to all attribute values of the enclosed attribute definition - Value *attributes.AttributeValueReference `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` - // list of key access server ordered by priority. - KasIds []string `protobuf:"bytes,2,rep,name=kas_ids,json=kasIds,proto3" json:"kas_ids,omitempty"` -} - -func (x *KeyAccessGrantAttributeValue) Reset() { - *x = KeyAccessGrantAttributeValue{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *KeyAccessGrantAttributeValue) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*KeyAccessGrantAttributeValue) ProtoMessage() {} - -func (x *KeyAccessGrantAttributeValue) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use KeyAccessGrantAttributeValue.ProtoReflect.Descriptor instead. -func (*KeyAccessGrantAttributeValue) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{3} -} - -func (x *KeyAccessGrantAttributeValue) GetValue() *attributes.AttributeValueReference { - if x != nil { - return x.Value - } - return nil -} - -func (x *KeyAccessGrantAttributeValue) GetKasIds() []string { - if x != nil { - return x.KasIds - } - return nil -} - -type GetKeyAccessGrantRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetKeyAccessGrantRequest) Reset() { - *x = GetKeyAccessGrantRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetKeyAccessGrantRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetKeyAccessGrantRequest) ProtoMessage() {} - -func (x *GetKeyAccessGrantRequest) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetKeyAccessGrantRequest.ProtoReflect.Descriptor instead. -func (*GetKeyAccessGrantRequest) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{4} -} - -func (x *GetKeyAccessGrantRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type GetKeyAccessGrantResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Grants *KeyAccessGrants `protobuf:"bytes,1,opt,name=grants,proto3" json:"grants,omitempty"` -} - -func (x *GetKeyAccessGrantResponse) Reset() { - *x = GetKeyAccessGrantResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetKeyAccessGrantResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetKeyAccessGrantResponse) ProtoMessage() {} - -func (x *GetKeyAccessGrantResponse) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetKeyAccessGrantResponse.ProtoReflect.Descriptor instead. -func (*GetKeyAccessGrantResponse) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{5} -} - -func (x *GetKeyAccessGrantResponse) GetGrants() *KeyAccessGrants { - if x != nil { - return x.Grants - } - return nil -} - -type ListKeyAccessGrantsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Selector *common.ResourceSelector `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` -} - -func (x *ListKeyAccessGrantsRequest) Reset() { - *x = ListKeyAccessGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListKeyAccessGrantsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListKeyAccessGrantsRequest) ProtoMessage() {} - -func (x *ListKeyAccessGrantsRequest) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListKeyAccessGrantsRequest.ProtoReflect.Descriptor instead. -func (*ListKeyAccessGrantsRequest) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{6} -} - -func (x *ListKeyAccessGrantsRequest) GetSelector() *common.ResourceSelector { - if x != nil { - return x.Selector - } - return nil -} - -type ListKeyAccessGrantsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Grants []*KeyAccessGrants `protobuf:"bytes,1,rep,name=grants,proto3" json:"grants,omitempty"` -} - -func (x *ListKeyAccessGrantsResponse) Reset() { - *x = ListKeyAccessGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListKeyAccessGrantsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListKeyAccessGrantsResponse) ProtoMessage() {} - -func (x *ListKeyAccessGrantsResponse) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListKeyAccessGrantsResponse.ProtoReflect.Descriptor instead. -func (*ListKeyAccessGrantsResponse) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{7} -} - -func (x *ListKeyAccessGrantsResponse) GetGrants() []*KeyAccessGrants { - if x != nil { - return x.Grants - } - return nil -} - -type CreateKeyAccessGrantsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Grants *KeyAccessGrants `protobuf:"bytes,1,opt,name=grants,proto3" json:"grants,omitempty"` -} - -func (x *CreateKeyAccessGrantsRequest) Reset() { - *x = CreateKeyAccessGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateKeyAccessGrantsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateKeyAccessGrantsRequest) ProtoMessage() {} - -func (x *CreateKeyAccessGrantsRequest) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateKeyAccessGrantsRequest.ProtoReflect.Descriptor instead. -func (*CreateKeyAccessGrantsRequest) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{8} -} - -func (x *CreateKeyAccessGrantsRequest) GetGrants() *KeyAccessGrants { - if x != nil { - return x.Grants - } - return nil -} - -type CreateKeyAccessGrantsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *CreateKeyAccessGrantsResponse) Reset() { - *x = CreateKeyAccessGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateKeyAccessGrantsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateKeyAccessGrantsResponse) ProtoMessage() {} - -func (x *CreateKeyAccessGrantsResponse) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateKeyAccessGrantsResponse.ProtoReflect.Descriptor instead. -func (*CreateKeyAccessGrantsResponse) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{9} -} - -type UpdateKeyAccessGrantsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` - Grants *KeyAccessGrants `protobuf:"bytes,2,opt,name=grants,proto3" json:"grants,omitempty"` -} - -func (x *UpdateKeyAccessGrantsRequest) Reset() { - *x = UpdateKeyAccessGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateKeyAccessGrantsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateKeyAccessGrantsRequest) ProtoMessage() {} - -func (x *UpdateKeyAccessGrantsRequest) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateKeyAccessGrantsRequest.ProtoReflect.Descriptor instead. -func (*UpdateKeyAccessGrantsRequest) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{10} -} - -func (x *UpdateKeyAccessGrantsRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -func (x *UpdateKeyAccessGrantsRequest) GetGrants() *KeyAccessGrants { - if x != nil { - return x.Grants - } - return nil -} - -type UpdateKeyAccessGrantsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *UpdateKeyAccessGrantsResponse) Reset() { - *x = UpdateKeyAccessGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateKeyAccessGrantsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateKeyAccessGrantsResponse) ProtoMessage() {} - -func (x *UpdateKeyAccessGrantsResponse) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateKeyAccessGrantsResponse.ProtoReflect.Descriptor instead. -func (*UpdateKeyAccessGrantsResponse) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{11} -} - -type DeleteKeyAccessGrantsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteKeyAccessGrantsRequest) Reset() { - *x = DeleteKeyAccessGrantsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteKeyAccessGrantsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteKeyAccessGrantsRequest) ProtoMessage() {} - -func (x *DeleteKeyAccessGrantsRequest) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteKeyAccessGrantsRequest.ProtoReflect.Descriptor instead. -func (*DeleteKeyAccessGrantsRequest) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{12} -} - -func (x *DeleteKeyAccessGrantsRequest) GetId() int32 { - if x != nil { - return x.Id - } - return 0 -} - -type DeleteKeyAccessGrantsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *DeleteKeyAccessGrantsResponse) Reset() { - *x = DeleteKeyAccessGrantsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteKeyAccessGrantsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteKeyAccessGrantsResponse) ProtoMessage() {} - -func (x *DeleteKeyAccessGrantsResponse) ProtoReflect() protoreflect.Message { - mi := &file_keyaccessgrants_key_access_grants_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteKeyAccessGrantsResponse.ProtoReflect.Descriptor instead. -func (*DeleteKeyAccessGrantsResponse) Descriptor() ([]byte, []int) { - return file_keyaccessgrants_key_access_grants_proto_rawDescGZIP(), []int{13} -} - -var File_keyaccessgrants_key_access_grants_proto protoreflect.FileDescriptor - -var file_keyaccessgrants_key_access_grants_proto_rawDesc = []byte{ - 0x0a, 0x27, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x67, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x6b, 0x65, 0x79, 0x61, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x1a, 0x1b, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, - 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, - 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x03, 0x0a, 0x0f, 0x4b, 0x65, 0x79, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x0a, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x87, 0x03, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0xf4, 0x02, 0xba, 0x48, 0xf0, 0x02, 0xba, 0x01, 0xe9, 0x02, - 0x0a, 0x0a, 0x66, 0x71, 0x6e, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0xd7, 0x01, 0x46, - 0x51, 0x4e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x77, 0x69, - 0x74, 0x68, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x28, - 0x65, 0x2e, 0x67, 0x2e, 0x2c, 0x20, 0x27, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, - 0x65, 0x6d, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x27, 0x29, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, - 0x77, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, - 0x6c, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x45, 0x61, 0x63, 0x68, - 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x73, 0x74, - 0x61, 0x72, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, - 0x20, 0x61, 0x6e, 0x20, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, - 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x2c, 0x20, 0x63, 0x61, 0x6e, 0x20, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x68, 0x79, 0x70, 0x68, 0x65, 0x6e, 0x73, 0x2c, - 0x20, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x63, 0x68, - 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6c, - 0x61, 0x73, 0x68, 0x65, 0x73, 0x2e, 0x1a, 0x80, 0x01, 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, - 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, - 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x28, 0x5b, 0x61, 0x2d, 0x7a, - 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5c, 0x5c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x36, 0x31, 0x7d, - 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x28, 0x5c, 0x5c, - 0x2e, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x28, 0x5b, 0x61, 0x2d, - 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5c, 0x5c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x36, 0x31, - 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x29, 0x2a, - 0x28, 0x2f, 0x2e, 0x2a, 0x29, 0x3f, 0x24, 0x27, 0x29, 0xc8, 0x01, 0x01, 0x52, 0x03, 0x75, 0x72, - 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, - 0x22, 0xea, 0x01, 0x0a, 0x0f, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x12, 0x4e, 0x0a, 0x12, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6b, - 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x4b, - 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x10, - 0x6b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x73, - 0x12, 0x4b, 0x0a, 0x11, 0x6b, 0x65, 0x79, 0x5f, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x6b, 0x65, - 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x4b, 0x65, - 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x0f, 0x6b, 0x65, - 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0xc9, 0x01, - 0x0a, 0x0e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x12, 0x52, 0x0a, 0x14, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x64, 0x65, - 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x13, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x44, 0x65, 0x66, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x63, 0x0a, 0x16, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, - 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x52, 0x14, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x72, 0x0a, 0x1c, 0x4b, 0x65, 0x79, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x61, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x6b, 0x61, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x61, 0x73, 0x49, 0x64, 0x73, 0x22, 0x32, 0x0a, - 0x18, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, - 0x64, 0x22, 0x55, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, - 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x52, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, - 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x6c, 0x65, 0x63, 0x74, - 0x6f, 0x72, 0x52, 0x08, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x22, 0x57, 0x0a, 0x1b, - 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6b, 0x65, - 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x4b, 0x65, - 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x06, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x60, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, - 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x78, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x05, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x40, 0x0a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x20, 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, - 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, - 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1f, 0x0a, 0x1d, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xe6, 0x05, 0x0a, - 0x16, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x84, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, - 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, - 0x2b, 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x6b, - 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x83, - 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x2a, 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, - 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x11, 0x12, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x92, 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, - 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2d, - 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, - 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x3a, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x22, 0x0a, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x97, 0x01, 0x0a, 0x15, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, - 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x3a, 0x06, 0x67, 0x72, 0x61, 0x6e, - 0x74, 0x73, 0x1a, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, - 0x69, 0x64, 0x7d, 0x12, 0x8f, 0x01, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, - 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2d, 0x2e, - 0x6b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, - 0x72, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x6b, - 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x44, - 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x17, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x11, 0x2a, 0x0f, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xbe, 0x01, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x6b, 0x65, - 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x42, 0x14, 0x4b, - 0x65, 0x79, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x47, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, - 0x66, 0x2d, 0x76, 0x32, 0x2d, 0x70, 0x6f, 0x63, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x6b, 0x65, 0x79, - 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0xa2, 0x02, 0x03, 0x4b, - 0x58, 0x58, 0xaa, 0x02, 0x0f, 0x4b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0xca, 0x02, 0x0f, 0x4b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0xe2, 0x02, 0x1b, 0x4b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, - 0x73, 0x73, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0f, 0x4b, 0x65, 0x79, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_keyaccessgrants_key_access_grants_proto_rawDescOnce sync.Once - file_keyaccessgrants_key_access_grants_proto_rawDescData = file_keyaccessgrants_key_access_grants_proto_rawDesc -) - -func file_keyaccessgrants_key_access_grants_proto_rawDescGZIP() []byte { - file_keyaccessgrants_key_access_grants_proto_rawDescOnce.Do(func() { - file_keyaccessgrants_key_access_grants_proto_rawDescData = protoimpl.X.CompressGZIP(file_keyaccessgrants_key_access_grants_proto_rawDescData) - }) - return file_keyaccessgrants_key_access_grants_proto_rawDescData -} - -var file_keyaccessgrants_key_access_grants_proto_msgTypes = make([]protoimpl.MessageInfo, 14) -var file_keyaccessgrants_key_access_grants_proto_goTypes = []interface{}{ - (*KeyAccessServer)(nil), // 0: keyaccessgrants.KeyAccessServer - (*KeyAccessGrants)(nil), // 1: keyaccessgrants.KeyAccessGrants - (*KeyAccessGrant)(nil), // 2: keyaccessgrants.KeyAccessGrant - (*KeyAccessGrantAttributeValue)(nil), // 3: keyaccessgrants.KeyAccessGrantAttributeValue - (*GetKeyAccessGrantRequest)(nil), // 4: keyaccessgrants.GetKeyAccessGrantRequest - (*GetKeyAccessGrantResponse)(nil), // 5: keyaccessgrants.GetKeyAccessGrantResponse - (*ListKeyAccessGrantsRequest)(nil), // 6: keyaccessgrants.ListKeyAccessGrantsRequest - (*ListKeyAccessGrantsResponse)(nil), // 7: keyaccessgrants.ListKeyAccessGrantsResponse - (*CreateKeyAccessGrantsRequest)(nil), // 8: keyaccessgrants.CreateKeyAccessGrantsRequest - (*CreateKeyAccessGrantsResponse)(nil), // 9: keyaccessgrants.CreateKeyAccessGrantsResponse - (*UpdateKeyAccessGrantsRequest)(nil), // 10: keyaccessgrants.UpdateKeyAccessGrantsRequest - (*UpdateKeyAccessGrantsResponse)(nil), // 11: keyaccessgrants.UpdateKeyAccessGrantsResponse - (*DeleteKeyAccessGrantsRequest)(nil), // 12: keyaccessgrants.DeleteKeyAccessGrantsRequest - (*DeleteKeyAccessGrantsResponse)(nil), // 13: keyaccessgrants.DeleteKeyAccessGrantsResponse - (*common.ResourceDescriptor)(nil), // 14: common.ResourceDescriptor - (*attributes.AttributeDefinition)(nil), // 15: attributes.AttributeDefinition - (*attributes.AttributeValueReference)(nil), // 16: attributes.AttributeValueReference - (*common.ResourceSelector)(nil), // 17: common.ResourceSelector -} -var file_keyaccessgrants_key_access_grants_proto_depIdxs = []int32{ - 14, // 0: keyaccessgrants.KeyAccessServer.descriptor:type_name -> common.ResourceDescriptor - 14, // 1: keyaccessgrants.KeyAccessGrants.descriptor:type_name -> common.ResourceDescriptor - 0, // 2: keyaccessgrants.KeyAccessGrants.key_access_servers:type_name -> keyaccessgrants.KeyAccessServer - 2, // 3: keyaccessgrants.KeyAccessGrants.key_access_grants:type_name -> keyaccessgrants.KeyAccessGrant - 15, // 4: keyaccessgrants.KeyAccessGrant.attribute_definition:type_name -> attributes.AttributeDefinition - 3, // 5: keyaccessgrants.KeyAccessGrant.attribute_value_grants:type_name -> keyaccessgrants.KeyAccessGrantAttributeValue - 16, // 6: keyaccessgrants.KeyAccessGrantAttributeValue.value:type_name -> attributes.AttributeValueReference - 1, // 7: keyaccessgrants.GetKeyAccessGrantResponse.grants:type_name -> keyaccessgrants.KeyAccessGrants - 17, // 8: keyaccessgrants.ListKeyAccessGrantsRequest.selector:type_name -> common.ResourceSelector - 1, // 9: keyaccessgrants.ListKeyAccessGrantsResponse.grants:type_name -> keyaccessgrants.KeyAccessGrants - 1, // 10: keyaccessgrants.CreateKeyAccessGrantsRequest.grants:type_name -> keyaccessgrants.KeyAccessGrants - 1, // 11: keyaccessgrants.UpdateKeyAccessGrantsRequest.grants:type_name -> keyaccessgrants.KeyAccessGrants - 6, // 12: keyaccessgrants.KeyAccessGrantsService.ListKeyAccessGrants:input_type -> keyaccessgrants.ListKeyAccessGrantsRequest - 4, // 13: keyaccessgrants.KeyAccessGrantsService.GetKeyAccessGrant:input_type -> keyaccessgrants.GetKeyAccessGrantRequest - 8, // 14: keyaccessgrants.KeyAccessGrantsService.CreateKeyAccessGrants:input_type -> keyaccessgrants.CreateKeyAccessGrantsRequest - 10, // 15: keyaccessgrants.KeyAccessGrantsService.UpdateKeyAccessGrants:input_type -> keyaccessgrants.UpdateKeyAccessGrantsRequest - 12, // 16: keyaccessgrants.KeyAccessGrantsService.DeleteKeyAccessGrants:input_type -> keyaccessgrants.DeleteKeyAccessGrantsRequest - 7, // 17: keyaccessgrants.KeyAccessGrantsService.ListKeyAccessGrants:output_type -> keyaccessgrants.ListKeyAccessGrantsResponse - 5, // 18: keyaccessgrants.KeyAccessGrantsService.GetKeyAccessGrant:output_type -> keyaccessgrants.GetKeyAccessGrantResponse - 9, // 19: keyaccessgrants.KeyAccessGrantsService.CreateKeyAccessGrants:output_type -> keyaccessgrants.CreateKeyAccessGrantsResponse - 11, // 20: keyaccessgrants.KeyAccessGrantsService.UpdateKeyAccessGrants:output_type -> keyaccessgrants.UpdateKeyAccessGrantsResponse - 13, // 21: keyaccessgrants.KeyAccessGrantsService.DeleteKeyAccessGrants:output_type -> keyaccessgrants.DeleteKeyAccessGrantsResponse - 17, // [17:22] is the sub-list for method output_type - 12, // [12:17] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name -} - -func init() { file_keyaccessgrants_key_access_grants_proto_init() } -func file_keyaccessgrants_key_access_grants_proto_init() { - if File_keyaccessgrants_key_access_grants_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_keyaccessgrants_key_access_grants_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyAccessServer); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyAccessGrants); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyAccessGrant); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyAccessGrantAttributeValue); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeyAccessGrantRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeyAccessGrantResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKeyAccessGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListKeyAccessGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateKeyAccessGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateKeyAccessGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateKeyAccessGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateKeyAccessGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteKeyAccessGrantsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_keyaccessgrants_key_access_grants_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteKeyAccessGrantsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_keyaccessgrants_key_access_grants_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_keyaccessgrants_key_access_grants_proto_goTypes, - DependencyIndexes: file_keyaccessgrants_key_access_grants_proto_depIdxs, - MessageInfos: file_keyaccessgrants_key_access_grants_proto_msgTypes, - }.Build() - File_keyaccessgrants_key_access_grants_proto = out.File - file_keyaccessgrants_key_access_grants_proto_rawDesc = nil - file_keyaccessgrants_key_access_grants_proto_goTypes = nil - file_keyaccessgrants_key_access_grants_proto_depIdxs = nil -} diff --git a/sdk/keyaccessgrants/key_access_grants_grpc.pb.go b/sdk/keyaccessgrants/key_access_grants_grpc.pb.go deleted file mode 100644 index 9c4e2bea1e..0000000000 --- a/sdk/keyaccessgrants/key_access_grants_grpc.pb.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: keyaccessgrants/key_access_grants.proto - -package keyaccessgrants - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - KeyAccessGrantsService_ListKeyAccessGrants_FullMethodName = "/keyaccessgrants.KeyAccessGrantsService/ListKeyAccessGrants" - KeyAccessGrantsService_GetKeyAccessGrant_FullMethodName = "/keyaccessgrants.KeyAccessGrantsService/GetKeyAccessGrant" - KeyAccessGrantsService_CreateKeyAccessGrants_FullMethodName = "/keyaccessgrants.KeyAccessGrantsService/CreateKeyAccessGrants" - KeyAccessGrantsService_UpdateKeyAccessGrants_FullMethodName = "/keyaccessgrants.KeyAccessGrantsService/UpdateKeyAccessGrants" - KeyAccessGrantsService_DeleteKeyAccessGrants_FullMethodName = "/keyaccessgrants.KeyAccessGrantsService/DeleteKeyAccessGrants" -) - -// KeyAccessGrantsServiceClient is the client API for KeyAccessGrantsService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type KeyAccessGrantsServiceClient interface { - ListKeyAccessGrants(ctx context.Context, in *ListKeyAccessGrantsRequest, opts ...grpc.CallOption) (*ListKeyAccessGrantsResponse, error) - GetKeyAccessGrant(ctx context.Context, in *GetKeyAccessGrantRequest, opts ...grpc.CallOption) (*GetKeyAccessGrantResponse, error) - CreateKeyAccessGrants(ctx context.Context, in *CreateKeyAccessGrantsRequest, opts ...grpc.CallOption) (*CreateKeyAccessGrantsResponse, error) - UpdateKeyAccessGrants(ctx context.Context, in *UpdateKeyAccessGrantsRequest, opts ...grpc.CallOption) (*UpdateKeyAccessGrantsResponse, error) - DeleteKeyAccessGrants(ctx context.Context, in *DeleteKeyAccessGrantsRequest, opts ...grpc.CallOption) (*DeleteKeyAccessGrantsResponse, error) -} - -type keyAccessGrantsServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewKeyAccessGrantsServiceClient(cc grpc.ClientConnInterface) KeyAccessGrantsServiceClient { - return &keyAccessGrantsServiceClient{cc} -} - -func (c *keyAccessGrantsServiceClient) ListKeyAccessGrants(ctx context.Context, in *ListKeyAccessGrantsRequest, opts ...grpc.CallOption) (*ListKeyAccessGrantsResponse, error) { - out := new(ListKeyAccessGrantsResponse) - err := c.cc.Invoke(ctx, KeyAccessGrantsService_ListKeyAccessGrants_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyAccessGrantsServiceClient) GetKeyAccessGrant(ctx context.Context, in *GetKeyAccessGrantRequest, opts ...grpc.CallOption) (*GetKeyAccessGrantResponse, error) { - out := new(GetKeyAccessGrantResponse) - err := c.cc.Invoke(ctx, KeyAccessGrantsService_GetKeyAccessGrant_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyAccessGrantsServiceClient) CreateKeyAccessGrants(ctx context.Context, in *CreateKeyAccessGrantsRequest, opts ...grpc.CallOption) (*CreateKeyAccessGrantsResponse, error) { - out := new(CreateKeyAccessGrantsResponse) - err := c.cc.Invoke(ctx, KeyAccessGrantsService_CreateKeyAccessGrants_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyAccessGrantsServiceClient) UpdateKeyAccessGrants(ctx context.Context, in *UpdateKeyAccessGrantsRequest, opts ...grpc.CallOption) (*UpdateKeyAccessGrantsResponse, error) { - out := new(UpdateKeyAccessGrantsResponse) - err := c.cc.Invoke(ctx, KeyAccessGrantsService_UpdateKeyAccessGrants_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *keyAccessGrantsServiceClient) DeleteKeyAccessGrants(ctx context.Context, in *DeleteKeyAccessGrantsRequest, opts ...grpc.CallOption) (*DeleteKeyAccessGrantsResponse, error) { - out := new(DeleteKeyAccessGrantsResponse) - err := c.cc.Invoke(ctx, KeyAccessGrantsService_DeleteKeyAccessGrants_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// KeyAccessGrantsServiceServer is the server API for KeyAccessGrantsService service. -// All implementations must embed UnimplementedKeyAccessGrantsServiceServer -// for forward compatibility -type KeyAccessGrantsServiceServer interface { - ListKeyAccessGrants(context.Context, *ListKeyAccessGrantsRequest) (*ListKeyAccessGrantsResponse, error) - GetKeyAccessGrant(context.Context, *GetKeyAccessGrantRequest) (*GetKeyAccessGrantResponse, error) - CreateKeyAccessGrants(context.Context, *CreateKeyAccessGrantsRequest) (*CreateKeyAccessGrantsResponse, error) - UpdateKeyAccessGrants(context.Context, *UpdateKeyAccessGrantsRequest) (*UpdateKeyAccessGrantsResponse, error) - DeleteKeyAccessGrants(context.Context, *DeleteKeyAccessGrantsRequest) (*DeleteKeyAccessGrantsResponse, error) - mustEmbedUnimplementedKeyAccessGrantsServiceServer() -} - -// UnimplementedKeyAccessGrantsServiceServer must be embedded to have forward compatible implementations. -type UnimplementedKeyAccessGrantsServiceServer struct { -} - -func (UnimplementedKeyAccessGrantsServiceServer) ListKeyAccessGrants(context.Context, *ListKeyAccessGrantsRequest) (*ListKeyAccessGrantsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListKeyAccessGrants not implemented") -} -func (UnimplementedKeyAccessGrantsServiceServer) GetKeyAccessGrant(context.Context, *GetKeyAccessGrantRequest) (*GetKeyAccessGrantResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetKeyAccessGrant not implemented") -} -func (UnimplementedKeyAccessGrantsServiceServer) CreateKeyAccessGrants(context.Context, *CreateKeyAccessGrantsRequest) (*CreateKeyAccessGrantsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateKeyAccessGrants not implemented") -} -func (UnimplementedKeyAccessGrantsServiceServer) UpdateKeyAccessGrants(context.Context, *UpdateKeyAccessGrantsRequest) (*UpdateKeyAccessGrantsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateKeyAccessGrants not implemented") -} -func (UnimplementedKeyAccessGrantsServiceServer) DeleteKeyAccessGrants(context.Context, *DeleteKeyAccessGrantsRequest) (*DeleteKeyAccessGrantsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteKeyAccessGrants not implemented") -} -func (UnimplementedKeyAccessGrantsServiceServer) mustEmbedUnimplementedKeyAccessGrantsServiceServer() { -} - -// UnsafeKeyAccessGrantsServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to KeyAccessGrantsServiceServer will -// result in compilation errors. -type UnsafeKeyAccessGrantsServiceServer interface { - mustEmbedUnimplementedKeyAccessGrantsServiceServer() -} - -func RegisterKeyAccessGrantsServiceServer(s grpc.ServiceRegistrar, srv KeyAccessGrantsServiceServer) { - s.RegisterService(&KeyAccessGrantsService_ServiceDesc, srv) -} - -func _KeyAccessGrantsService_ListKeyAccessGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListKeyAccessGrantsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyAccessGrantsServiceServer).ListKeyAccessGrants(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KeyAccessGrantsService_ListKeyAccessGrants_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyAccessGrantsServiceServer).ListKeyAccessGrants(ctx, req.(*ListKeyAccessGrantsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyAccessGrantsService_GetKeyAccessGrant_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetKeyAccessGrantRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyAccessGrantsServiceServer).GetKeyAccessGrant(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KeyAccessGrantsService_GetKeyAccessGrant_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyAccessGrantsServiceServer).GetKeyAccessGrant(ctx, req.(*GetKeyAccessGrantRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyAccessGrantsService_CreateKeyAccessGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateKeyAccessGrantsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyAccessGrantsServiceServer).CreateKeyAccessGrants(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KeyAccessGrantsService_CreateKeyAccessGrants_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyAccessGrantsServiceServer).CreateKeyAccessGrants(ctx, req.(*CreateKeyAccessGrantsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyAccessGrantsService_UpdateKeyAccessGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateKeyAccessGrantsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyAccessGrantsServiceServer).UpdateKeyAccessGrants(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KeyAccessGrantsService_UpdateKeyAccessGrants_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyAccessGrantsServiceServer).UpdateKeyAccessGrants(ctx, req.(*UpdateKeyAccessGrantsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _KeyAccessGrantsService_DeleteKeyAccessGrants_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteKeyAccessGrantsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(KeyAccessGrantsServiceServer).DeleteKeyAccessGrants(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: KeyAccessGrantsService_DeleteKeyAccessGrants_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(KeyAccessGrantsServiceServer).DeleteKeyAccessGrants(ctx, req.(*DeleteKeyAccessGrantsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// KeyAccessGrantsService_ServiceDesc is the grpc.ServiceDesc for KeyAccessGrantsService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var KeyAccessGrantsService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "keyaccessgrants.KeyAccessGrantsService", - HandlerType: (*KeyAccessGrantsServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ListKeyAccessGrants", - Handler: _KeyAccessGrantsService_ListKeyAccessGrants_Handler, - }, - { - MethodName: "GetKeyAccessGrant", - Handler: _KeyAccessGrantsService_GetKeyAccessGrant_Handler, - }, - { - MethodName: "CreateKeyAccessGrants", - Handler: _KeyAccessGrantsService_CreateKeyAccessGrants_Handler, - }, - { - MethodName: "UpdateKeyAccessGrants", - Handler: _KeyAccessGrantsService_UpdateKeyAccessGrants_Handler, - }, - { - MethodName: "DeleteKeyAccessGrants", - Handler: _KeyAccessGrantsService_DeleteKeyAccessGrants_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "keyaccessgrants/key_access_grants.proto", -} diff --git a/sdk/namespaces/namespaces.pb.go b/sdk/namespaces/namespaces.pb.go new file mode 100644 index 0000000000..4bcd00e590 --- /dev/null +++ b/sdk/namespaces/namespaces.pb.go @@ -0,0 +1,880 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: namespaces/namespaces.proto + +package namespaces + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type Namespace struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // generated uuid in database + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // used to partition Attribute Definitions, support by namespace AuthN and enable federation + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *Namespace) Reset() { + *x = Namespace{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Namespace) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Namespace) ProtoMessage() {} + +func (x *Namespace) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Namespace.ProtoReflect.Descriptor instead. +func (*Namespace) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{0} +} + +func (x *Namespace) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Namespace) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type GetNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetNamespaceRequest) Reset() { + *x = GetNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNamespaceRequest) ProtoMessage() {} + +func (x *GetNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNamespaceRequest.ProtoReflect.Descriptor instead. +func (*GetNamespaceRequest) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{1} +} + +func (x *GetNamespaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetNamespaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *GetNamespaceResponse) Reset() { + *x = GetNamespaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetNamespaceResponse) ProtoMessage() {} + +func (x *GetNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetNamespaceResponse.ProtoReflect.Descriptor instead. +func (*GetNamespaceResponse) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{2} +} + +func (x *GetNamespaceResponse) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type ListNamespacesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListNamespacesRequest) Reset() { + *x = ListNamespacesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNamespacesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNamespacesRequest) ProtoMessage() {} + +func (x *ListNamespacesRequest) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNamespacesRequest.ProtoReflect.Descriptor instead. +func (*ListNamespacesRequest) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{3} +} + +type ListNamespacesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespaces []*Namespace `protobuf:"bytes,1,rep,name=namespaces,proto3" json:"namespaces,omitempty"` +} + +func (x *ListNamespacesResponse) Reset() { + *x = ListNamespacesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListNamespacesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListNamespacesResponse) ProtoMessage() {} + +func (x *ListNamespacesResponse) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListNamespacesResponse.ProtoReflect.Descriptor instead. +func (*ListNamespacesResponse) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{4} +} + +func (x *ListNamespacesResponse) GetNamespaces() []*Namespace { + if x != nil { + return x.Namespaces + } + return nil +} + +type CreateNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *CreateNamespaceRequest) Reset() { + *x = CreateNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNamespaceRequest) ProtoMessage() {} + +func (x *CreateNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNamespaceRequest.ProtoReflect.Descriptor instead. +func (*CreateNamespaceRequest) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{5} +} + +func (x *CreateNamespaceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type CreateNamespaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *CreateNamespaceResponse) Reset() { + *x = CreateNamespaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateNamespaceResponse) ProtoMessage() {} + +func (x *CreateNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateNamespaceResponse.ProtoReflect.Descriptor instead. +func (*CreateNamespaceResponse) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateNamespaceResponse) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type UpdateNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` +} + +func (x *UpdateNamespaceRequest) Reset() { + *x = UpdateNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNamespaceRequest) ProtoMessage() {} + +func (x *UpdateNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNamespaceRequest.ProtoReflect.Descriptor instead. +func (*UpdateNamespaceRequest) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{7} +} + +func (x *UpdateNamespaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateNamespaceRequest) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +type UpdateNamespaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Namespace *Namespace `protobuf:"bytes,1,opt,name=namespace,proto3" json:"namespace,omitempty"` +} + +func (x *UpdateNamespaceResponse) Reset() { + *x = UpdateNamespaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateNamespaceResponse) ProtoMessage() {} + +func (x *UpdateNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateNamespaceResponse.ProtoReflect.Descriptor instead. +func (*UpdateNamespaceResponse) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateNamespaceResponse) GetNamespace() *Namespace { + if x != nil { + return x.Namespace + } + return nil +} + +type DeleteNamespaceRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteNamespaceRequest) Reset() { + *x = DeleteNamespaceRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNamespaceRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNamespaceRequest) ProtoMessage() {} + +func (x *DeleteNamespaceRequest) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNamespaceRequest.ProtoReflect.Descriptor instead. +func (*DeleteNamespaceRequest) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{9} +} + +func (x *DeleteNamespaceRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteNamespaceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *DeleteNamespaceResponse) Reset() { + *x = DeleteNamespaceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_namespaces_namespaces_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteNamespaceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteNamespaceResponse) ProtoMessage() {} + +func (x *DeleteNamespaceResponse) ProtoReflect() protoreflect.Message { + mi := &file_namespaces_namespaces_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteNamespaceResponse.ProtoReflect.Descriptor instead. +func (*DeleteNamespaceResponse) Descriptor() ([]byte, []int) { + return file_namespaces_namespaces_proto_rawDescGZIP(), []int{10} +} + +var File_namespaces_namespaces_proto protoreflect.FileDescriptor + +var file_namespaces_namespaces_proto_rawDesc = []byte{ + 0x0a, 0x1b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, + 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, + 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x95, 0x04, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0xf7, 0x03, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x42, 0xe2, 0x03, 0xba, 0x48, 0xde, 0x03, 0xba, 0x01, 0xd2, 0x03, 0x0a, 0x10, 0x6e, 0x61, + 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0xea, + 0x02, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, + 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x68, 0x6f, 0x73, 0x74, 0x6e, + 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x69, + 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x20, + 0x6f, 0x6e, 0x65, 0x20, 0x64, 0x6f, 0x74, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x65, 0x61, + 0x63, 0x68, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x28, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x29, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x64, 0x20, + 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x20, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x63, 0x68, 0x61, 0x72, + 0x61, 0x63, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x6c, 0x61, 0x62, 0x65, + 0x6c, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x31, 0x20, 0x74, 0x6f, 0x20, 0x36, + 0x33, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x20, 0x6c, 0x6f, 0x6e, + 0x67, 0x2c, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x68, 0x79, 0x70, 0x68, + 0x65, 0x6e, 0x73, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x73, 0x20, 0x74, + 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x61, 0x73, 0x74, + 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, + 0x74, 0x6f, 0x70, 0x2d, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, + 0x20, 0x28, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, + 0x6e, 0x74, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6e, + 0x61, 0x6c, 0x20, 0x64, 0x6f, 0x74, 0x29, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6e, + 0x73, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, + 0x20, 0x74, 0x77, 0x6f, 0x20, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x62, 0x65, 0x74, 0x69, 0x63, 0x20, + 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x1a, 0x51, 0x74, 0x68, 0x69, + 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x28, 0x5b, 0x61, 0x2d, + 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, + 0x30, 0x2d, 0x39, 0x5c, 0x5c, 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, + 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x5c, 0x5c, 0x2e, 0x29, 0x2b, 0x5b, + 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x5d, 0x7b, 0x32, 0x2c, 0x7d, 0x24, 0x27, 0x29, 0xc8, 0x01, + 0x01, 0x72, 0x03, 0x18, 0xfd, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x2d, 0x0a, 0x13, + 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4b, 0x0a, 0x14, 0x47, + 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x17, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x4f, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x15, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x22, 0x34, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4e, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x4c, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x4e, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x33, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x2e, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x30, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0x81, 0x05, 0x0a, 0x10, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, + 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0x77, 0x0a, 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x12, 0x21, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x12, 0x16, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x7a, 0x0a, 0x0f, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x16, 0x2f, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x12, 0x7f, 0x0a, 0x0f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6e, + 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x1a, 0x1b, 0x2f, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x7f, 0x0a, 0x0f, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x2a, 0x1b, 0x2f, 0x61, 0x74, 0x74, + 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0x9b, 0x01, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x42, 0x0f, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x30, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, + 0x66, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, 0x76, 0x32, 0x2d, 0x70, 0x6f, 0x63, + 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0xa2, + 0x02, 0x03, 0x4e, 0x58, 0x58, 0xaa, 0x02, 0x0a, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x73, 0xca, 0x02, 0x0a, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0xe2, + 0x02, 0x16, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x73, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_namespaces_namespaces_proto_rawDescOnce sync.Once + file_namespaces_namespaces_proto_rawDescData = file_namespaces_namespaces_proto_rawDesc +) + +func file_namespaces_namespaces_proto_rawDescGZIP() []byte { + file_namespaces_namespaces_proto_rawDescOnce.Do(func() { + file_namespaces_namespaces_proto_rawDescData = protoimpl.X.CompressGZIP(file_namespaces_namespaces_proto_rawDescData) + }) + return file_namespaces_namespaces_proto_rawDescData +} + +var file_namespaces_namespaces_proto_msgTypes = make([]protoimpl.MessageInfo, 11) +var file_namespaces_namespaces_proto_goTypes = []interface{}{ + (*Namespace)(nil), // 0: namespaces.Namespace + (*GetNamespaceRequest)(nil), // 1: namespaces.GetNamespaceRequest + (*GetNamespaceResponse)(nil), // 2: namespaces.GetNamespaceResponse + (*ListNamespacesRequest)(nil), // 3: namespaces.ListNamespacesRequest + (*ListNamespacesResponse)(nil), // 4: namespaces.ListNamespacesResponse + (*CreateNamespaceRequest)(nil), // 5: namespaces.CreateNamespaceRequest + (*CreateNamespaceResponse)(nil), // 6: namespaces.CreateNamespaceResponse + (*UpdateNamespaceRequest)(nil), // 7: namespaces.UpdateNamespaceRequest + (*UpdateNamespaceResponse)(nil), // 8: namespaces.UpdateNamespaceResponse + (*DeleteNamespaceRequest)(nil), // 9: namespaces.DeleteNamespaceRequest + (*DeleteNamespaceResponse)(nil), // 10: namespaces.DeleteNamespaceResponse +} +var file_namespaces_namespaces_proto_depIdxs = []int32{ + 0, // 0: namespaces.GetNamespaceResponse.namespace:type_name -> namespaces.Namespace + 0, // 1: namespaces.ListNamespacesResponse.namespaces:type_name -> namespaces.Namespace + 0, // 2: namespaces.CreateNamespaceResponse.namespace:type_name -> namespaces.Namespace + 0, // 3: namespaces.UpdateNamespaceResponse.namespace:type_name -> namespaces.Namespace + 1, // 4: namespaces.NamespaceService.GetNamespace:input_type -> namespaces.GetNamespaceRequest + 3, // 5: namespaces.NamespaceService.ListNamespaces:input_type -> namespaces.ListNamespacesRequest + 5, // 6: namespaces.NamespaceService.CreateNamespace:input_type -> namespaces.CreateNamespaceRequest + 7, // 7: namespaces.NamespaceService.UpdateNamespace:input_type -> namespaces.UpdateNamespaceRequest + 9, // 8: namespaces.NamespaceService.DeleteNamespace:input_type -> namespaces.DeleteNamespaceRequest + 2, // 9: namespaces.NamespaceService.GetNamespace:output_type -> namespaces.GetNamespaceResponse + 4, // 10: namespaces.NamespaceService.ListNamespaces:output_type -> namespaces.ListNamespacesResponse + 6, // 11: namespaces.NamespaceService.CreateNamespace:output_type -> namespaces.CreateNamespaceResponse + 8, // 12: namespaces.NamespaceService.UpdateNamespace:output_type -> namespaces.UpdateNamespaceResponse + 10, // 13: namespaces.NamespaceService.DeleteNamespace:output_type -> namespaces.DeleteNamespaceResponse + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_namespaces_namespaces_proto_init() } +func file_namespaces_namespaces_proto_init() { + if File_namespaces_namespaces_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_namespaces_namespaces_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Namespace); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNamespacesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListNamespacesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteNamespaceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_namespaces_namespaces_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteNamespaceResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_namespaces_namespaces_proto_rawDesc, + NumEnums: 0, + NumMessages: 11, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_namespaces_namespaces_proto_goTypes, + DependencyIndexes: file_namespaces_namespaces_proto_depIdxs, + MessageInfos: file_namespaces_namespaces_proto_msgTypes, + }.Build() + File_namespaces_namespaces_proto = out.File + file_namespaces_namespaces_proto_rawDesc = nil + file_namespaces_namespaces_proto_goTypes = nil + file_namespaces_namespaces_proto_depIdxs = nil +} diff --git a/sdk/namespaces/namespaces.pb.gw.go b/sdk/namespaces/namespaces.pb.gw.go new file mode 100644 index 0000000000..cf7aea46a6 --- /dev/null +++ b/sdk/namespaces/namespaces.pb.gw.go @@ -0,0 +1,569 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: namespaces/namespaces.proto + +/* +Package namespaces is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package namespaces + +import ( + "context" + "io" + "net/http" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = metadata.Join + +func request_NamespaceService_GetNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client NamespaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.GetNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NamespaceService_GetNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server NamespaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.GetNamespace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_NamespaceService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, client NamespaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListNamespacesRequest + var metadata runtime.ServerMetadata + + msg, err := client.ListNamespaces(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NamespaceService_ListNamespaces_0(ctx context.Context, marshaler runtime.Marshaler, server NamespaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListNamespacesRequest + var metadata runtime.ServerMetadata + + msg, err := server.ListNamespaces(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_NamespaceService_CreateNamespace_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_NamespaceService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client NamespaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateNamespaceRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NamespaceService_CreateNamespace_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NamespaceService_CreateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server NamespaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateNamespaceRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NamespaceService_CreateNamespace_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateNamespace(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_NamespaceService_UpdateNamespace_0 = &utilities.DoubleArray{Encoding: map[string]int{"id": 0}, Base: []int{1, 2, 0, 0}, Check: []int{0, 1, 2, 2}} +) + +func request_NamespaceService_UpdateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client NamespaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NamespaceService_UpdateNamespace_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UpdateNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NamespaceService_UpdateNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server NamespaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_NamespaceService_UpdateNamespace_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UpdateNamespace(ctx, &protoReq) + return msg, metadata, err + +} + +func request_NamespaceService_DeleteNamespace_0(ctx context.Context, marshaler runtime.Marshaler, client NamespaceServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := client.DeleteNamespace(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_NamespaceService_DeleteNamespace_0(ctx context.Context, marshaler runtime.Marshaler, server NamespaceServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteNamespaceRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + } + + protoReq.Id, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + } + + msg, err := server.DeleteNamespace(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterNamespaceServiceHandlerServer registers the http handlers for service NamespaceService to "mux". +// UnaryRPC :call NamespaceServiceServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNamespaceServiceHandlerFromEndpoint instead. +func RegisterNamespaceServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NamespaceServiceServer) error { + + mux.Handle("GET", pattern_NamespaceService_GetNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/namespaces.NamespaceService/GetNamespace", runtime.WithHTTPPathPattern("/attributes/namespaces/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NamespaceService_GetNamespace_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_GetNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NamespaceService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/namespaces.NamespaceService/ListNamespaces", runtime.WithHTTPPathPattern("/attributes/namespaces")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NamespaceService_ListNamespaces_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_ListNamespaces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_NamespaceService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/namespaces.NamespaceService/CreateNamespace", runtime.WithHTTPPathPattern("/attributes/namespaces")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NamespaceService_CreateNamespace_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_CreateNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_NamespaceService_UpdateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/namespaces.NamespaceService/UpdateNamespace", runtime.WithHTTPPathPattern("/attributes/namespaces/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NamespaceService_UpdateNamespace_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_UpdateNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_NamespaceService_DeleteNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/namespaces.NamespaceService/DeleteNamespace", runtime.WithHTTPPathPattern("/attributes/namespaces/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_NamespaceService_DeleteNamespace_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_DeleteNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterNamespaceServiceHandlerFromEndpoint is same as RegisterNamespaceServiceHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterNamespaceServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.DialContext(ctx, endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterNamespaceServiceHandler(ctx, mux, conn) +} + +// RegisterNamespaceServiceHandler registers the http handlers for service NamespaceService to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterNamespaceServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterNamespaceServiceHandlerClient(ctx, mux, NewNamespaceServiceClient(conn)) +} + +// RegisterNamespaceServiceHandlerClient registers the http handlers for service NamespaceService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NamespaceServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NamespaceServiceClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "NamespaceServiceClient" to call the correct interceptors. +func RegisterNamespaceServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NamespaceServiceClient) error { + + mux.Handle("GET", pattern_NamespaceService_GetNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/namespaces.NamespaceService/GetNamespace", runtime.WithHTTPPathPattern("/attributes/namespaces/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NamespaceService_GetNamespace_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_GetNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_NamespaceService_ListNamespaces_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/namespaces.NamespaceService/ListNamespaces", runtime.WithHTTPPathPattern("/attributes/namespaces")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NamespaceService_ListNamespaces_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_ListNamespaces_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_NamespaceService_CreateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/namespaces.NamespaceService/CreateNamespace", runtime.WithHTTPPathPattern("/attributes/namespaces")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NamespaceService_CreateNamespace_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_CreateNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PUT", pattern_NamespaceService_UpdateNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/namespaces.NamespaceService/UpdateNamespace", runtime.WithHTTPPathPattern("/attributes/namespaces/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NamespaceService_UpdateNamespace_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_UpdateNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_NamespaceService_DeleteNamespace_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/namespaces.NamespaceService/DeleteNamespace", runtime.WithHTTPPathPattern("/attributes/namespaces/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_NamespaceService_DeleteNamespace_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_NamespaceService_DeleteNamespace_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_NamespaceService_GetNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"attributes", "namespaces", "id"}, "")) + + pattern_NamespaceService_ListNamespaces_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"attributes", "namespaces"}, "")) + + pattern_NamespaceService_CreateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"attributes", "namespaces"}, "")) + + pattern_NamespaceService_UpdateNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"attributes", "namespaces", "id"}, "")) + + pattern_NamespaceService_DeleteNamespace_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"attributes", "namespaces", "id"}, "")) +) + +var ( + forward_NamespaceService_GetNamespace_0 = runtime.ForwardResponseMessage + + forward_NamespaceService_ListNamespaces_0 = runtime.ForwardResponseMessage + + forward_NamespaceService_CreateNamespace_0 = runtime.ForwardResponseMessage + + forward_NamespaceService_UpdateNamespace_0 = runtime.ForwardResponseMessage + + forward_NamespaceService_DeleteNamespace_0 = runtime.ForwardResponseMessage +) diff --git a/sdk/namespaces/namespaces_grpc.pb.go b/sdk/namespaces/namespaces_grpc.pb.go new file mode 100644 index 0000000000..3a889f6148 --- /dev/null +++ b/sdk/namespaces/namespaces_grpc.pb.go @@ -0,0 +1,257 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: namespaces/namespaces.proto + +package namespaces + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + NamespaceService_GetNamespace_FullMethodName = "/namespaces.NamespaceService/GetNamespace" + NamespaceService_ListNamespaces_FullMethodName = "/namespaces.NamespaceService/ListNamespaces" + NamespaceService_CreateNamespace_FullMethodName = "/namespaces.NamespaceService/CreateNamespace" + NamespaceService_UpdateNamespace_FullMethodName = "/namespaces.NamespaceService/UpdateNamespace" + NamespaceService_DeleteNamespace_FullMethodName = "/namespaces.NamespaceService/DeleteNamespace" +) + +// NamespaceServiceClient is the client API for NamespaceService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NamespaceServiceClient interface { + GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) + ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) + CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) + UpdateNamespace(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) + DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*DeleteNamespaceResponse, error) +} + +type namespaceServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewNamespaceServiceClient(cc grpc.ClientConnInterface) NamespaceServiceClient { + return &namespaceServiceClient{cc} +} + +func (c *namespaceServiceClient) GetNamespace(ctx context.Context, in *GetNamespaceRequest, opts ...grpc.CallOption) (*GetNamespaceResponse, error) { + out := new(GetNamespaceResponse) + err := c.cc.Invoke(ctx, NamespaceService_GetNamespace_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) ListNamespaces(ctx context.Context, in *ListNamespacesRequest, opts ...grpc.CallOption) (*ListNamespacesResponse, error) { + out := new(ListNamespacesResponse) + err := c.cc.Invoke(ctx, NamespaceService_ListNamespaces_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) CreateNamespace(ctx context.Context, in *CreateNamespaceRequest, opts ...grpc.CallOption) (*CreateNamespaceResponse, error) { + out := new(CreateNamespaceResponse) + err := c.cc.Invoke(ctx, NamespaceService_CreateNamespace_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) UpdateNamespace(ctx context.Context, in *UpdateNamespaceRequest, opts ...grpc.CallOption) (*UpdateNamespaceResponse, error) { + out := new(UpdateNamespaceResponse) + err := c.cc.Invoke(ctx, NamespaceService_UpdateNamespace_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *namespaceServiceClient) DeleteNamespace(ctx context.Context, in *DeleteNamespaceRequest, opts ...grpc.CallOption) (*DeleteNamespaceResponse, error) { + out := new(DeleteNamespaceResponse) + err := c.cc.Invoke(ctx, NamespaceService_DeleteNamespace_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NamespaceServiceServer is the server API for NamespaceService service. +// All implementations must embed UnimplementedNamespaceServiceServer +// for forward compatibility +type NamespaceServiceServer interface { + GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) + ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) + CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error) + UpdateNamespace(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) + DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) + mustEmbedUnimplementedNamespaceServiceServer() +} + +// UnimplementedNamespaceServiceServer must be embedded to have forward compatible implementations. +type UnimplementedNamespaceServiceServer struct { +} + +func (UnimplementedNamespaceServiceServer) GetNamespace(context.Context, *GetNamespaceRequest) (*GetNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetNamespace not implemented") +} +func (UnimplementedNamespaceServiceServer) ListNamespaces(context.Context, *ListNamespacesRequest) (*ListNamespacesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListNamespaces not implemented") +} +func (UnimplementedNamespaceServiceServer) CreateNamespace(context.Context, *CreateNamespaceRequest) (*CreateNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateNamespace not implemented") +} +func (UnimplementedNamespaceServiceServer) UpdateNamespace(context.Context, *UpdateNamespaceRequest) (*UpdateNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateNamespace not implemented") +} +func (UnimplementedNamespaceServiceServer) DeleteNamespace(context.Context, *DeleteNamespaceRequest) (*DeleteNamespaceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteNamespace not implemented") +} +func (UnimplementedNamespaceServiceServer) mustEmbedUnimplementedNamespaceServiceServer() {} + +// UnsafeNamespaceServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NamespaceServiceServer will +// result in compilation errors. +type UnsafeNamespaceServiceServer interface { + mustEmbedUnimplementedNamespaceServiceServer() +} + +func RegisterNamespaceServiceServer(s grpc.ServiceRegistrar, srv NamespaceServiceServer) { + s.RegisterService(&NamespaceService_ServiceDesc, srv) +} + +func _NamespaceService_GetNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).GetNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_GetNamespace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).GetNamespace(ctx, req.(*GetNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_ListNamespaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListNamespacesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).ListNamespaces(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_ListNamespaces_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).ListNamespaces(ctx, req.(*ListNamespacesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_CreateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).CreateNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_CreateNamespace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).CreateNamespace(ctx, req.(*CreateNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_UpdateNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).UpdateNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_UpdateNamespace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).UpdateNamespace(ctx, req.(*UpdateNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _NamespaceService_DeleteNamespace_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteNamespaceRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NamespaceServiceServer).DeleteNamespace(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: NamespaceService_DeleteNamespace_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NamespaceServiceServer).DeleteNamespace(ctx, req.(*DeleteNamespaceRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// NamespaceService_ServiceDesc is the grpc.ServiceDesc for NamespaceService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var NamespaceService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "namespaces.NamespaceService", + HandlerType: (*NamespaceServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetNamespace", + Handler: _NamespaceService_GetNamespace_Handler, + }, + { + MethodName: "ListNamespaces", + Handler: _NamespaceService_ListNamespaces_Handler, + }, + { + MethodName: "CreateNamespace", + Handler: _NamespaceService_CreateNamespace_Handler, + }, + { + MethodName: "UpdateNamespace", + Handler: _NamespaceService_UpdateNamespace_Handler, + }, + { + MethodName: "DeleteNamespace", + Handler: _NamespaceService_DeleteNamespace_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "namespaces/namespaces.proto", +} diff --git a/sdk/resourcemapping/resource_mapping.pb.go b/sdk/resourcemapping/resource_mapping.pb.go new file mode 100644 index 0000000000..e223f07eee --- /dev/null +++ b/sdk/resourcemapping/resource_mapping.pb.go @@ -0,0 +1,1054 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: resourcemapping/resource_mapping.proto + +package resourcemapping + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + attributes "github.com/opentdf/opentdf-v2-poc/sdk/attributes" + common "github.com/opentdf/opentdf-v2-poc/sdk/common" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// # Resource Mappings (aka Access Control Resource Encodings aka ACRE): Structures supporting Resources and Attributes mappings +// +// ## Examples +// +// ### Where +// +// attributeId is an id of the following attribute +// +// FQN: http://demo.com/attr/Classification/value/Confidential +// UUID: 12345678-1234-1234-1234-123456789012 +// +// ### Request +// +// grpcurl -plaintext -d @ localhost:9000 resourcemapping.ResourceMappingService/CreateResourceMapping < common.Metadata + 13, // 1: resourcemapping.ResourceMapping.attribute_value:type_name -> attributes.Value + 14, // 2: resourcemapping.ResourceMappingCreateUpdate.metadata:type_name -> common.MetadataMutable + 0, // 3: resourcemapping.ListResourceMappingsResponse.resource_mappings:type_name -> resourcemapping.ResourceMapping + 0, // 4: resourcemapping.GetResourceMappingResponse.resource_mapping:type_name -> resourcemapping.ResourceMapping + 1, // 5: resourcemapping.CreateResourceMappingRequest.resource_mapping:type_name -> resourcemapping.ResourceMappingCreateUpdate + 0, // 6: resourcemapping.CreateResourceMappingResponse.resource_mapping:type_name -> resourcemapping.ResourceMapping + 1, // 7: resourcemapping.UpdateResourceMappingRequest.resource_mapping:type_name -> resourcemapping.ResourceMappingCreateUpdate + 0, // 8: resourcemapping.UpdateResourceMappingResponse.resource_mapping:type_name -> resourcemapping.ResourceMapping + 0, // 9: resourcemapping.DeleteResourceMappingResponse.resource_mapping:type_name -> resourcemapping.ResourceMapping + 2, // 10: resourcemapping.ResourceMappingService.ListResourceMappings:input_type -> resourcemapping.ListResourceMappingsRequest + 4, // 11: resourcemapping.ResourceMappingService.GetResourceMapping:input_type -> resourcemapping.GetResourceMappingRequest + 6, // 12: resourcemapping.ResourceMappingService.CreateResourceMapping:input_type -> resourcemapping.CreateResourceMappingRequest + 8, // 13: resourcemapping.ResourceMappingService.UpdateResourceMapping:input_type -> resourcemapping.UpdateResourceMappingRequest + 10, // 14: resourcemapping.ResourceMappingService.DeleteResourceMapping:input_type -> resourcemapping.DeleteResourceMappingRequest + 3, // 15: resourcemapping.ResourceMappingService.ListResourceMappings:output_type -> resourcemapping.ListResourceMappingsResponse + 5, // 16: resourcemapping.ResourceMappingService.GetResourceMapping:output_type -> resourcemapping.GetResourceMappingResponse + 7, // 17: resourcemapping.ResourceMappingService.CreateResourceMapping:output_type -> resourcemapping.CreateResourceMappingResponse + 9, // 18: resourcemapping.ResourceMappingService.UpdateResourceMapping:output_type -> resourcemapping.UpdateResourceMappingResponse + 11, // 19: resourcemapping.ResourceMappingService.DeleteResourceMapping:output_type -> resourcemapping.DeleteResourceMappingResponse + 15, // [15:20] is the sub-list for method output_type + 10, // [10:15] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name +} + +func init() { file_resourcemapping_resource_mapping_proto_init() } +func file_resourcemapping_resource_mapping_proto_init() { + if File_resourcemapping_resource_mapping_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_resourcemapping_resource_mapping_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceMapping); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ResourceMappingCreateUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResourceMappingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListResourceMappingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetResourceMappingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetResourceMappingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateResourceMappingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateResourceMappingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateResourceMappingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateResourceMappingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResourceMappingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_resourcemapping_resource_mapping_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteResourceMappingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_resourcemapping_resource_mapping_proto_rawDesc, + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_resourcemapping_resource_mapping_proto_goTypes, + DependencyIndexes: file_resourcemapping_resource_mapping_proto_depIdxs, + MessageInfos: file_resourcemapping_resource_mapping_proto_msgTypes, + }.Build() + File_resourcemapping_resource_mapping_proto = out.File + file_resourcemapping_resource_mapping_proto_rawDesc = nil + file_resourcemapping_resource_mapping_proto_goTypes = nil + file_resourcemapping_resource_mapping_proto_depIdxs = nil +} diff --git a/sdk/keyaccessgrants/key_access_grants.pb.gw.go b/sdk/resourcemapping/resource_mapping.pb.gw.go similarity index 52% rename from sdk/keyaccessgrants/key_access_grants.pb.gw.go rename to sdk/resourcemapping/resource_mapping.pb.gw.go index f8af68130c..13f8da8ec8 100644 --- a/sdk/keyaccessgrants/key_access_grants.pb.gw.go +++ b/sdk/resourcemapping/resource_mapping.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: keyaccessgrants/key_access_grants.proto +// source: resourcemapping/resource_mapping.proto /* -Package keyaccessgrants is a reverse proxy. +Package resourcemapping is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package keyaccessgrants +package resourcemapping import ( "context" @@ -31,44 +31,26 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -var ( - filter_KeyAccessGrantsService_ListKeyAccessGrants_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_KeyAccessGrantsService_ListKeyAccessGrants_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessGrantsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListKeyAccessGrantsRequest +func request_ResourceMappingService_ListResourceMappings_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListResourceMappingsRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KeyAccessGrantsService_ListKeyAccessGrants_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.ListKeyAccessGrants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ListResourceMappings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_KeyAccessGrantsService_ListKeyAccessGrants_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessGrantsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListKeyAccessGrantsRequest +func local_request_ResourceMappingService_ListResourceMappings_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListResourceMappingsRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_KeyAccessGrantsService_ListKeyAccessGrants_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.ListKeyAccessGrants(ctx, &protoReq) + msg, err := server.ListResourceMappings(ctx, &protoReq) return msg, metadata, err } -func request_KeyAccessGrantsService_GetKeyAccessGrant_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessGrantsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetKeyAccessGrantRequest +func request_ResourceMappingService_GetResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetResourceMappingRequest var metadata runtime.ServerMetadata var ( @@ -83,18 +65,18 @@ func request_KeyAccessGrantsService_GetKeyAccessGrant_0(ctx context.Context, mar return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.GetKeyAccessGrant(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.GetResourceMapping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_KeyAccessGrantsService_GetKeyAccessGrant_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessGrantsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetKeyAccessGrantRequest +func local_request_ResourceMappingService_GetResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetResourceMappingRequest var metadata runtime.ServerMetadata var ( @@ -109,59 +91,59 @@ func local_request_KeyAccessGrantsService_GetKeyAccessGrant_0(ctx context.Contex return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.GetKeyAccessGrant(ctx, &protoReq) + msg, err := server.GetResourceMapping(ctx, &protoReq) return msg, metadata, err } -func request_KeyAccessGrantsService_CreateKeyAccessGrants_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessGrantsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateKeyAccessGrantsRequest +func request_ResourceMappingService_CreateResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateResourceMappingRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Grants); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ResourceMapping); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.CreateKeyAccessGrants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.CreateResourceMapping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_KeyAccessGrantsService_CreateKeyAccessGrants_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessGrantsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateKeyAccessGrantsRequest +func local_request_ResourceMappingService_CreateResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateResourceMappingRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Grants); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ResourceMapping); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.CreateKeyAccessGrants(ctx, &protoReq) + msg, err := server.CreateResourceMapping(ctx, &protoReq) return msg, metadata, err } -func request_KeyAccessGrantsService_UpdateKeyAccessGrants_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessGrantsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateKeyAccessGrantsRequest +func request_ResourceMappingService_UpdateResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateResourceMappingRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Grants); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ResourceMapping); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -177,25 +159,25 @@ func request_KeyAccessGrantsService_UpdateKeyAccessGrants_0(ctx context.Context, return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.UpdateKeyAccessGrants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.UpdateResourceMapping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_KeyAccessGrantsService_UpdateKeyAccessGrants_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessGrantsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateKeyAccessGrantsRequest +func local_request_ResourceMappingService_UpdateResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateResourceMappingRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Grants); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.ResourceMapping); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -211,18 +193,18 @@ func local_request_KeyAccessGrantsService_UpdateKeyAccessGrants_0(ctx context.Co return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.UpdateKeyAccessGrants(ctx, &protoReq) + msg, err := server.UpdateResourceMapping(ctx, &protoReq) return msg, metadata, err } -func request_KeyAccessGrantsService_DeleteKeyAccessGrants_0(ctx context.Context, marshaler runtime.Marshaler, client KeyAccessGrantsServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteKeyAccessGrantsRequest +func request_ResourceMappingService_DeleteResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteResourceMappingRequest var metadata runtime.ServerMetadata var ( @@ -237,18 +219,18 @@ func request_KeyAccessGrantsService_DeleteKeyAccessGrants_0(ctx context.Context, return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := client.DeleteKeyAccessGrants(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.DeleteResourceMapping(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_KeyAccessGrantsService_DeleteKeyAccessGrants_0(ctx context.Context, marshaler runtime.Marshaler, server KeyAccessGrantsServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteKeyAccessGrantsRequest +func local_request_ResourceMappingService_DeleteResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteResourceMappingRequest var metadata runtime.ServerMetadata var ( @@ -263,23 +245,23 @@ func local_request_KeyAccessGrantsService_DeleteKeyAccessGrants_0(ctx context.Co return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } - msg, err := server.DeleteKeyAccessGrants(ctx, &protoReq) + msg, err := server.DeleteResourceMapping(ctx, &protoReq) return msg, metadata, err } -// RegisterKeyAccessGrantsServiceHandlerServer registers the http handlers for service KeyAccessGrantsService to "mux". -// UnaryRPC :call KeyAccessGrantsServiceServer directly. +// RegisterResourceMappingServiceHandlerServer registers the http handlers for service ResourceMappingService to "mux". +// UnaryRPC :call ResourceMappingServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterKeyAccessGrantsServiceHandlerFromEndpoint instead. -func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server KeyAccessGrantsServiceServer) error { +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterResourceMappingServiceHandlerFromEndpoint instead. +func RegisterResourceMappingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ResourceMappingServiceServer) error { - mux.Handle("GET", pattern_KeyAccessGrantsService_ListKeyAccessGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ResourceMappingService_ListResourceMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -287,12 +269,12 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/ListKeyAccessGrants", runtime.WithHTTPPathPattern("/v1/grants")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/ListResourceMappings", runtime.WithHTTPPathPattern("/resource-mappings")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_KeyAccessGrantsService_ListKeyAccessGrants_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ResourceMappingService_ListResourceMappings_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -300,11 +282,11 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti return } - forward_KeyAccessGrantsService_ListKeyAccessGrants_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_ListResourceMappings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_KeyAccessGrantsService_GetKeyAccessGrant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ResourceMappingService_GetResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -312,12 +294,12 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/GetKeyAccessGrant", runtime.WithHTTPPathPattern("/v1/grants/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/GetResourceMapping", runtime.WithHTTPPathPattern("/resource-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_KeyAccessGrantsService_GetKeyAccessGrant_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ResourceMappingService_GetResourceMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -325,11 +307,11 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti return } - forward_KeyAccessGrantsService_GetKeyAccessGrant_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_GetResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_KeyAccessGrantsService_CreateKeyAccessGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ResourceMappingService_CreateResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -337,12 +319,12 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/CreateKeyAccessGrants", runtime.WithHTTPPathPattern("/v1/grants")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/CreateResourceMapping", runtime.WithHTTPPathPattern("/resource-mappings")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_KeyAccessGrantsService_CreateKeyAccessGrants_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ResourceMappingService_CreateResourceMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -350,11 +332,11 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti return } - forward_KeyAccessGrantsService_CreateKeyAccessGrants_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_CreateResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_KeyAccessGrantsService_UpdateKeyAccessGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ResourceMappingService_UpdateResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -362,12 +344,12 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/UpdateKeyAccessGrants", runtime.WithHTTPPathPattern("/v1/grants/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/UpdateResourceMapping", runtime.WithHTTPPathPattern("/resource-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_KeyAccessGrantsService_UpdateKeyAccessGrants_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ResourceMappingService_UpdateResourceMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -375,11 +357,11 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti return } - forward_KeyAccessGrantsService_UpdateKeyAccessGrants_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_UpdateResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_KeyAccessGrantsService_DeleteKeyAccessGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ResourceMappingService_DeleteResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -387,12 +369,12 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/DeleteKeyAccessGrants", runtime.WithHTTPPathPattern("/v1/grants/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/DeleteResourceMapping", runtime.WithHTTPPathPattern("/resource-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_KeyAccessGrantsService_DeleteKeyAccessGrants_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ResourceMappingService_DeleteResourceMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -400,16 +382,16 @@ func RegisterKeyAccessGrantsServiceHandlerServer(ctx context.Context, mux *runti return } - forward_KeyAccessGrantsService_DeleteKeyAccessGrants_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_DeleteResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } -// RegisterKeyAccessGrantsServiceHandlerFromEndpoint is same as RegisterKeyAccessGrantsServiceHandler but +// RegisterResourceMappingServiceHandlerFromEndpoint is same as RegisterResourceMappingServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterKeyAccessGrantsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterResourceMappingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err @@ -429,129 +411,129 @@ func RegisterKeyAccessGrantsServiceHandlerFromEndpoint(ctx context.Context, mux }() }() - return RegisterKeyAccessGrantsServiceHandler(ctx, mux, conn) + return RegisterResourceMappingServiceHandler(ctx, mux, conn) } -// RegisterKeyAccessGrantsServiceHandler registers the http handlers for service KeyAccessGrantsService to "mux". +// RegisterResourceMappingServiceHandler registers the http handlers for service ResourceMappingService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterKeyAccessGrantsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterKeyAccessGrantsServiceHandlerClient(ctx, mux, NewKeyAccessGrantsServiceClient(conn)) +func RegisterResourceMappingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterResourceMappingServiceHandlerClient(ctx, mux, NewResourceMappingServiceClient(conn)) } -// RegisterKeyAccessGrantsServiceHandlerClient registers the http handlers for service KeyAccessGrantsService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "KeyAccessGrantsServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "KeyAccessGrantsServiceClient" +// RegisterResourceMappingServiceHandlerClient registers the http handlers for service ResourceMappingService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ResourceMappingServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ResourceMappingServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "KeyAccessGrantsServiceClient" to call the correct interceptors. -func RegisterKeyAccessGrantsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client KeyAccessGrantsServiceClient) error { +// "ResourceMappingServiceClient" to call the correct interceptors. +func RegisterResourceMappingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ResourceMappingServiceClient) error { - mux.Handle("GET", pattern_KeyAccessGrantsService_ListKeyAccessGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ResourceMappingService_ListResourceMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/ListKeyAccessGrants", runtime.WithHTTPPathPattern("/v1/grants")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/ListResourceMappings", runtime.WithHTTPPathPattern("/resource-mappings")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_KeyAccessGrantsService_ListKeyAccessGrants_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ResourceMappingService_ListResourceMappings_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_KeyAccessGrantsService_ListKeyAccessGrants_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_ListResourceMappings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_KeyAccessGrantsService_GetKeyAccessGrant_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_ResourceMappingService_GetResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/GetKeyAccessGrant", runtime.WithHTTPPathPattern("/v1/grants/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/GetResourceMapping", runtime.WithHTTPPathPattern("/resource-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_KeyAccessGrantsService_GetKeyAccessGrant_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ResourceMappingService_GetResourceMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_KeyAccessGrantsService_GetKeyAccessGrant_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_GetResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_KeyAccessGrantsService_CreateKeyAccessGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ResourceMappingService_CreateResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/CreateKeyAccessGrants", runtime.WithHTTPPathPattern("/v1/grants")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/CreateResourceMapping", runtime.WithHTTPPathPattern("/resource-mappings")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_KeyAccessGrantsService_CreateKeyAccessGrants_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ResourceMappingService_CreateResourceMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_KeyAccessGrantsService_CreateKeyAccessGrants_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_CreateResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("PUT", pattern_KeyAccessGrantsService_UpdateKeyAccessGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_ResourceMappingService_UpdateResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/UpdateKeyAccessGrants", runtime.WithHTTPPathPattern("/v1/grants/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/UpdateResourceMapping", runtime.WithHTTPPathPattern("/resource-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_KeyAccessGrantsService_UpdateKeyAccessGrants_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ResourceMappingService_UpdateResourceMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_KeyAccessGrantsService_UpdateKeyAccessGrants_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_UpdateResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_KeyAccessGrantsService_DeleteKeyAccessGrants_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_ResourceMappingService_DeleteResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/keyaccessgrants.KeyAccessGrantsService/DeleteKeyAccessGrants", runtime.WithHTTPPathPattern("/v1/grants/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/resourcemapping.ResourceMappingService/DeleteResourceMapping", runtime.WithHTTPPathPattern("/resource-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_KeyAccessGrantsService_DeleteKeyAccessGrants_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_ResourceMappingService_DeleteResourceMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_KeyAccessGrantsService_DeleteKeyAccessGrants_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ResourceMappingService_DeleteResourceMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -559,25 +541,25 @@ func RegisterKeyAccessGrantsServiceHandlerClient(ctx context.Context, mux *runti } var ( - pattern_KeyAccessGrantsService_ListKeyAccessGrants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "grants"}, "")) + pattern_ResourceMappingService_ListResourceMappings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"resource-mappings"}, "")) - pattern_KeyAccessGrantsService_GetKeyAccessGrant_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "grants", "id"}, "")) + pattern_ResourceMappingService_GetResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"resource-mappings", "id"}, "")) - pattern_KeyAccessGrantsService_CreateKeyAccessGrants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "grants"}, "")) + pattern_ResourceMappingService_CreateResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"resource-mappings"}, "")) - pattern_KeyAccessGrantsService_UpdateKeyAccessGrants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "grants", "id"}, "")) + pattern_ResourceMappingService_UpdateResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"resource-mappings", "id"}, "")) - pattern_KeyAccessGrantsService_DeleteKeyAccessGrants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "grants", "id"}, "")) + pattern_ResourceMappingService_DeleteResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"resource-mappings", "id"}, "")) ) var ( - forward_KeyAccessGrantsService_ListKeyAccessGrants_0 = runtime.ForwardResponseMessage + forward_ResourceMappingService_ListResourceMappings_0 = runtime.ForwardResponseMessage - forward_KeyAccessGrantsService_GetKeyAccessGrant_0 = runtime.ForwardResponseMessage + forward_ResourceMappingService_GetResourceMapping_0 = runtime.ForwardResponseMessage - forward_KeyAccessGrantsService_CreateKeyAccessGrants_0 = runtime.ForwardResponseMessage + forward_ResourceMappingService_CreateResourceMapping_0 = runtime.ForwardResponseMessage - forward_KeyAccessGrantsService_UpdateKeyAccessGrants_0 = runtime.ForwardResponseMessage + forward_ResourceMappingService_UpdateResourceMapping_0 = runtime.ForwardResponseMessage - forward_KeyAccessGrantsService_DeleteKeyAccessGrants_0 = runtime.ForwardResponseMessage + forward_ResourceMappingService_DeleteResourceMapping_0 = runtime.ForwardResponseMessage ) diff --git a/sdk/resourcemapping/resource_mapping_grpc.pb.go b/sdk/resourcemapping/resource_mapping_grpc.pb.go new file mode 100644 index 0000000000..9908641f7e --- /dev/null +++ b/sdk/resourcemapping/resource_mapping_grpc.pb.go @@ -0,0 +1,626 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: resourcemapping/resource_mapping.proto + +package resourcemapping + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + ResourceMappingService_ListResourceMappings_FullMethodName = "/resourcemapping.ResourceMappingService/ListResourceMappings" + ResourceMappingService_GetResourceMapping_FullMethodName = "/resourcemapping.ResourceMappingService/GetResourceMapping" + ResourceMappingService_CreateResourceMapping_FullMethodName = "/resourcemapping.ResourceMappingService/CreateResourceMapping" + ResourceMappingService_UpdateResourceMapping_FullMethodName = "/resourcemapping.ResourceMappingService/UpdateResourceMapping" + ResourceMappingService_DeleteResourceMapping_FullMethodName = "/resourcemapping.ResourceMappingService/DeleteResourceMapping" +) + +// ResourceMappingServiceClient is the client API for ResourceMappingService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type ResourceMappingServiceClient interface { + // Request Example: + // - empty body + // + // Response Example: + // { + // "resource_mappings": [ + // { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // ] + // } + ListResourceMappings(ctx context.Context, in *ListResourceMappingsRequest, opts ...grpc.CallOption) (*ListResourceMappingsResponse, error) + // Request Example: + // { + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" + // } + // + // Response Example: + // { + // "resource_mapping": { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // } + GetResourceMapping(ctx context.Context, in *GetResourceMappingRequest, opts ...grpc.CallOption) (*GetResourceMappingResponse, error) + // Request Example: + // { + // "resource_mapping": { + // "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "terms": [ + // "TOPSECRET", + // "TS", + // ] + // } + // } + // + // Response Example: + // { + // "resource_mapping": { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // } + CreateResourceMapping(ctx context.Context, in *CreateResourceMappingRequest, opts ...grpc.CallOption) (*CreateResourceMappingResponse, error) + // Request Example: + // { + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "resource_mapping": { + // "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "terms": [ + // "TOPSECRET", + // "TS", + // "NEWTERM" + // ] + // } + // } + // + // Response Example: + // { + // "resource_mapping": { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // } + UpdateResourceMapping(ctx context.Context, in *UpdateResourceMappingRequest, opts ...grpc.CallOption) (*UpdateResourceMappingResponse, error) + // Request Example: + // { + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" + // } + // + // Response Example: + // { + // "resource_mapping": { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // } + DeleteResourceMapping(ctx context.Context, in *DeleteResourceMappingRequest, opts ...grpc.CallOption) (*DeleteResourceMappingResponse, error) +} + +type resourceMappingServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewResourceMappingServiceClient(cc grpc.ClientConnInterface) ResourceMappingServiceClient { + return &resourceMappingServiceClient{cc} +} + +func (c *resourceMappingServiceClient) ListResourceMappings(ctx context.Context, in *ListResourceMappingsRequest, opts ...grpc.CallOption) (*ListResourceMappingsResponse, error) { + out := new(ListResourceMappingsResponse) + err := c.cc.Invoke(ctx, ResourceMappingService_ListResourceMappings_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *resourceMappingServiceClient) GetResourceMapping(ctx context.Context, in *GetResourceMappingRequest, opts ...grpc.CallOption) (*GetResourceMappingResponse, error) { + out := new(GetResourceMappingResponse) + err := c.cc.Invoke(ctx, ResourceMappingService_GetResourceMapping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *resourceMappingServiceClient) CreateResourceMapping(ctx context.Context, in *CreateResourceMappingRequest, opts ...grpc.CallOption) (*CreateResourceMappingResponse, error) { + out := new(CreateResourceMappingResponse) + err := c.cc.Invoke(ctx, ResourceMappingService_CreateResourceMapping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *resourceMappingServiceClient) UpdateResourceMapping(ctx context.Context, in *UpdateResourceMappingRequest, opts ...grpc.CallOption) (*UpdateResourceMappingResponse, error) { + out := new(UpdateResourceMappingResponse) + err := c.cc.Invoke(ctx, ResourceMappingService_UpdateResourceMapping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *resourceMappingServiceClient) DeleteResourceMapping(ctx context.Context, in *DeleteResourceMappingRequest, opts ...grpc.CallOption) (*DeleteResourceMappingResponse, error) { + out := new(DeleteResourceMappingResponse) + err := c.cc.Invoke(ctx, ResourceMappingService_DeleteResourceMapping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// ResourceMappingServiceServer is the server API for ResourceMappingService service. +// All implementations must embed UnimplementedResourceMappingServiceServer +// for forward compatibility +type ResourceMappingServiceServer interface { + // Request Example: + // - empty body + // + // Response Example: + // { + // "resource_mappings": [ + // { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // ] + // } + ListResourceMappings(context.Context, *ListResourceMappingsRequest) (*ListResourceMappingsResponse, error) + // Request Example: + // { + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" + // } + // + // Response Example: + // { + // "resource_mapping": { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // } + GetResourceMapping(context.Context, *GetResourceMappingRequest) (*GetResourceMappingResponse, error) + // Request Example: + // { + // "resource_mapping": { + // "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "terms": [ + // "TOPSECRET", + // "TS", + // ] + // } + // } + // + // Response Example: + // { + // "resource_mapping": { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // } + CreateResourceMapping(context.Context, *CreateResourceMappingRequest) (*CreateResourceMappingResponse, error) + // Request Example: + // { + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "resource_mapping": { + // "attribute_value_id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "terms": [ + // "TOPSECRET", + // "TS", + // "NEWTERM" + // ] + // } + // } + // + // Response Example: + // { + // "resource_mapping": { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // } + UpdateResourceMapping(context.Context, *UpdateResourceMappingRequest) (*UpdateResourceMappingResponse, error) + // Request Example: + // { + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e" + // } + // + // Response Example: + // { + // "resource_mapping": { + // "terms": [ + // "TOPSECRET", + // "TS", + // ], + // "id": "3c649464-95b4-4fe0-a09c-ca4b1fecbb0e", + // "metadata": { + // "labels": [], + // "created_at": { + // "seconds": "1706103276", + // "nanos": 510718000 + // }, + // "updated_at": { + // "seconds": "1706107873", + // "nanos": 399786000 + // }, + // "description": "" + // }, + // "attribute_value": { + // "members": [], + // "id": "f0d1d4f6-bff9-45fd-8170-607b6b559349", + // "metadata": null, + // "attribute_id": "", + // "value": "value1" + // } + // } + // } + DeleteResourceMapping(context.Context, *DeleteResourceMappingRequest) (*DeleteResourceMappingResponse, error) + mustEmbedUnimplementedResourceMappingServiceServer() +} + +// UnimplementedResourceMappingServiceServer must be embedded to have forward compatible implementations. +type UnimplementedResourceMappingServiceServer struct { +} + +func (UnimplementedResourceMappingServiceServer) ListResourceMappings(context.Context, *ListResourceMappingsRequest) (*ListResourceMappingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListResourceMappings not implemented") +} +func (UnimplementedResourceMappingServiceServer) GetResourceMapping(context.Context, *GetResourceMappingRequest) (*GetResourceMappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetResourceMapping not implemented") +} +func (UnimplementedResourceMappingServiceServer) CreateResourceMapping(context.Context, *CreateResourceMappingRequest) (*CreateResourceMappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateResourceMapping not implemented") +} +func (UnimplementedResourceMappingServiceServer) UpdateResourceMapping(context.Context, *UpdateResourceMappingRequest) (*UpdateResourceMappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateResourceMapping not implemented") +} +func (UnimplementedResourceMappingServiceServer) DeleteResourceMapping(context.Context, *DeleteResourceMappingRequest) (*DeleteResourceMappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteResourceMapping not implemented") +} +func (UnimplementedResourceMappingServiceServer) mustEmbedUnimplementedResourceMappingServiceServer() { +} + +// UnsafeResourceMappingServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to ResourceMappingServiceServer will +// result in compilation errors. +type UnsafeResourceMappingServiceServer interface { + mustEmbedUnimplementedResourceMappingServiceServer() +} + +func RegisterResourceMappingServiceServer(s grpc.ServiceRegistrar, srv ResourceMappingServiceServer) { + s.RegisterService(&ResourceMappingService_ServiceDesc, srv) +} + +func _ResourceMappingService_ListResourceMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListResourceMappingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourceMappingServiceServer).ListResourceMappings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ResourceMappingService_ListResourceMappings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourceMappingServiceServer).ListResourceMappings(ctx, req.(*ListResourceMappingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ResourceMappingService_GetResourceMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetResourceMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourceMappingServiceServer).GetResourceMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ResourceMappingService_GetResourceMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourceMappingServiceServer).GetResourceMapping(ctx, req.(*GetResourceMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ResourceMappingService_CreateResourceMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateResourceMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourceMappingServiceServer).CreateResourceMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ResourceMappingService_CreateResourceMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourceMappingServiceServer).CreateResourceMapping(ctx, req.(*CreateResourceMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ResourceMappingService_UpdateResourceMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateResourceMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourceMappingServiceServer).UpdateResourceMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ResourceMappingService_UpdateResourceMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourceMappingServiceServer).UpdateResourceMapping(ctx, req.(*UpdateResourceMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _ResourceMappingService_DeleteResourceMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteResourceMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ResourceMappingServiceServer).DeleteResourceMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ResourceMappingService_DeleteResourceMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ResourceMappingServiceServer).DeleteResourceMapping(ctx, req.(*DeleteResourceMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// ResourceMappingService_ServiceDesc is the grpc.ServiceDesc for ResourceMappingService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var ResourceMappingService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "resourcemapping.ResourceMappingService", + HandlerType: (*ResourceMappingServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListResourceMappings", + Handler: _ResourceMappingService_ListResourceMappings_Handler, + }, + { + MethodName: "GetResourceMapping", + Handler: _ResourceMappingService_GetResourceMapping_Handler, + }, + { + MethodName: "CreateResourceMapping", + Handler: _ResourceMappingService_CreateResourceMapping_Handler, + }, + { + MethodName: "UpdateResourceMapping", + Handler: _ResourceMappingService_UpdateResourceMapping_Handler, + }, + { + MethodName: "DeleteResourceMapping", + Handler: _ResourceMappingService_DeleteResourceMapping_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "resourcemapping/resource_mapping.proto", +} diff --git a/sdk/sdk.go b/sdk/sdk.go index 3d11f8b1ca..445e896b6a 100644 --- a/sdk/sdk.go +++ b/sdk/sdk.go @@ -3,10 +3,11 @@ package sdk import ( "errors" - "github.com/opentdf/opentdf-v2-poc/sdk/acre" - "github.com/opentdf/opentdf-v2-poc/sdk/acse" "github.com/opentdf/opentdf-v2-poc/sdk/attributes" - "github.com/opentdf/opentdf-v2-poc/sdk/keyaccessgrants" + "github.com/opentdf/opentdf-v2-poc/sdk/kasregistry" + "github.com/opentdf/opentdf-v2-poc/sdk/namespaces" + "github.com/opentdf/opentdf-v2-poc/sdk/resourcemapping" + "github.com/opentdf/opentdf-v2-poc/sdk/subjectmapping" "google.golang.org/grpc" "google.golang.org/grpc/credentials" ) @@ -23,11 +24,12 @@ func (c Error) Error() string { } type SDK struct { - conn *grpc.ClientConn - Attributes attributes.AttributesServiceClient - ResourceEncoding acre.ResourcEncodingServiceClient - SubjectEncoding acse.SubjectEncodingServiceClient - KeyAccessGrants keyaccessgrants.KeyAccessGrantsServiceClient + conn *grpc.ClientConn + Namespaces namespaces.NamespaceServiceClient + Attributes attributes.AttributesServiceClient + ResourceMapping resourcemapping.ResourceMappingServiceClient + SubjectMapping subjectmapping.SubjectMappingServiceClient + KeyAccessServerRegistry kasregistry.KeyAccessServerRegistryServiceClient } func New(platformEndpoint string, opts ...Option) (*SDK, error) { @@ -46,17 +48,14 @@ func New(platformEndpoint string, opts ...Option) (*SDK, error) { return nil, errors.Join(ErrGrpcDialFailed, err) } - return newSDK(conn), nil -} - -func newSDK(conn *grpc.ClientConn) *SDK { return &SDK{ - conn: conn, - Attributes: attributes.NewAttributesServiceClient(conn), - ResourceEncoding: acre.NewResourcEncodingServiceClient(conn), - SubjectEncoding: acse.NewSubjectEncodingServiceClient(conn), - KeyAccessGrants: keyaccessgrants.NewKeyAccessGrantsServiceClient(conn), - } + conn: conn, + Attributes: attributes.NewAttributesServiceClient(conn), + Namespaces: namespaces.NewNamespaceServiceClient(conn), + ResourceMapping: resourcemapping.NewResourceMappingServiceClient(conn), + SubjectMapping: subjectmapping.NewSubjectMappingServiceClient(conn), + KeyAccessServerRegistry: kasregistry.NewKeyAccessServerRegistryServiceClient(conn), + }, nil } // Close closes the underlying grpc.ClientConn. diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go index a08c1e2aaa..0ef1fec9f3 100644 --- a/sdk/sdk_test.go +++ b/sdk/sdk_test.go @@ -5,10 +5,10 @@ import ( "testing" "github.com/opentdf/opentdf-v2-poc/sdk" - "github.com/opentdf/opentdf-v2-poc/sdk/acre" - "github.com/opentdf/opentdf-v2-poc/sdk/acse" "github.com/opentdf/opentdf-v2-poc/sdk/attributes" - "github.com/opentdf/opentdf-v2-poc/sdk/keyaccessgrants" + "github.com/opentdf/opentdf-v2-poc/sdk/keyaccessserverregistry" + "github.com/opentdf/opentdf-v2-poc/sdk/resourcemapping" + "github.com/opentdf/opentdf-v2-poc/sdk/subjectmapping" ) var goodPlatformEndpoint = "localhost:9000" @@ -37,13 +37,13 @@ func Test_ShouldCreateNewSDK(t *testing.T) { if sdk.Attributes == nil { t.Errorf("Expected Attributes client, got nil") } - if sdk.ResourceEncoding == nil { + if sdk.ResourceMapping == nil { t.Errorf("Expected ResourceEncoding client, got nil") } - if sdk.SubjectEncoding == nil { + if sdk.SubjectMapping == nil { t.Errorf("Expected SubjectEncoding client, got nil") } - if sdk.KeyAccessGrants == nil { + if sdk.KeyAccessServerRegistry == nil { t.Errorf("Expected KeyAccessGrants client, got nil") } } @@ -81,18 +81,18 @@ func Test_ShouldHaveSameMethods(t *testing.T) { }, { name: "ResourceEncoding", - expected: GetMethods(reflect.TypeOf(acre.NewResourcEncodingServiceClient(sdk.Conn()))), - actual: GetMethods(reflect.TypeOf(sdk.ResourceEncoding)), + expected: GetMethods(reflect.TypeOf(resourcemapping.NewResourceMappingServiceClient(sdk.Conn()))), + actual: GetMethods(reflect.TypeOf(sdk.ResourceMapping)), }, { name: "SubjectEncoding", - expected: GetMethods(reflect.TypeOf(acse.NewSubjectEncodingServiceClient(sdk.Conn()))), - actual: GetMethods(reflect.TypeOf(sdk.SubjectEncoding)), + expected: GetMethods(reflect.TypeOf(subjectmapping.NewSubjectMappingServiceClient(sdk.Conn()))), + actual: GetMethods(reflect.TypeOf(sdk.SubjectMapping)), }, { name: "KeyAccessGrants", - expected: GetMethods(reflect.TypeOf(keyaccessgrants.NewKeyAccessGrantsServiceClient(sdk.Conn()))), - actual: GetMethods(reflect.TypeOf(sdk.KeyAccessGrants)), + expected: GetMethods(reflect.TypeOf(keyaccessserverregistry.NewKeyAccessServerRegistryServiceClient(sdk.Conn()))), + actual: GetMethods(reflect.TypeOf(sdk.KeyAccessServerRegistry)), }, } diff --git a/sdk/subjectmapping/subject_mapping.pb.go b/sdk/subjectmapping/subject_mapping.pb.go new file mode 100644 index 0000000000..2212c4764f --- /dev/null +++ b/sdk/subjectmapping/subject_mapping.pb.go @@ -0,0 +1,1135 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: subjectmapping/subject_mapping.proto + +package subjectmapping + +import ( + _ "buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go/buf/validate" + attributes "github.com/opentdf/opentdf-v2-poc/sdk/attributes" + common "github.com/opentdf/opentdf-v2-poc/sdk/common" + _ "google.golang.org/genproto/googleapis/api/annotations" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package +type SubjectMappingOperatorEnum int32 + +const ( + SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED SubjectMappingOperatorEnum = 0 + SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN SubjectMappingOperatorEnum = 1 + SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN SubjectMappingOperatorEnum = 2 +) + +// Enum value maps for SubjectMappingOperatorEnum. +var ( + SubjectMappingOperatorEnum_name = map[int32]string{ + 0: "SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED", + 1: "SUBJECT_MAPPING_OPERATOR_ENUM_IN", + 2: "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", + } + SubjectMappingOperatorEnum_value = map[string]int32{ + "SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED": 0, + "SUBJECT_MAPPING_OPERATOR_ENUM_IN": 1, + "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN": 2, + } +) + +func (x SubjectMappingOperatorEnum) Enum() *SubjectMappingOperatorEnum { + p := new(SubjectMappingOperatorEnum) + *p = x + return p +} + +func (x SubjectMappingOperatorEnum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SubjectMappingOperatorEnum) Descriptor() protoreflect.EnumDescriptor { + return file_subjectmapping_subject_mapping_proto_enumTypes[0].Descriptor() +} + +func (SubjectMappingOperatorEnum) Type() protoreflect.EnumType { + return &file_subjectmapping_subject_mapping_proto_enumTypes[0] +} + +func (x SubjectMappingOperatorEnum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SubjectMappingOperatorEnum.Descriptor instead. +func (SubjectMappingOperatorEnum) EnumDescriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{0} +} + +type SubjectMapping struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Metadata *common.Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` //TODO should this be a list of values? + // Attribute Value to be mapped to + AttributeValue *attributes.Value `protobuf:"bytes,3,opt,name=attribute_value,json=attributeValue,proto3" json:"attribute_value,omitempty"` + // Resource Attribute Key; NOT Attribute Definition Attribute name + SubjectAttribute string `protobuf:"bytes,4,opt,name=subject_attribute,json=subjectAttribute,proto3" json:"subject_attribute,omitempty"` + // The list of comparison values for a resource's value + SubjectValues []string `protobuf:"bytes,5,rep,name=subject_values,json=subjectValues,proto3" json:"subject_values,omitempty"` + // the operator + Operator SubjectMappingOperatorEnum `protobuf:"varint,6,opt,name=operator,proto3,enum=subjectmapping.SubjectMappingOperatorEnum" json:"operator,omitempty"` +} + +func (x *SubjectMapping) Reset() { + *x = SubjectMapping{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectMapping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectMapping) ProtoMessage() {} + +func (x *SubjectMapping) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectMapping.ProtoReflect.Descriptor instead. +func (*SubjectMapping) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{0} +} + +func (x *SubjectMapping) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SubjectMapping) GetMetadata() *common.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *SubjectMapping) GetAttributeValue() *attributes.Value { + if x != nil { + return x.AttributeValue + } + return nil +} + +func (x *SubjectMapping) GetSubjectAttribute() string { + if x != nil { + return x.SubjectAttribute + } + return "" +} + +func (x *SubjectMapping) GetSubjectValues() []string { + if x != nil { + return x.SubjectValues + } + return nil +} + +func (x *SubjectMapping) GetOperator() SubjectMappingOperatorEnum { + if x != nil { + return x.Operator + } + return SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED +} + +type SubjectMappingCreateUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Attribute Value to be mapped to + AttributeValueId string `protobuf:"bytes,2,opt,name=attribute_value_id,json=attributeValueId,proto3" json:"attribute_value_id,omitempty"` + // Resource Attribute Key; NOT Attribute Definition Attribute name + SubjectAttribute string `protobuf:"bytes,3,opt,name=subject_attribute,json=subjectAttribute,proto3" json:"subject_attribute,omitempty"` + // The list of comparison values for a resource's value + SubjectValues []string `protobuf:"bytes,4,rep,name=subject_values,json=subjectValues,proto3" json:"subject_values,omitempty"` + // the operator + Operator SubjectMappingOperatorEnum `protobuf:"varint,5,opt,name=operator,proto3,enum=subjectmapping.SubjectMappingOperatorEnum" json:"operator,omitempty"` +} + +func (x *SubjectMappingCreateUpdate) Reset() { + *x = SubjectMappingCreateUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectMappingCreateUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectMappingCreateUpdate) ProtoMessage() {} + +func (x *SubjectMappingCreateUpdate) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectMappingCreateUpdate.ProtoReflect.Descriptor instead. +func (*SubjectMappingCreateUpdate) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{1} +} + +func (x *SubjectMappingCreateUpdate) GetMetadata() *common.MetadataMutable { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *SubjectMappingCreateUpdate) GetAttributeValueId() string { + if x != nil { + return x.AttributeValueId + } + return "" +} + +func (x *SubjectMappingCreateUpdate) GetSubjectAttribute() string { + if x != nil { + return x.SubjectAttribute + } + return "" +} + +func (x *SubjectMappingCreateUpdate) GetSubjectValues() []string { + if x != nil { + return x.SubjectValues + } + return nil +} + +func (x *SubjectMappingCreateUpdate) GetOperator() SubjectMappingOperatorEnum { + if x != nil { + return x.Operator + } + return SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED +} + +type GetSubjectMappingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetSubjectMappingRequest) Reset() { + *x = GetSubjectMappingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubjectMappingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubjectMappingRequest) ProtoMessage() {} + +func (x *GetSubjectMappingRequest) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubjectMappingRequest.ProtoReflect.Descriptor instead. +func (*GetSubjectMappingRequest) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{2} +} + +func (x *GetSubjectMappingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetSubjectMappingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` +} + +func (x *GetSubjectMappingResponse) Reset() { + *x = GetSubjectMappingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubjectMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubjectMappingResponse) ProtoMessage() {} + +func (x *GetSubjectMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubjectMappingResponse.ProtoReflect.Descriptor instead. +func (*GetSubjectMappingResponse) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{3} +} + +func (x *GetSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { + if x != nil { + return x.SubjectMapping + } + return nil +} + +type ListSubjectMappingsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListSubjectMappingsRequest) Reset() { + *x = ListSubjectMappingsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubjectMappingsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubjectMappingsRequest) ProtoMessage() {} + +func (x *ListSubjectMappingsRequest) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubjectMappingsRequest.ProtoReflect.Descriptor instead. +func (*ListSubjectMappingsRequest) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{4} +} + +type ListSubjectMappingsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectMappings []*SubjectMapping `protobuf:"bytes,1,rep,name=subject_mappings,json=subjectMappings,proto3" json:"subject_mappings,omitempty"` +} + +func (x *ListSubjectMappingsResponse) Reset() { + *x = ListSubjectMappingsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubjectMappingsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubjectMappingsResponse) ProtoMessage() {} + +func (x *ListSubjectMappingsResponse) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubjectMappingsResponse.ProtoReflect.Descriptor instead. +func (*ListSubjectMappingsResponse) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{5} +} + +func (x *ListSubjectMappingsResponse) GetSubjectMappings() []*SubjectMapping { + if x != nil { + return x.SubjectMappings + } + return nil +} + +type CreateSubjectMappingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectMapping *SubjectMappingCreateUpdate `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` +} + +func (x *CreateSubjectMappingRequest) Reset() { + *x = CreateSubjectMappingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSubjectMappingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSubjectMappingRequest) ProtoMessage() {} + +func (x *CreateSubjectMappingRequest) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSubjectMappingRequest.ProtoReflect.Descriptor instead. +func (*CreateSubjectMappingRequest) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{6} +} + +func (x *CreateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingCreateUpdate { + if x != nil { + return x.SubjectMapping + } + return nil +} + +type CreateSubjectMappingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` +} + +func (x *CreateSubjectMappingResponse) Reset() { + *x = CreateSubjectMappingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSubjectMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSubjectMappingResponse) ProtoMessage() {} + +func (x *CreateSubjectMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSubjectMappingResponse.ProtoReflect.Descriptor instead. +func (*CreateSubjectMappingResponse) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{7} +} + +func (x *CreateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { + if x != nil { + return x.SubjectMapping + } + return nil +} + +type UpdateSubjectMappingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SubjectMapping *SubjectMappingCreateUpdate `protobuf:"bytes,2,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` +} + +func (x *UpdateSubjectMappingRequest) Reset() { + *x = UpdateSubjectMappingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSubjectMappingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSubjectMappingRequest) ProtoMessage() {} + +func (x *UpdateSubjectMappingRequest) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSubjectMappingRequest.ProtoReflect.Descriptor instead. +func (*UpdateSubjectMappingRequest) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{8} +} + +func (x *UpdateSubjectMappingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingCreateUpdate { + if x != nil { + return x.SubjectMapping + } + return nil +} + +type UpdateSubjectMappingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` +} + +func (x *UpdateSubjectMappingResponse) Reset() { + *x = UpdateSubjectMappingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSubjectMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSubjectMappingResponse) ProtoMessage() {} + +func (x *UpdateSubjectMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSubjectMappingResponse.ProtoReflect.Descriptor instead. +func (*UpdateSubjectMappingResponse) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { + if x != nil { + return x.SubjectMapping + } + return nil +} + +type DeleteSubjectMappingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteSubjectMappingRequest) Reset() { + *x = DeleteSubjectMappingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSubjectMappingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSubjectMappingRequest) ProtoMessage() {} + +func (x *DeleteSubjectMappingRequest) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSubjectMappingRequest.ProtoReflect.Descriptor instead. +func (*DeleteSubjectMappingRequest) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{10} +} + +func (x *DeleteSubjectMappingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteSubjectMappingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` +} + +func (x *DeleteSubjectMappingResponse) Reset() { + *x = DeleteSubjectMappingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSubjectMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSubjectMappingResponse) ProtoMessage() {} + +func (x *DeleteSubjectMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_subjectmapping_subject_mapping_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSubjectMappingResponse.ProtoReflect.Descriptor instead. +func (*DeleteSubjectMappingResponse) Descriptor() ([]byte, []int) { + return file_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{11} +} + +func (x *DeleteSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { + if x != nil { + return x.SubjectMapping + } + return nil +} + +var File_subjectmapping_subject_mapping_proto protoreflect.FileDescriptor + +var file_subjectmapping_subject_mapping_proto_rawDesc = []byte{ + 0x0a, 0x24, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x1a, 0x1b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x73, 0x2f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x62, 0x75, 0x66, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x22, 0xb3, 0x02, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, + 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x3a, 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x52, 0x0e, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, + 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x12, 0x53, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, + 0x75, 0x6d, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, + 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x22, 0xa8, 0x02, 0x0a, 0x1a, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4d, 0x75, 0x74, 0x61, + 0x62, 0x6c, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2c, 0x0a, + 0x12, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61, 0x74, 0x74, 0x72, 0x69, + 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, + 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x0d, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x53, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x2a, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0b, 0xba, + 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x08, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x22, 0x32, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, + 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x64, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x1c, + 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x68, 0x0a, 0x1b, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x10, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x7a, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5b, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, + 0x01, 0x01, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x22, 0x67, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x92, 0x01, 0x0a, 0x1b, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x5b, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, + 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x22, 0x67, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x47, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x35, 0x0a, 0x1b, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x67, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x47, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2a, 0x9b, 0x01, 0x0a, 0x1a, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x2d, 0x0a, 0x29, 0x53, 0x55, 0x42, 0x4a, + 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x50, 0x45, 0x52, + 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a, 0x20, 0x53, 0x55, 0x42, 0x4a, 0x45, + 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, + 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x28, 0x0a, + 0x24, 0x53, 0x55, 0x42, 0x4a, 0x45, 0x43, 0x54, 0x5f, 0x4d, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, + 0x5f, 0x4f, 0x50, 0x45, 0x52, 0x41, 0x54, 0x4f, 0x52, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4e, + 0x4f, 0x54, 0x5f, 0x49, 0x4e, 0x10, 0x02, 0x32, 0x87, 0x06, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x89, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x2a, 0x2e, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x88, 0x01, + 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x12, 0x28, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, + 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x12, 0x2b, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x24, 0x3a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x12, 0x2b, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, + 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x29, 0x3a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x91, 0x01, + 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x2b, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x2a, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x42, 0xb7, 0x01, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x42, 0x13, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, + 0x74, 0x64, 0x66, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2d, 0x76, 0x32, 0x2d, 0x70, + 0x6f, 0x63, 0x2f, 0x73, 0x64, 0x6b, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x0e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x0e, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x1a, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, +} + +var ( + file_subjectmapping_subject_mapping_proto_rawDescOnce sync.Once + file_subjectmapping_subject_mapping_proto_rawDescData = file_subjectmapping_subject_mapping_proto_rawDesc +) + +func file_subjectmapping_subject_mapping_proto_rawDescGZIP() []byte { + file_subjectmapping_subject_mapping_proto_rawDescOnce.Do(func() { + file_subjectmapping_subject_mapping_proto_rawDescData = protoimpl.X.CompressGZIP(file_subjectmapping_subject_mapping_proto_rawDescData) + }) + return file_subjectmapping_subject_mapping_proto_rawDescData +} + +var file_subjectmapping_subject_mapping_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_subjectmapping_subject_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ + (SubjectMappingOperatorEnum)(0), // 0: subjectmapping.SubjectMappingOperatorEnum + (*SubjectMapping)(nil), // 1: subjectmapping.SubjectMapping + (*SubjectMappingCreateUpdate)(nil), // 2: subjectmapping.SubjectMappingCreateUpdate + (*GetSubjectMappingRequest)(nil), // 3: subjectmapping.GetSubjectMappingRequest + (*GetSubjectMappingResponse)(nil), // 4: subjectmapping.GetSubjectMappingResponse + (*ListSubjectMappingsRequest)(nil), // 5: subjectmapping.ListSubjectMappingsRequest + (*ListSubjectMappingsResponse)(nil), // 6: subjectmapping.ListSubjectMappingsResponse + (*CreateSubjectMappingRequest)(nil), // 7: subjectmapping.CreateSubjectMappingRequest + (*CreateSubjectMappingResponse)(nil), // 8: subjectmapping.CreateSubjectMappingResponse + (*UpdateSubjectMappingRequest)(nil), // 9: subjectmapping.UpdateSubjectMappingRequest + (*UpdateSubjectMappingResponse)(nil), // 10: subjectmapping.UpdateSubjectMappingResponse + (*DeleteSubjectMappingRequest)(nil), // 11: subjectmapping.DeleteSubjectMappingRequest + (*DeleteSubjectMappingResponse)(nil), // 12: subjectmapping.DeleteSubjectMappingResponse + (*common.Metadata)(nil), // 13: common.Metadata + (*attributes.Value)(nil), // 14: attributes.Value + (*common.MetadataMutable)(nil), // 15: common.MetadataMutable +} +var file_subjectmapping_subject_mapping_proto_depIdxs = []int32{ + 13, // 0: subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata + 14, // 1: subjectmapping.SubjectMapping.attribute_value:type_name -> attributes.Value + 0, // 2: subjectmapping.SubjectMapping.operator:type_name -> subjectmapping.SubjectMappingOperatorEnum + 15, // 3: subjectmapping.SubjectMappingCreateUpdate.metadata:type_name -> common.MetadataMutable + 0, // 4: subjectmapping.SubjectMappingCreateUpdate.operator:type_name -> subjectmapping.SubjectMappingOperatorEnum + 1, // 5: subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> subjectmapping.SubjectMapping + 1, // 6: subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> subjectmapping.SubjectMapping + 2, // 7: subjectmapping.CreateSubjectMappingRequest.subject_mapping:type_name -> subjectmapping.SubjectMappingCreateUpdate + 1, // 8: subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> subjectmapping.SubjectMapping + 2, // 9: subjectmapping.UpdateSubjectMappingRequest.subject_mapping:type_name -> subjectmapping.SubjectMappingCreateUpdate + 1, // 10: subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> subjectmapping.SubjectMapping + 1, // 11: subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> subjectmapping.SubjectMapping + 5, // 12: subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> subjectmapping.ListSubjectMappingsRequest + 3, // 13: subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> subjectmapping.GetSubjectMappingRequest + 7, // 14: subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> subjectmapping.CreateSubjectMappingRequest + 9, // 15: subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> subjectmapping.UpdateSubjectMappingRequest + 11, // 16: subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> subjectmapping.DeleteSubjectMappingRequest + 6, // 17: subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> subjectmapping.ListSubjectMappingsResponse + 4, // 18: subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> subjectmapping.GetSubjectMappingResponse + 8, // 19: subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> subjectmapping.CreateSubjectMappingResponse + 10, // 20: subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> subjectmapping.UpdateSubjectMappingResponse + 12, // 21: subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> subjectmapping.DeleteSubjectMappingResponse + 17, // [17:22] is the sub-list for method output_type + 12, // [12:17] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name +} + +func init() { file_subjectmapping_subject_mapping_proto_init() } +func file_subjectmapping_subject_mapping_proto_init() { + if File_subjectmapping_subject_mapping_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_subjectmapping_subject_mapping_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectMapping); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectMappingCreateUpdate); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSubjectMappingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSubjectMappingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSubjectMappingsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSubjectMappingsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSubjectMappingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSubjectMappingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSubjectMappingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSubjectMappingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSubjectMappingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_subjectmapping_subject_mapping_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSubjectMappingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_subjectmapping_subject_mapping_proto_rawDesc, + NumEnums: 1, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_subjectmapping_subject_mapping_proto_goTypes, + DependencyIndexes: file_subjectmapping_subject_mapping_proto_depIdxs, + EnumInfos: file_subjectmapping_subject_mapping_proto_enumTypes, + MessageInfos: file_subjectmapping_subject_mapping_proto_msgTypes, + }.Build() + File_subjectmapping_subject_mapping_proto = out.File + file_subjectmapping_subject_mapping_proto_rawDesc = nil + file_subjectmapping_subject_mapping_proto_goTypes = nil + file_subjectmapping_subject_mapping_proto_depIdxs = nil +} diff --git a/sdk/acse/acse.pb.gw.go b/sdk/subjectmapping/subject_mapping.pb.gw.go similarity index 54% rename from sdk/acse/acse.pb.gw.go rename to sdk/subjectmapping/subject_mapping.pb.gw.go index 186da394da..bfe3f99a2a 100644 --- a/sdk/acse/acse.pb.gw.go +++ b/sdk/subjectmapping/subject_mapping.pb.gw.go @@ -1,12 +1,12 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: acse/acse.proto +// source: subjectmapping/subject_mapping.proto /* -Package acse is a reverse proxy. +Package subjectmapping is a reverse proxy. It translates gRPC into RESTful JSON APIs. */ -package acse +package subjectmapping import ( "context" @@ -31,43 +31,25 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -var ( - filter_SubjectEncodingService_ListSubjectMappings_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_SubjectEncodingService_ListSubjectMappings_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SubjectMappingService_ListSubjectMappings_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListSubjectMappingsRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubjectEncodingService_ListSubjectMappings_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := client.ListSubjectMappings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_SubjectEncodingService_ListSubjectMappings_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_SubjectMappingService_ListSubjectMappings_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq ListSubjectMappingsRequest var metadata runtime.ServerMetadata - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_SubjectEncodingService_ListSubjectMappings_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - msg, err := server.ListSubjectMappings(ctx, &protoReq) return msg, metadata, err } -func request_SubjectEncodingService_GetSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SubjectMappingService_GetSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetSubjectMappingRequest var metadata runtime.ServerMetadata @@ -83,7 +65,7 @@ func request_SubjectEncodingService_GetSubjectMapping_0(ctx context.Context, mar return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -93,7 +75,7 @@ func request_SubjectEncodingService_GetSubjectMapping_0(ctx context.Context, mar } -func local_request_SubjectEncodingService_GetSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_SubjectMappingService_GetSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq GetSubjectMappingRequest var metadata runtime.ServerMetadata @@ -109,7 +91,7 @@ func local_request_SubjectEncodingService_GetSubjectMapping_0(ctx context.Contex return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -119,7 +101,7 @@ func local_request_SubjectEncodingService_GetSubjectMapping_0(ctx context.Contex } -func request_SubjectEncodingService_CreateSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SubjectMappingService_CreateSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateSubjectMappingRequest var metadata runtime.ServerMetadata @@ -136,7 +118,7 @@ func request_SubjectEncodingService_CreateSubjectMapping_0(ctx context.Context, } -func local_request_SubjectEncodingService_CreateSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_SubjectMappingService_CreateSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq CreateSubjectMappingRequest var metadata runtime.ServerMetadata @@ -153,7 +135,7 @@ func local_request_SubjectEncodingService_CreateSubjectMapping_0(ctx context.Con } -func request_SubjectEncodingService_UpdateSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SubjectMappingService_UpdateSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateSubjectMappingRequest var metadata runtime.ServerMetadata @@ -177,7 +159,7 @@ func request_SubjectEncodingService_UpdateSubjectMapping_0(ctx context.Context, return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -187,7 +169,7 @@ func request_SubjectEncodingService_UpdateSubjectMapping_0(ctx context.Context, } -func local_request_SubjectEncodingService_UpdateSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_SubjectMappingService_UpdateSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq UpdateSubjectMappingRequest var metadata runtime.ServerMetadata @@ -211,7 +193,7 @@ func local_request_SubjectEncodingService_UpdateSubjectMapping_0(ctx context.Con return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -221,7 +203,7 @@ func local_request_SubjectEncodingService_UpdateSubjectMapping_0(ctx context.Con } -func request_SubjectEncodingService_DeleteSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectEncodingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func request_SubjectMappingService_DeleteSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteSubjectMappingRequest var metadata runtime.ServerMetadata @@ -237,7 +219,7 @@ func request_SubjectEncodingService_DeleteSubjectMapping_0(ctx context.Context, return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -247,7 +229,7 @@ func request_SubjectEncodingService_DeleteSubjectMapping_0(ctx context.Context, } -func local_request_SubjectEncodingService_DeleteSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectEncodingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +func local_request_SubjectMappingService_DeleteSubjectMapping_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq DeleteSubjectMappingRequest var metadata runtime.ServerMetadata @@ -263,7 +245,7 @@ func local_request_SubjectEncodingService_DeleteSubjectMapping_0(ctx context.Con return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") } - protoReq.Id, err = runtime.Int32(val) + protoReq.Id, err = runtime.String(val) if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) } @@ -273,13 +255,13 @@ func local_request_SubjectEncodingService_DeleteSubjectMapping_0(ctx context.Con } -// RegisterSubjectEncodingServiceHandlerServer registers the http handlers for service SubjectEncodingService to "mux". -// UnaryRPC :call SubjectEncodingServiceServer directly. +// RegisterSubjectMappingServiceHandlerServer registers the http handlers for service SubjectMappingService to "mux". +// UnaryRPC :call SubjectMappingServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSubjectEncodingServiceHandlerFromEndpoint instead. -func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SubjectEncodingServiceServer) error { +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSubjectMappingServiceHandlerFromEndpoint instead. +func RegisterSubjectMappingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SubjectMappingServiceServer) error { - mux.Handle("GET", pattern_SubjectEncodingService_ListSubjectMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SubjectMappingService_ListSubjectMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -287,12 +269,12 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acse.SubjectEncodingService/ListSubjectMappings", runtime.WithHTTPPathPattern("/v1/encoding/subject/mappings")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/ListSubjectMappings", runtime.WithHTTPPathPattern("/subject-mappings")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SubjectEncodingService_ListSubjectMappings_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SubjectMappingService_ListSubjectMappings_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -300,11 +282,11 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti return } - forward_SubjectEncodingService_ListSubjectMappings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_ListSubjectMappings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_SubjectEncodingService_GetSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SubjectMappingService_GetSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -312,12 +294,12 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acse.SubjectEncodingService/GetSubjectMapping", runtime.WithHTTPPathPattern("/v1/encoding/subject/mappings/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/GetSubjectMapping", runtime.WithHTTPPathPattern("/subject-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SubjectEncodingService_GetSubjectMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SubjectMappingService_GetSubjectMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -325,11 +307,11 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti return } - forward_SubjectEncodingService_GetSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_GetSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SubjectEncodingService_CreateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SubjectMappingService_CreateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -337,12 +319,12 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acse.SubjectEncodingService/CreateSubjectMapping", runtime.WithHTTPPathPattern("/v1/encoding/subject/mappings")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/CreateSubjectMapping", runtime.WithHTTPPathPattern("/subject-mappings")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SubjectEncodingService_CreateSubjectMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SubjectMappingService_CreateSubjectMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -350,11 +332,11 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti return } - forward_SubjectEncodingService_CreateSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_CreateSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SubjectEncodingService_UpdateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SubjectMappingService_UpdateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -362,12 +344,12 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acse.SubjectEncodingService/UpdateSubjectMapping", runtime.WithHTTPPathPattern("/v1/encoding/subject/mappings/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/UpdateSubjectMapping", runtime.WithHTTPPathPattern("/subject-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SubjectEncodingService_UpdateSubjectMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SubjectMappingService_UpdateSubjectMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -375,11 +357,11 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti return } - forward_SubjectEncodingService_UpdateSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_UpdateSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_SubjectEncodingService_DeleteSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_SubjectMappingService_DeleteSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -387,12 +369,12 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/acse.SubjectEncodingService/DeleteSubjectMapping", runtime.WithHTTPPathPattern("/v1/encoding/subjects/mappings/{id}")) + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/DeleteSubjectMapping", runtime.WithHTTPPathPattern("/subject-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_SubjectEncodingService_DeleteSubjectMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_SubjectMappingService_DeleteSubjectMapping_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { @@ -400,16 +382,16 @@ func RegisterSubjectEncodingServiceHandlerServer(ctx context.Context, mux *runti return } - forward_SubjectEncodingService_DeleteSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_DeleteSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) return nil } -// RegisterSubjectEncodingServiceHandlerFromEndpoint is same as RegisterSubjectEncodingServiceHandler but +// RegisterSubjectMappingServiceHandlerFromEndpoint is same as RegisterSubjectMappingServiceHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterSubjectEncodingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { +func RegisterSubjectMappingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err @@ -429,129 +411,129 @@ func RegisterSubjectEncodingServiceHandlerFromEndpoint(ctx context.Context, mux }() }() - return RegisterSubjectEncodingServiceHandler(ctx, mux, conn) + return RegisterSubjectMappingServiceHandler(ctx, mux, conn) } -// RegisterSubjectEncodingServiceHandler registers the http handlers for service SubjectEncodingService to "mux". +// RegisterSubjectMappingServiceHandler registers the http handlers for service SubjectMappingService to "mux". // The handlers forward requests to the grpc endpoint over "conn". -func RegisterSubjectEncodingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterSubjectEncodingServiceHandlerClient(ctx, mux, NewSubjectEncodingServiceClient(conn)) +func RegisterSubjectMappingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterSubjectMappingServiceHandlerClient(ctx, mux, NewSubjectMappingServiceClient(conn)) } -// RegisterSubjectEncodingServiceHandlerClient registers the http handlers for service SubjectEncodingService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SubjectEncodingServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SubjectEncodingServiceClient" +// RegisterSubjectMappingServiceHandlerClient registers the http handlers for service SubjectMappingService +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SubjectMappingServiceClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SubjectMappingServiceClient" // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "SubjectEncodingServiceClient" to call the correct interceptors. -func RegisterSubjectEncodingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SubjectEncodingServiceClient) error { +// "SubjectMappingServiceClient" to call the correct interceptors. +func RegisterSubjectMappingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SubjectMappingServiceClient) error { - mux.Handle("GET", pattern_SubjectEncodingService_ListSubjectMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SubjectMappingService_ListSubjectMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acse.SubjectEncodingService/ListSubjectMappings", runtime.WithHTTPPathPattern("/v1/encoding/subject/mappings")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/ListSubjectMappings", runtime.WithHTTPPathPattern("/subject-mappings")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SubjectEncodingService_ListSubjectMappings_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SubjectMappingService_ListSubjectMappings_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubjectEncodingService_ListSubjectMappings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_ListSubjectMappings_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_SubjectEncodingService_GetSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_SubjectMappingService_GetSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acse.SubjectEncodingService/GetSubjectMapping", runtime.WithHTTPPathPattern("/v1/encoding/subject/mappings/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/GetSubjectMapping", runtime.WithHTTPPathPattern("/subject-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SubjectEncodingService_GetSubjectMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SubjectMappingService_GetSubjectMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubjectEncodingService_GetSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_GetSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SubjectEncodingService_CreateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SubjectMappingService_CreateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acse.SubjectEncodingService/CreateSubjectMapping", runtime.WithHTTPPathPattern("/v1/encoding/subject/mappings")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/CreateSubjectMapping", runtime.WithHTTPPathPattern("/subject-mappings")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SubjectEncodingService_CreateSubjectMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SubjectMappingService_CreateSubjectMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubjectEncodingService_CreateSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_CreateSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("POST", pattern_SubjectEncodingService_UpdateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("POST", pattern_SubjectMappingService_UpdateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acse.SubjectEncodingService/UpdateSubjectMapping", runtime.WithHTTPPathPattern("/v1/encoding/subject/mappings/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/UpdateSubjectMapping", runtime.WithHTTPPathPattern("/subject-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SubjectEncodingService_UpdateSubjectMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SubjectMappingService_UpdateSubjectMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubjectEncodingService_UpdateSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_UpdateSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("DELETE", pattern_SubjectEncodingService_DeleteSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("DELETE", pattern_SubjectMappingService_DeleteSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) var err error var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/acse.SubjectEncodingService/DeleteSubjectMapping", runtime.WithHTTPPathPattern("/v1/encoding/subjects/mappings/{id}")) + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/subjectmapping.SubjectMappingService/DeleteSubjectMapping", runtime.WithHTTPPathPattern("/subject-mappings/{id}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_SubjectEncodingService_DeleteSubjectMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) + resp, md, err := request_SubjectMappingService_DeleteSubjectMapping_0(annotatedContext, inboundMarshaler, client, req, pathParams) annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_SubjectEncodingService_DeleteSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_SubjectMappingService_DeleteSubjectMapping_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -559,25 +541,25 @@ func RegisterSubjectEncodingServiceHandlerClient(ctx context.Context, mux *runti } var ( - pattern_SubjectEncodingService_ListSubjectMappings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "encoding", "subject", "mappings"}, "")) + pattern_SubjectMappingService_ListSubjectMappings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"subject-mappings"}, "")) - pattern_SubjectEncodingService_GetSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "subject", "mappings", "id"}, "")) + pattern_SubjectMappingService_GetSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-mappings", "id"}, "")) - pattern_SubjectEncodingService_CreateSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "encoding", "subject", "mappings"}, "")) + pattern_SubjectMappingService_CreateSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"subject-mappings"}, "")) - pattern_SubjectEncodingService_UpdateSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "subject", "mappings", "id"}, "")) + pattern_SubjectMappingService_UpdateSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-mappings", "id"}, "")) - pattern_SubjectEncodingService_DeleteSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"v1", "encoding", "subjects", "mappings", "id"}, "")) + pattern_SubjectMappingService_DeleteSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-mappings", "id"}, "")) ) var ( - forward_SubjectEncodingService_ListSubjectMappings_0 = runtime.ForwardResponseMessage + forward_SubjectMappingService_ListSubjectMappings_0 = runtime.ForwardResponseMessage - forward_SubjectEncodingService_GetSubjectMapping_0 = runtime.ForwardResponseMessage + forward_SubjectMappingService_GetSubjectMapping_0 = runtime.ForwardResponseMessage - forward_SubjectEncodingService_CreateSubjectMapping_0 = runtime.ForwardResponseMessage + forward_SubjectMappingService_CreateSubjectMapping_0 = runtime.ForwardResponseMessage - forward_SubjectEncodingService_UpdateSubjectMapping_0 = runtime.ForwardResponseMessage + forward_SubjectMappingService_UpdateSubjectMapping_0 = runtime.ForwardResponseMessage - forward_SubjectEncodingService_DeleteSubjectMapping_0 = runtime.ForwardResponseMessage + forward_SubjectMappingService_DeleteSubjectMapping_0 = runtime.ForwardResponseMessage ) diff --git a/sdk/subjectmapping/subject_mapping_grpc.pb.go b/sdk/subjectmapping/subject_mapping_grpc.pb.go new file mode 100644 index 0000000000..78565557a9 --- /dev/null +++ b/sdk/subjectmapping/subject_mapping_grpc.pb.go @@ -0,0 +1,257 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.3.0 +// - protoc (unknown) +// source: subjectmapping/subject_mapping.proto + +package subjectmapping + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +const ( + SubjectMappingService_ListSubjectMappings_FullMethodName = "/subjectmapping.SubjectMappingService/ListSubjectMappings" + SubjectMappingService_GetSubjectMapping_FullMethodName = "/subjectmapping.SubjectMappingService/GetSubjectMapping" + SubjectMappingService_CreateSubjectMapping_FullMethodName = "/subjectmapping.SubjectMappingService/CreateSubjectMapping" + SubjectMappingService_UpdateSubjectMapping_FullMethodName = "/subjectmapping.SubjectMappingService/UpdateSubjectMapping" + SubjectMappingService_DeleteSubjectMapping_FullMethodName = "/subjectmapping.SubjectMappingService/DeleteSubjectMapping" +) + +// SubjectMappingServiceClient is the client API for SubjectMappingService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SubjectMappingServiceClient interface { + ListSubjectMappings(ctx context.Context, in *ListSubjectMappingsRequest, opts ...grpc.CallOption) (*ListSubjectMappingsResponse, error) + GetSubjectMapping(ctx context.Context, in *GetSubjectMappingRequest, opts ...grpc.CallOption) (*GetSubjectMappingResponse, error) + CreateSubjectMapping(ctx context.Context, in *CreateSubjectMappingRequest, opts ...grpc.CallOption) (*CreateSubjectMappingResponse, error) + UpdateSubjectMapping(ctx context.Context, in *UpdateSubjectMappingRequest, opts ...grpc.CallOption) (*UpdateSubjectMappingResponse, error) + DeleteSubjectMapping(ctx context.Context, in *DeleteSubjectMappingRequest, opts ...grpc.CallOption) (*DeleteSubjectMappingResponse, error) +} + +type subjectMappingServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewSubjectMappingServiceClient(cc grpc.ClientConnInterface) SubjectMappingServiceClient { + return &subjectMappingServiceClient{cc} +} + +func (c *subjectMappingServiceClient) ListSubjectMappings(ctx context.Context, in *ListSubjectMappingsRequest, opts ...grpc.CallOption) (*ListSubjectMappingsResponse, error) { + out := new(ListSubjectMappingsResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_ListSubjectMappings_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subjectMappingServiceClient) GetSubjectMapping(ctx context.Context, in *GetSubjectMappingRequest, opts ...grpc.CallOption) (*GetSubjectMappingResponse, error) { + out := new(GetSubjectMappingResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_GetSubjectMapping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subjectMappingServiceClient) CreateSubjectMapping(ctx context.Context, in *CreateSubjectMappingRequest, opts ...grpc.CallOption) (*CreateSubjectMappingResponse, error) { + out := new(CreateSubjectMappingResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_CreateSubjectMapping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subjectMappingServiceClient) UpdateSubjectMapping(ctx context.Context, in *UpdateSubjectMappingRequest, opts ...grpc.CallOption) (*UpdateSubjectMappingResponse, error) { + out := new(UpdateSubjectMappingResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_UpdateSubjectMapping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subjectMappingServiceClient) DeleteSubjectMapping(ctx context.Context, in *DeleteSubjectMappingRequest, opts ...grpc.CallOption) (*DeleteSubjectMappingResponse, error) { + out := new(DeleteSubjectMappingResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_DeleteSubjectMapping_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SubjectMappingServiceServer is the server API for SubjectMappingService service. +// All implementations must embed UnimplementedSubjectMappingServiceServer +// for forward compatibility +type SubjectMappingServiceServer interface { + ListSubjectMappings(context.Context, *ListSubjectMappingsRequest) (*ListSubjectMappingsResponse, error) + GetSubjectMapping(context.Context, *GetSubjectMappingRequest) (*GetSubjectMappingResponse, error) + CreateSubjectMapping(context.Context, *CreateSubjectMappingRequest) (*CreateSubjectMappingResponse, error) + UpdateSubjectMapping(context.Context, *UpdateSubjectMappingRequest) (*UpdateSubjectMappingResponse, error) + DeleteSubjectMapping(context.Context, *DeleteSubjectMappingRequest) (*DeleteSubjectMappingResponse, error) + mustEmbedUnimplementedSubjectMappingServiceServer() +} + +// UnimplementedSubjectMappingServiceServer must be embedded to have forward compatible implementations. +type UnimplementedSubjectMappingServiceServer struct { +} + +func (UnimplementedSubjectMappingServiceServer) ListSubjectMappings(context.Context, *ListSubjectMappingsRequest) (*ListSubjectMappingsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSubjectMappings not implemented") +} +func (UnimplementedSubjectMappingServiceServer) GetSubjectMapping(context.Context, *GetSubjectMappingRequest) (*GetSubjectMappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSubjectMapping not implemented") +} +func (UnimplementedSubjectMappingServiceServer) CreateSubjectMapping(context.Context, *CreateSubjectMappingRequest) (*CreateSubjectMappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSubjectMapping not implemented") +} +func (UnimplementedSubjectMappingServiceServer) UpdateSubjectMapping(context.Context, *UpdateSubjectMappingRequest) (*UpdateSubjectMappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSubjectMapping not implemented") +} +func (UnimplementedSubjectMappingServiceServer) DeleteSubjectMapping(context.Context, *DeleteSubjectMappingRequest) (*DeleteSubjectMappingResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSubjectMapping not implemented") +} +func (UnimplementedSubjectMappingServiceServer) mustEmbedUnimplementedSubjectMappingServiceServer() {} + +// UnsafeSubjectMappingServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SubjectMappingServiceServer will +// result in compilation errors. +type UnsafeSubjectMappingServiceServer interface { + mustEmbedUnimplementedSubjectMappingServiceServer() +} + +func RegisterSubjectMappingServiceServer(s grpc.ServiceRegistrar, srv SubjectMappingServiceServer) { + s.RegisterService(&SubjectMappingService_ServiceDesc, srv) +} + +func _SubjectMappingService_ListSubjectMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSubjectMappingsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).ListSubjectMappings(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_ListSubjectMappings_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).ListSubjectMappings(ctx, req.(*ListSubjectMappingsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubjectMappingService_GetSubjectMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSubjectMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).GetSubjectMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_GetSubjectMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).GetSubjectMapping(ctx, req.(*GetSubjectMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubjectMappingService_CreateSubjectMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSubjectMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).CreateSubjectMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_CreateSubjectMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).CreateSubjectMapping(ctx, req.(*CreateSubjectMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubjectMappingService_UpdateSubjectMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSubjectMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).UpdateSubjectMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_UpdateSubjectMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).UpdateSubjectMapping(ctx, req.(*UpdateSubjectMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubjectMappingService_DeleteSubjectMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSubjectMappingRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).DeleteSubjectMapping(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_DeleteSubjectMapping_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).DeleteSubjectMapping(ctx, req.(*DeleteSubjectMappingRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SubjectMappingService_ServiceDesc is the grpc.ServiceDesc for SubjectMappingService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SubjectMappingService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "subjectmapping.SubjectMappingService", + HandlerType: (*SubjectMappingServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListSubjectMappings", + Handler: _SubjectMappingService_ListSubjectMappings_Handler, + }, + { + MethodName: "GetSubjectMapping", + Handler: _SubjectMappingService_GetSubjectMapping_Handler, + }, + { + MethodName: "CreateSubjectMapping", + Handler: _SubjectMappingService_CreateSubjectMapping_Handler, + }, + { + MethodName: "UpdateSubjectMapping", + Handler: _SubjectMappingService_UpdateSubjectMapping_Handler, + }, + { + MethodName: "DeleteSubjectMapping", + Handler: _SubjectMappingService_DeleteSubjectMapping_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "subjectmapping/subject_mapping.proto", +} diff --git a/services/acre/acre.go b/services/acre/acre.go deleted file mode 100644 index 3a1e08d63f..0000000000 --- a/services/acre/acre.go +++ /dev/null @@ -1,486 +0,0 @@ -package acre - -import ( - "context" - "errors" - "log/slog" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/jackc/pgx/v5" - "github.com/opentdf/opentdf-v2-poc/internal/db" - "github.com/opentdf/opentdf-v2-poc/sdk/acre" - "github.com/opentdf/opentdf-v2-poc/sdk/common" - "github.com/opentdf/opentdf-v2-poc/services" - - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/encoding/protojson" -) - -type ResourceEncodingService struct { - acre.UnimplementedResourceEncodingServiceServer - dbClient *db.Client -} - -func NewResourceEncoding(dbClient *db.Client, grpcServer *grpc.Server, mux *runtime.ServeMux) error { - as := &ResourceEncodingService{ - dbClient: dbClient, - } - acre.RegisterResourceEncodingServiceServer(grpcServer, as) - err := acre.RegisterResourceEncodingServiceHandlerServer(context.Background(), mux, as) - if err != nil { - return errors.New("failed to register resource encoding service handler") - } - return nil -} - -/* - Resource Mappings -*/ - -func (s ResourceEncodingService) CreateResourceMapping(ctx context.Context, - req *acre.CreateResourceMappingRequest) (*acre.CreateResourceMappingResponse, error) { - slog.Debug("creating resource mapping") - - // Set the version of the resource to 1 on create - req.Mapping.Descriptor_.Version = 1 - - resource, err := protojson.Marshal(req.Mapping) - if err != nil { - return &acre.CreateResourceMappingResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.CreateResource(ctx, req.Mapping.Descriptor_, resource) - if err != nil { - slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) - return &acre.CreateResourceMappingResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - return &acre.CreateResourceMappingResponse{}, nil -} - -//nolint:dupl // there probably is duplication in these crud operations but its not worth refactoring yet. -func (s ResourceEncodingService) ListResourceMappings(ctx context.Context, - req *acre.ListResourceMappingsRequest) (*acre.ListResourceMappingsResponse, error) { - mappings := &acre.ListResourceMappingsResponse{} - - rows, err := s.dbClient.ListResources( - ctx, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_MAPPING.String(), - req.Selector, - ) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return mappings, status.Error(codes.Internal, services.ErrListingResource) - } - defer rows.Close() - - for rows.Next() { - var ( - id int32 - mapping = new(acre.ResourceMapping) - tmpMapping []byte - ) - err = rows.Scan(&id, &tmpMapping) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return mappings, status.Error(codes.Internal, services.ErrListingResource) - } - - err = protojson.Unmarshal(tmpMapping, mapping) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return mappings, status.Error(codes.Internal, services.ErrListingResource) - } - - mapping.Descriptor_.Id = id - mappings.Mappings = append(mappings.Mappings, mapping) - } - - if err := rows.Err(); err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return mappings, status.Error(codes.Internal, services.ErrListingResource) - } - - return mappings, nil -} - -func (s ResourceEncodingService) GetResourceMapping(ctx context.Context, - req *acre.GetResourceMappingRequest) (*acre.GetResourceMappingResponse, error) { - var ( - mapping = &acre.GetResourceMappingResponse{ - Mapping: new(acre.ResourceMapping), - } - id int32 - bMapping []byte - ) - - row, err := s.dbClient.GetResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_MAPPING.String(), - ) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return mapping, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = row.Scan(&id, &bMapping) - if err != nil { - if errors.Is(err, pgx.ErrNoRows) { - slog.Error(services.ErrNotFound, slog.String("error", err.Error())) - return mapping, status.Error(codes.NotFound, services.ErrNotFound) - } - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return mapping, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = protojson.Unmarshal(bMapping, mapping.Mapping) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return mapping, status.Error(codes.Internal, services.ErrGettingResource) - } - - mapping.Mapping.Descriptor_.Id = id - - return mapping, nil -} - -func (s ResourceEncodingService) UpdateResourceMapping(ctx context.Context, - req *acre.UpdateResourceMappingRequest) (*acre.UpdateResourceMappingResponse, error) { - resource, err := protojson.Marshal(req.Mapping) - if err != nil { - return &acre.UpdateResourceMappingResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.UpdateResource( - ctx, - req.Mapping.Descriptor_, - resource, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_MAPPING.String(), - ) - if err != nil { - slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) - return &acre.UpdateResourceMappingResponse{}, - status.Error(codes.Internal, services.ErrUpdatingResource) - } - return &acre.UpdateResourceMappingResponse{}, nil -} - -func (s ResourceEncodingService) DeleteResourceMapping(ctx context.Context, - req *acre.DeleteResourceMappingRequest) (*acre.DeleteResourceMappingResponse, error) { - if err := s.dbClient.DeleteResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_MAPPING.String(), - ); err != nil { - slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) - return &acre.DeleteResourceMappingResponse{}, - status.Error(codes.Internal, services.ErrDeletingResource) - } - return &acre.DeleteResourceMappingResponse{}, nil -} - -/* - Resource Groups -*/ - -func (s ResourceEncodingService) CreateResourceGroup(ctx context.Context, - req *acre.CreateResourceGroupRequest) (*acre.CreateResourceGroupResponse, error) { - slog.Debug("creating resource group") - - // Set the version of the resource to 1 on create - req.Group.Descriptor_.Version = 1 - - resource, err := protojson.Marshal(req.Group) - if err != nil { - return &acre.CreateResourceGroupResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.CreateResource(ctx, req.Group.Descriptor_, resource) - if err != nil { - slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) - return &acre.CreateResourceGroupResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - return &acre.CreateResourceGroupResponse{}, nil -} - -//nolint:dupl // there probably is duplication in these crud operations but its not worth refactoring yet. -func (s ResourceEncodingService) ListResourceGroups(ctx context.Context, - req *acre.ListResourceGroupsRequest) (*acre.ListResourceGroupsResponse, error) { - groups := &acre.ListResourceGroupsResponse{} - - rows, err := s.dbClient.ListResources( - ctx, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_GROUP.String(), - req.Selector, - ) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return groups, status.Error(codes.Internal, services.ErrListingResource) - } - defer rows.Close() - - for rows.Next() { - var ( - id int32 - group = new(acre.ResourceGroup) - bGroup []byte - ) - // var tmpDefinition []byte - err = rows.Scan(&id, &bGroup) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return groups, status.Error(codes.Internal, services.ErrListingResource) - } - - err = protojson.Unmarshal(bGroup, group) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return groups, status.Error(codes.Internal, services.ErrListingResource) - } - - group.Descriptor_.Id = id - groups.Groups = append(groups.Groups, group) - } - - if err := rows.Err(); err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return groups, status.Error(codes.Internal, services.ErrListingResource) - } - - return groups, nil -} - -func (s ResourceEncodingService) GetResourceGroup(ctx context.Context, - req *acre.GetResourceGroupRequest) (*acre.GetResourceGroupResponse, error) { - var ( - group = &acre.GetResourceGroupResponse{ - Group: new(acre.ResourceGroup), - } - id int32 - bGroup []byte - ) - - row, err := s.dbClient.GetResource( - ctx, - req.Id, common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_GROUP.String(), - ) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return group, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = row.Scan(&id, &bGroup) - if err != nil { - if errors.Is(err, pgx.ErrNoRows) { - slog.Info(services.ErrNotFound, slog.Int("id", int(req.Id))) - return group, status.Error(codes.NotFound, services.ErrNotFound) - } - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return group, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = protojson.Unmarshal(bGroup, group.Group) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return group, status.Error(codes.Internal, services.ErrGettingResource) - } - - group.Group.Descriptor_.Id = id - - return group, nil -} - -func (s ResourceEncodingService) UpdateResourceGroup(ctx context.Context, - req *acre.UpdateResourceGroupRequest) (*acre.UpdateResourceGroupResponse, error) { - - resource, err := protojson.Marshal(req.Group) - if err != nil { - return &acre.UpdateResourceGroupResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.UpdateResource( - ctx, - req.Group.Descriptor_, resource, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_GROUP.String(), - ) - if err != nil { - slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) - return &acre.UpdateResourceGroupResponse{}, - status.Error(codes.Internal, services.ErrUpdatingResource) - } - return &acre.UpdateResourceGroupResponse{}, nil -} - -func (s ResourceEncodingService) DeleteResourceGroup(ctx context.Context, - req *acre.DeleteResourceGroupRequest) (*acre.DeleteResourceGroupResponse, error) { - if err := s.dbClient.DeleteResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_GROUP.String(), - ); err != nil { - slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) - return &acre.DeleteResourceGroupResponse{}, - status.Error(codes.Internal, services.ErrDeletingResource) - } - return &acre.DeleteResourceGroupResponse{}, nil -} - -/* - Synonyms -*/ - -func (s ResourceEncodingService) CreateResourceSynonym(ctx context.Context, - req *acre.CreateResourceSynonymRequest) (*acre.CreateResourceSynonymResponse, error) { - slog.Debug("creating resource synonym") - - // Set the version of the resource to 1 on create - req.Synonym.Descriptor_.Version = 1 - - resource, err := protojson.Marshal(req.Synonym) - if err != nil { - return &acre.CreateResourceSynonymResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.CreateResource(ctx, req.Synonym.Descriptor_, resource) - if err != nil { - slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) - return &acre.CreateResourceSynonymResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - return &acre.CreateResourceSynonymResponse{}, nil -} - -//nolint:dupl // there probably is duplication in these crud operations but its not worth refactoring yet. -func (s ResourceEncodingService) ListResourceSynonyms(ctx context.Context, - req *acre.ListResourceSynonymsRequest) (*acre.ListResourceSynonymsResponse, error) { - synonyms := &acre.ListResourceSynonymsResponse{} - - rows, err := s.dbClient.ListResources( - ctx, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM.String(), - req.Selector) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return synonyms, status.Error(codes.Internal, services.ErrListingResource) - } - defer rows.Close() - - for rows.Next() { - var ( - id int32 - synonym = new(acre.Synonyms) - bSynonym []byte - ) - err = rows.Scan(&id, &bSynonym) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return synonyms, status.Error(codes.Internal, services.ErrListingResource) - } - - err = protojson.Unmarshal(bSynonym, synonym) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return synonyms, status.Error(codes.Internal, services.ErrListingResource) - } - - synonym.Descriptor_.Id = id - synonyms.Synonyms = append(synonyms.Synonyms, synonym) - } - - if err := rows.Err(); err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return synonyms, status.Error(codes.Internal, services.ErrListingResource) - } - - return synonyms, nil -} - -func (s ResourceEncodingService) GetResourceSynonym(ctx context.Context, - req *acre.GetResourceSynonymRequest) (*acre.GetResourceSynonymResponse, error) { - var ( - synonym = &acre.GetResourceSynonymResponse{ - Synonym: new(acre.Synonyms), - } - id int32 - bSynonym []byte - ) - - row, err := s.dbClient.GetResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM.String(), - ) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return synonym, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = row.Scan(&id, &bSynonym) - if err != nil { - if errors.Is(err, pgx.ErrNoRows) { - slog.Info(services.ErrNotFound, slog.Int("id", int(req.Id))) - return synonym, status.Error(codes.NotFound, services.ErrNotFound) - } - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return synonym, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = protojson.Unmarshal(bSynonym, synonym.Synonym) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return synonym, status.Error(codes.Internal, services.ErrGettingResource) - } - - synonym.Synonym.Descriptor_.Id = id - - return synonym, nil -} - -func (s ResourceEncodingService) UpdateResourceSynonym(ctx context.Context, - req *acre.UpdateResourceSynonymRequest) (*acre.UpdateResourceSynonymResponse, error) { - - resource, err := protojson.Marshal(req.Synonym) - if err != nil { - return &acre.UpdateResourceSynonymResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.UpdateResource( - ctx, - req.Synonym.Descriptor_, - resource, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM.String(), - ) - if err != nil { - slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) - return &acre.UpdateResourceSynonymResponse{}, - status.Error(codes.Internal, services.ErrUpdatingResource) - } - return &acre.UpdateResourceSynonymResponse{}, nil -} - -func (s ResourceEncodingService) DeleteResourceSynonym(ctx context.Context, - req *acre.DeleteResourceSynonymRequest) (*acre.DeleteResourceSynonymResponse, error) { - if err := s.dbClient.DeleteResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_RESOURCE_ENCODING_SYNONYM.String(), - ); err != nil { - slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) - return &acre.DeleteResourceSynonymResponse{}, - status.Error(codes.Internal, services.ErrDeletingResource) - } - return &acre.DeleteResourceSynonymResponse{}, nil -} diff --git a/services/acse/acse.go b/services/acse/acse.go deleted file mode 100644 index f8d1fe629f..0000000000 --- a/services/acse/acse.go +++ /dev/null @@ -1,188 +0,0 @@ -package acse - -import ( - "context" - "errors" - "fmt" - "log/slog" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/jackc/pgx/v5" - "github.com/opentdf/opentdf-v2-poc/internal/db" - "github.com/opentdf/opentdf-v2-poc/sdk/acse" - "github.com/opentdf/opentdf-v2-poc/sdk/common" - - "github.com/opentdf/opentdf-v2-poc/services" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/encoding/protojson" -) - -type SubjectEncodingService struct { - acse.UnimplementedSubjectEncodingServiceServer - dbClient *db.Client -} - -func NewSubjectEncodingServer(dbClient *db.Client, grpcServer *grpc.Server, - grpcInprocess *grpc.Server, mux *runtime.ServeMux) error { - as := &SubjectEncodingService{ - dbClient: dbClient, - } - acse.RegisterSubjectEncodingServiceServer(grpcServer, as) - if grpcInprocess != nil { - acse.RegisterSubjectEncodingServiceServer(grpcInprocess, as) - } - err := acse.RegisterSubjectEncodingServiceHandlerServer(context.Background(), mux, as) - if err != nil { - return fmt.Errorf("failed to register subject encoding service handler: %w", err) - } - return nil -} - -func (s SubjectEncodingService) CreateSubjectMapping(ctx context.Context, - req *acse.CreateSubjectMappingRequest) (*acse.CreateSubjectMappingResponse, error) { - slog.Debug("creating subject mapping") - - resource, err := protojson.Marshal(req.SubjectMapping) - if err != nil { - return &acse.CreateSubjectMappingResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.CreateResource(ctx, req.SubjectMapping.Descriptor_, resource) - if err != nil { - slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) - return &acse.CreateSubjectMappingResponse{}, status.Error(codes.Internal, - fmt.Sprintf("%v: %v", services.ErrCreatingResource, err)) - } - - return &acse.CreateSubjectMappingResponse{}, nil -} - -func (s SubjectEncodingService) ListSubjectMappings(ctx context.Context, - req *acse.ListSubjectMappingsRequest) (*acse.ListSubjectMappingsResponse, error) { - mappings := &acse.ListSubjectMappingsResponse{} - - rows, err := s.dbClient.ListResources( - ctx, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_SUBJECT_ENCODING_MAPPING.String(), - req.Selector, - ) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return mappings, status.Error(codes.Internal, services.ErrListingResource) - } - defer rows.Close() - - for rows.Next() { - var ( - id int32 - mapping = new(acse.SubjectMapping) - bMapping []byte - ) - err = rows.Scan(&id, &bMapping) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return mappings, status.Error(codes.Internal, services.ErrListingResource) - } - - err = protojson.Unmarshal(bMapping, mapping) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return mappings, status.Error(codes.Internal, services.ErrListingResource) - } - - mapping.Descriptor_.Id = id - mappings.SubjectMappings = append(mappings.SubjectMappings, mapping) - } - - if err := rows.Err(); err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return mappings, status.Error(codes.Internal, services.ErrListingResource) - } - - if err := rows.Err(); err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return mappings, status.Error(codes.Internal, services.ErrListingResource) - } - - return mappings, nil -} - -func (s SubjectEncodingService) GetSubjectMapping(ctx context.Context, - req *acse.GetSubjectMappingRequest) (*acse.GetSubjectMappingResponse, error) { - var ( - mapping = &acse.GetSubjectMappingResponse{ - SubjectMapping: new(acse.SubjectMapping), - } - id int32 - bMapping []byte - ) - - row, err := s.dbClient.GetResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_SUBJECT_ENCODING_MAPPING.String(), - ) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return mapping, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = row.Scan(&id, &bMapping) - if err != nil { - if errors.Is(err, pgx.ErrNoRows) { - slog.Info(services.ErrNotFound, slog.Int("id", int(req.Id))) - return mapping, status.Error(codes.NotFound, services.ErrNotFound) - } - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return mapping, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = protojson.Unmarshal(bMapping, mapping.SubjectMapping) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return mapping, status.Error(codes.Internal, services.ErrGettingResource) - } - - mapping.SubjectMapping.Descriptor_.Id = id - - return mapping, nil -} - -func (s SubjectEncodingService) UpdateSubjectMapping(ctx context.Context, - req *acse.UpdateSubjectMappingRequest) (*acse.UpdateSubjectMappingResponse, error) { - resource, err := protojson.Marshal(req.SubjectMapping) - if err != nil { - return &acse.UpdateSubjectMappingResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.UpdateResource( - ctx, - req.SubjectMapping.Descriptor_, - resource, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_SUBJECT_ENCODING_MAPPING.String(), - ) - if err != nil { - slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) - return &acse.UpdateSubjectMappingResponse{}, - status.Error(codes.Internal, services.ErrUpdatingResource) - } - return &acse.UpdateSubjectMappingResponse{}, nil -} - -func (s SubjectEncodingService) DeleteSubjectMapping(ctx context.Context, - req *acse.DeleteSubjectMappingRequest) (*acse.DeleteSubjectMappingResponse, error) { - if err := s.dbClient.DeleteResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_SUBJECT_ENCODING_MAPPING.String(), - ); err != nil { - slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) - return &acse.DeleteSubjectMappingResponse{}, - status.Error(codes.Internal, services.ErrDeletingResource) - } - return &acse.DeleteSubjectMappingResponse{}, nil -} diff --git a/services/attributes/attributes.go b/services/attributes/attributes.go index 397891b28d..c3e79ec169 100644 --- a/services/attributes/attributes.go +++ b/services/attributes/attributes.go @@ -2,20 +2,16 @@ package attributes import ( "context" - "errors" "fmt" "log/slog" "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/jackc/pgx/v5" "github.com/opentdf/opentdf-v2-poc/internal/db" "github.com/opentdf/opentdf-v2-poc/sdk/attributes" - "github.com/opentdf/opentdf-v2-poc/sdk/common" "github.com/opentdf/opentdf-v2-poc/services" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "google.golang.org/protobuf/encoding/protojson" ) type AttributesService struct { @@ -37,293 +33,187 @@ func NewAttributesServer(dbClient *db.Client, g *grpc.Server, s *runtime.ServeMu func (s AttributesService) CreateAttribute(ctx context.Context, req *attributes.CreateAttributeRequest) (*attributes.CreateAttributeResponse, error) { - slog.Debug("creating new attribute definition", slog.String("name", req.Definition.Name)) + slog.Debug("creating new attribute definition", slog.String("name", req.Attribute.Name)) + rsp := &attributes.CreateAttributeResponse{} - // Set the version of the resource to 1 on create - req.Definition.Descriptor_.Version = 1 - - resource, err := protojson.Marshal(req.Definition) - if err != nil { - return &attributes.CreateAttributeResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.CreateResource(ctx, req.Definition.Descriptor_, resource) + item, err := s.dbClient.CreateAttribute(ctx, req.Attribute) if err != nil { slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) - return &attributes.CreateAttributeResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) + return nil, status.Error(codes.Internal, services.ErrCreatingResource) } - slog.Debug("created new attribute definition", slog.String("name", req.Definition.Name)) + rsp.Attribute = item - return &attributes.CreateAttributeResponse{}, nil + slog.Debug("created new attribute definition", slog.String("name", req.Attribute.Name)) + return rsp, nil } -func (s AttributesService) CreateAttributeGroup(ctx context.Context, - req *attributes.CreateAttributeGroupRequest) (*attributes.CreateAttributeGroupResponse, error) { - slog.Debug("creating new attribute group definition") - - // Set the version of the resource to 1 on create - req.Group.Descriptor_.Version = 1 +func (s *AttributesService) ListAttributes(ctx context.Context, + req *attributes.ListAttributesRequest) (*attributes.ListAttributesResponse, error) { + rsp := &attributes.ListAttributesResponse{} - resource, err := protojson.Marshal(req.Group) + list, err := s.dbClient.ListAllAttributes(ctx) if err != nil { - return &attributes.CreateAttributeGroupResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) + slog.Error(services.ErrListingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrListingResource) } + rsp.Attributes = list - err = s.dbClient.CreateResource(ctx, req.Group.Descriptor_, resource) - if err != nil { - slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) - return &attributes.CreateAttributeGroupResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - return &attributes.CreateAttributeGroupResponse{}, nil + return rsp, nil } -func (s *AttributesService) ListAttributes(ctx context.Context, - req *attributes.ListAttributesRequest) (*attributes.ListAttributesResponse, error) { - attributesList := &attributes.ListAttributesResponse{} - - rows, err := s.dbClient.ListResources( - ctx, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION.String(), - req.Selector, - ) +//nolint:dupl // there probably is duplication in these crud operations but its not worth refactoring yet. +func (s *AttributesService) GetAttribute(ctx context.Context, + req *attributes.GetAttributeRequest) (*attributes.GetAttributeResponse, error) { + rsp := &attributes.GetAttributeResponse{} + item, err := s.dbClient.GetAttribute(ctx, req.Id) if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return attributesList, status.Error(codes.Internal, services.ErrListingResource) - } - defer rows.Close() - - for rows.Next() { - var ( - id int32 - definition = new(attributes.AttributeDefinition) - bDefinition []byte - ) - err = rows.Scan(&id, &bDefinition) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return attributesList, status.Error(codes.Internal, services.ErrListingResource) - } - - err = protojson.Unmarshal(bDefinition, definition) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return attributesList, status.Error(codes.Internal, services.ErrListingResource) - } - - definition.Descriptor_.Id = id - attributesList.Definitions = append(attributesList.Definitions, definition) - } - - if err := rows.Err(); err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return attributesList, status.Error(codes.Internal, services.ErrListingResource) + slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrGettingResource) } + rsp.Attribute = item - return attributesList, nil + return rsp, err } -func (s *AttributesService) ListAttributeGroups(ctx context.Context, - req *attributes.ListAttributeGroupsRequest) (*attributes.ListAttributeGroupsResponse, error) { - var ( - groups = new(attributes.ListAttributeGroupsResponse) - ) - rows, err := s.dbClient.ListResources( - ctx, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), - req.Selector, - ) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return groups, status.Error(codes.Internal, services.ErrListingResource) - } - defer rows.Close() - for rows.Next() { - var ( - id int32 - group = new(attributes.AttributeGroup) - bGroup []byte - ) - // var tmpDefinition []byte - err = rows.Scan(&id, &bGroup) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return groups, status.Error(codes.Internal, services.ErrListingResource) - } - - err = protojson.Unmarshal(bGroup, group) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return groups, status.Error(codes.Internal, services.ErrListingResource) - } - - group.Descriptor_.Id = id - groups.Groups = append(groups.Groups, group) - } +func (s *AttributesService) UpdateAttribute(ctx context.Context, + req *attributes.UpdateAttributeRequest) (*attributes.UpdateAttributeResponse, error) { + rsp := &attributes.UpdateAttributeResponse{} - if err := rows.Err(); err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return groups, status.Error(codes.Internal, services.ErrListingResource) + a, err := s.dbClient.UpdateAttribute(ctx, req.Id, req.Attribute) + if err != nil { + slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) + return &attributes.UpdateAttributeResponse{}, + status.Error(codes.Internal, services.ErrUpdatingResource) } + rsp.Attribute = a - return groups, nil + return rsp, nil } -//nolint:dupl // there probably is duplication in these crud operations but its not worth refactoring yet. -func (s *AttributesService) GetAttribute(ctx context.Context, - req *attributes.GetAttributeRequest) (*attributes.GetAttributeResponse, error) { - var ( - definition = &attributes.GetAttributeResponse{ - Definition: new(attributes.AttributeDefinition), - } - id int32 - bDefinition []byte - ) - - row, err := s.dbClient.GetResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION.String(), - ) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return definition, status.Error(codes.Internal, services.ErrGettingResource) - } +func (s *AttributesService) DeleteAttribute(ctx context.Context, + req *attributes.DeleteAttributeRequest) (*attributes.DeleteAttributeResponse, error) { + rsp := &attributes.DeleteAttributeResponse{} - err = row.Scan(&id, &bDefinition) + a, err := s.dbClient.DeleteAttribute(ctx, req.Id) if err != nil { - if errors.Is(err, pgx.ErrNoRows) { - slog.Info(services.ErrNotFound, slog.Int("id", int(req.Id))) - return definition, status.Error(codes.NotFound, services.ErrNotFound) - } - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return definition, status.Error(codes.Internal, services.ErrGettingResource) + slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrDeletingResource) } + rsp.Attribute = a + + return rsp, nil +} + +/// +/// Attribute Values +/// - err = protojson.Unmarshal(bDefinition, definition.Definition) +func (s *AttributesService) CreateAttributeValue(ctx context.Context, req *attributes.CreateAttributeValueRequest) (*attributes.CreateAttributeValueResponse, error) { + item, err := s.dbClient.CreateAttributeValue(ctx, req.AttributeId, req.Value) if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return definition, status.Error(codes.Internal, services.ErrGettingResource) + slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrCreatingResource) } - definition.Definition.Descriptor_.Id = id - - return definition, nil + return &attributes.CreateAttributeValueResponse{ + Value: item, + }, nil } -//nolint:dupl // there probably is duplication in these crud operations but its not worth refactoring yet. -func (s *AttributesService) GetAttributeGroup(ctx context.Context, - req *attributes.GetAttributeGroupRequest) (*attributes.GetAttributeGroupResponse, error) { - var ( - group = &attributes.GetAttributeGroupResponse{ - Group: new(attributes.AttributeGroup), - } - id int32 - bGroup []byte - ) - - row, err := s.dbClient.GetResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), - ) +func (s *AttributesService) ListAttributeValues(ctx context.Context, req *attributes.ListAttributeValuesRequest) (*attributes.ListAttributeValuesResponse, error) { + list, err := s.dbClient.ListAttributeValues(ctx, req.AttributeId) if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return group, status.Error(codes.Internal, services.ErrGettingResource) + slog.Error(services.ErrListingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrListingResource) } - err = row.Scan(&id, &bGroup) + return &attributes.ListAttributeValuesResponse{ + Values: list, + }, nil +} + +func (s *AttributesService) GetAttributeValue(ctx context.Context, req *attributes.GetAttributeValueRequest) (*attributes.GetAttributeValueResponse, error) { + item, err := s.dbClient.GetAttributeValue(ctx, req.Id) if err != nil { - if errors.Is(err, pgx.ErrNoRows) { - slog.Info(services.ErrNotFound, slog.Int("id", int(req.Id))) - return group, status.Error(codes.NotFound, services.ErrNotFound) - } slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return group, status.Error(codes.Internal, services.ErrGettingResource) + return nil, status.Error(codes.Internal, services.ErrGettingResource) } - err = protojson.Unmarshal(bGroup, group.Group) + return &attributes.GetAttributeValueResponse{ + Value: item, + }, nil +} + +func (s *AttributesService) UpdateAttributeValue(ctx context.Context, req *attributes.UpdateAttributeValueRequest) (*attributes.UpdateAttributeValueResponse, error) { + a, err := s.dbClient.UpdateAttributeValue(ctx, req.Id, req.Value) if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return group, status.Error(codes.Internal, services.ErrGettingResource) + slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) + return nil, + status.Error(codes.Internal, services.ErrUpdatingResource) } - group.Group.Descriptor_.Id = id - - return group, nil + return &attributes.UpdateAttributeValueResponse{ + Value: a, + }, nil } -func (s *AttributesService) UpdateAttribute(ctx context.Context, - req *attributes.UpdateAttributeRequest) (*attributes.UpdateAttributeResponse, error) { - resource, err := protojson.Marshal(req.Definition) +func (s *AttributesService) DeleteAttributeValue(ctx context.Context, req *attributes.DeleteAttributeValueRequest) (*attributes.DeleteAttributeValueResponse, error) { + a, err := s.dbClient.DeleteAttributeValue(ctx, req.Id) if err != nil { - return &attributes.UpdateAttributeResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) + slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrDeletingResource) } - err = s.dbClient.UpdateResource( - ctx, - req.Definition.Descriptor_, - resource, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION.String(), - ) + return &attributes.DeleteAttributeValueResponse{ + Value: a, + }, nil +} + +func (s *AttributesService) AssignKeyAccessServerToAttribute(ctx context.Context, req *attributes.AssignKeyAccessServerToAttributeRequest) (*attributes.AssignKeyAccessServerToAttributeResponse, error) { + attributeKas, err := s.dbClient.AssignKeyAccessServerToAttribute(ctx, req.AttributeKeyAccessServer) if err != nil { slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) - return &attributes.UpdateAttributeResponse{}, - status.Error(codes.Internal, services.ErrUpdatingResource) + return nil, status.Error(codes.Internal, services.ErrUpdatingResource) } - return &attributes.UpdateAttributeResponse{}, nil + + return &attributes.AssignKeyAccessServerToAttributeResponse{ + AttributeKeyAccessServer: attributeKas, + }, nil } -func (s *AttributesService) UpdateAttributeGroup(ctx context.Context, - req *attributes.UpdateAttributeGroupRequest) (*attributes.UpdateAttributeGroupResponse, error) { - resource, err := protojson.Marshal(req.Group) +func (s *AttributesService) RemoveKeyAccessServerFromAttribute(ctx context.Context, req *attributes.RemoveKeyAccessServerFromAttributeRequest) (*attributes.RemoveKeyAccessServerFromAttributeResponse, error) { + attributeKas, err := s.dbClient.RemoveKeyAccessServerFromAttribute(ctx, req.AttributeKeyAccessServer) if err != nil { - return &attributes.UpdateAttributeGroupResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) + slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrUpdatingResource) } - err = s.dbClient.UpdateResource( - ctx, - req.Group.Descriptor_, resource, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), - ) + return &attributes.RemoveKeyAccessServerFromAttributeResponse{ + AttributeKeyAccessServer: attributeKas, + }, nil +} + +func (s *AttributesService) AssignKeyAccessServerToValue(ctx context.Context, req *attributes.AssignKeyAccessServerToValueRequest) (*attributes.AssignKeyAccessServerToValueResponse, error) { + valueKas, err := s.dbClient.AssignKeyAccessServerToValue(ctx, req.ValueKeyAccessServer) if err != nil { slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) - return &attributes.UpdateAttributeGroupResponse{}, - status.Error(codes.Internal, services.ErrUpdatingResource) + return nil, status.Error(codes.Internal, services.ErrUpdatingResource) } - return &attributes.UpdateAttributeGroupResponse{}, nil -} -func (s *AttributesService) DeleteAttribute(ctx context.Context, - req *attributes.DeleteAttributeRequest) (*attributes.DeleteAttributeResponse, error) { - if err := s.dbClient.DeleteResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION.String(), - ); err != nil { - slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) - return &attributes.DeleteAttributeResponse{}, status.Error(codes.Internal, - services.ErrDeletingResource) - } - return &attributes.DeleteAttributeResponse{}, nil + return &attributes.AssignKeyAccessServerToValueResponse{ + ValueKeyAccessServer: valueKas, + }, nil } -func (s *AttributesService) DeleteAttributeGroup(ctx context.Context, - req *attributes.DeleteAttributeGroupRequest) (*attributes.DeleteAttributeGroupResponse, error) { - if err := s.dbClient.DeleteResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_GROUP.String(), - ); err != nil { - slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) - return &attributes.DeleteAttributeGroupResponse{}, - status.Error(codes.Internal, services.ErrDeletingResource) +func (s *AttributesService) RemoveKeyAccessServerFromValue(ctx context.Context, req *attributes.RemoveKeyAccessServerFromValueRequest) (*attributes.RemoveKeyAccessServerFromValueResponse, error) { + valueKas, err := s.dbClient.RemoveKeyAccessServerFromValue(ctx, req.ValueKeyAccessServer) + if err != nil { + slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrUpdatingResource) } - return &attributes.DeleteAttributeGroupResponse{}, nil + + return &attributes.RemoveKeyAccessServerFromValueResponse{ + ValueKeyAccessServer: valueKas, + }, nil } diff --git a/services/attributes/attributes_test.go b/services/attributes/attributes_test.gox similarity index 100% rename from services/attributes/attributes_test.go rename to services/attributes/attributes_test.gox diff --git a/services/kasregistry/key_access_server_registry.go b/services/kasregistry/key_access_server_registry.go new file mode 100644 index 0000000000..c8f842498d --- /dev/null +++ b/services/kasregistry/key_access_server_registry.go @@ -0,0 +1,113 @@ +package kasregistry + +import ( + "context" + "errors" + "fmt" + "log/slog" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/jackc/pgx/v5" + "github.com/opentdf/opentdf-v2-poc/internal/db" + kasr "github.com/opentdf/opentdf-v2-poc/sdk/kasregistry" + "github.com/opentdf/opentdf-v2-poc/services" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type KeyAccessServerRegistry struct { + kasr.UnimplementedKeyAccessServerRegistryServiceServer + dbClient *db.Client +} + +func NewKeyAccessServerRegistryServer(dbClient *db.Client, grpcServer *grpc.Server, mux *runtime.ServeMux) error { + kagSvc := &KeyAccessServerRegistry{ + dbClient: dbClient, + } + kasr.RegisterKeyAccessServerRegistryServiceServer(grpcServer, kagSvc) + + err := kasr.RegisterKeyAccessServerRegistryServiceHandlerServer(context.Background(), mux, kagSvc) + if err != nil { + return fmt.Errorf("failed to register key access server service handler: %w", err) + } + return nil +} + +func (s KeyAccessServerRegistry) CreateKeyAccessServer(ctx context.Context, + req *kasr.CreateKeyAccessServerRequest) (*kasr.CreateKeyAccessServerResponse, error) { + slog.Debug("creating key access server") + + ks, err := s.dbClient.CreateKeyAccessServer(ctx, req.KeyAccessServer) + + if err != nil { + slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, + fmt.Sprintf("%v: %v", services.ErrCreatingResource, err)) + } + + return &kasr.CreateKeyAccessServerResponse{ + KeyAccessServer: ks, + }, nil +} + +func (s KeyAccessServerRegistry) ListKeyAccessServers(ctx context.Context, + req *kasr.ListKeyAccessServersRequest) (*kasr.ListKeyAccessServersResponse, error) { + + keyAccessServers, err := s.dbClient.ListKeyAccessServers(ctx) + if err != nil { + slog.Error(services.ErrListingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrListingResource) + } + + return &kasr.ListKeyAccessServersResponse{ + KeyAccessServers: keyAccessServers, + }, nil +} + +func (s KeyAccessServerRegistry) GetKeyAccessServer(ctx context.Context, + req *kasr.GetKeyAccessServerRequest) (*kasr.GetKeyAccessServerResponse, error) { + keyAccessServer, err := s.dbClient.GetKeyAccessServer(ctx, req.Id) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + slog.Error(services.ErrNotFound, slog.String("error", err.Error()), slog.String("id", req.Id)) + return nil, status.Error(codes.NotFound, services.ErrNotFound) + } + slog.Error(services.ErrGettingResource, slog.String("error", err.Error()), slog.String("id", req.Id)) + return nil, status.Error(codes.Internal, services.ErrGettingResource) + } + + return &kasr.GetKeyAccessServerResponse{ + KeyAccessServer: keyAccessServer, + }, nil +} + +func (s KeyAccessServerRegistry) UpdateKeyAccessServer(ctx context.Context, + req *kasr.UpdateKeyAccessServerRequest) (*kasr.UpdateKeyAccessServerResponse, error) { + k, err := s.dbClient.UpdateKeyAccessServer(ctx, req.Id, req.KeyAccessServer) + if err != nil { + slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error()), slog.String("id", req.Id)) + return nil, + status.Error(codes.Internal, services.ErrUpdatingResource) + } + return &kasr.UpdateKeyAccessServerResponse{ + KeyAccessServer: k, + }, nil +} + +func (s KeyAccessServerRegistry) DeleteKeyAccessServer(ctx context.Context, + req *kasr.DeleteKeyAccessServerRequest) (*kasr.DeleteKeyAccessServerResponse, error) { + keyAccessServer, err := s.dbClient.DeleteKeyAccessServer(ctx, req.Id) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + slog.Error(services.ErrNotFound, slog.String("error", err.Error()), slog.String("id", req.Id)) + return nil, status.Error(codes.NotFound, services.ErrNotFound) + } + slog.Error(services.ErrDeletingResource, slog.String("error", err.Error()), slog.String("id", req.Id)) + return nil, + status.Error(codes.Internal, services.ErrDeletingResource) + } + return &kasr.DeleteKeyAccessServerResponse{ + KeyAccessServer: keyAccessServer, + }, nil +} diff --git a/services/keyaccessgrants/key_access_grants_test.go b/services/kasregistry/key_access_server_registry_test.gox similarity index 100% rename from services/keyaccessgrants/key_access_grants_test.go rename to services/kasregistry/key_access_server_registry_test.gox diff --git a/services/keyaccessgrants/key_access_grants.go b/services/keyaccessgrants/key_access_grants.go deleted file mode 100644 index 5b253a293d..0000000000 --- a/services/keyaccessgrants/key_access_grants.go +++ /dev/null @@ -1,187 +0,0 @@ -package keyaccessgrants - -import ( - "context" - "errors" - "fmt" - "log/slog" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/jackc/pgx/v5" - "github.com/opentdf/opentdf-v2-poc/internal/db" - "github.com/opentdf/opentdf-v2-poc/sdk/common" - kag "github.com/opentdf/opentdf-v2-poc/sdk/keyaccessgrants" - "github.com/opentdf/opentdf-v2-poc/services" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/encoding/protojson" -) - -type KeyAccessGrantsService struct { - kag.UnimplementedKeyAccessGrantsServiceServer - dbClient *db.Client -} - -func NewKeyAccessGrantsServer(dbClient *db.Client, grpcServer *grpc.Server, mux *runtime.ServeMux) error { - kagSvc := &KeyAccessGrantsService{ - dbClient: dbClient, - } - kag.RegisterKeyAccessGrantsServiceServer(grpcServer, kagSvc) - - err := kag.RegisterKeyAccessGrantsServiceHandlerServer(context.Background(), mux, kagSvc) - if err != nil { - return fmt.Errorf("failed to register key access grants service handler: %w", err) - } - return nil -} - -func (s KeyAccessGrantsService) CreateKeyAccessGrants(ctx context.Context, - req *kag.CreateKeyAccessGrantsRequest) (*kag.CreateKeyAccessGrantsResponse, error) { - slog.Debug("creating key access grant") - - // Set the version of the resource to 1 on create - req.Grants.Descriptor_.Version = 1 - - resource, err := protojson.Marshal(req.Grants) - if err != nil { - return &kag.CreateKeyAccessGrantsResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.CreateResource(ctx, req.Grants.Descriptor_, resource) - if err != nil { - slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) - return &kag.CreateKeyAccessGrantsResponse{}, status.Error(codes.Internal, - fmt.Sprintf("%v: %v", services.ErrCreatingResource, err)) - } - - return &kag.CreateKeyAccessGrantsResponse{}, nil -} - -func (s KeyAccessGrantsService) ListKeyAccessGrants(ctx context.Context, - req *kag.ListKeyAccessGrantsRequest) (*kag.ListKeyAccessGrantsResponse, error) { - grants := &kag.ListKeyAccessGrantsResponse{} - - rows, err := s.dbClient.ListResources( - ctx, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_KEY_ACCESS_GRANTS.String(), - req.Selector, - ) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return grants, status.Error(codes.Internal, services.ErrListingResource) - } - defer rows.Close() - - for rows.Next() { - var ( - id int32 - grant = new(kag.KeyAccessGrants) - bGrant []byte - ) - err = rows.Scan(&id, &bGrant) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return grants, status.Error(codes.Internal, services.ErrListingResource) - } - - err = protojson.Unmarshal(bGrant, grant) - if err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return grants, status.Error(codes.Internal, services.ErrListingResource) - } - - grant.Descriptor_.Id = id - grants.Grants = append(grants.Grants, grant) - } - - if err := rows.Err(); err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return grants, status.Error(codes.Internal, services.ErrListingResource) - } - - if err := rows.Err(); err != nil { - slog.Error(services.ErrListingResource, slog.String("error", err.Error())) - return grants, status.Error(codes.Internal, services.ErrListingResource) - } - - return grants, nil -} - -func (s KeyAccessGrantsService) GetKeyAccessGrant(ctx context.Context, - req *kag.GetKeyAccessGrantRequest) (*kag.GetKeyAccessGrantResponse, error) { - var ( - grant = &kag.GetKeyAccessGrantResponse{ - Grants: new(kag.KeyAccessGrants), - } - id int32 - bGrant []byte - ) - - row, err := s.dbClient.GetResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_KEY_ACCESS_GRANTS.String(), - ) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return grant, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = row.Scan(&id, &bGrant) - if err != nil { - if errors.Is(err, pgx.ErrNoRows) { - slog.Info(services.ErrNotFound, slog.Int("id", int(req.Id))) - return grant, status.Error(codes.NotFound, services.ErrNotFound) - } - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return grant, status.Error(codes.Internal, services.ErrGettingResource) - } - - err = protojson.Unmarshal(bGrant, grant.Grants) - if err != nil { - slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) - return grant, status.Error(codes.Internal, services.ErrGettingResource) - } - - grant.Grants.Descriptor_.Id = id - - return grant, nil -} - -func (s KeyAccessGrantsService) UpdateKeyAccessGrants(ctx context.Context, - req *kag.UpdateKeyAccessGrantsRequest) (*kag.UpdateKeyAccessGrantsResponse, error) { - resource, err := protojson.Marshal(req.Grants) - if err != nil { - return &kag.UpdateKeyAccessGrantsResponse{}, - status.Error(codes.Internal, services.ErrCreatingResource) - } - - err = s.dbClient.UpdateResource( - ctx, - req.Grants.Descriptor_, - resource, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_KEY_ACCESS_GRANTS.String(), - ) - if err != nil { - slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) - return &kag.UpdateKeyAccessGrantsResponse{}, - status.Error(codes.Internal, services.ErrUpdatingResource) - } - return &kag.UpdateKeyAccessGrantsResponse{}, nil -} - -func (s KeyAccessGrantsService) DeleteKeyAccessGrants(ctx context.Context, - req *kag.DeleteKeyAccessGrantsRequest) (*kag.DeleteKeyAccessGrantsResponse, error) { - if err := s.dbClient.DeleteResource( - ctx, - req.Id, - common.PolicyResourceType_POLICY_RESOURCE_TYPE_KEY_ACCESS_GRANTS.String(), - ); err != nil { - slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) - return &kag.DeleteKeyAccessGrantsResponse{}, - status.Error(codes.Internal, services.ErrDeletingResource) - } - return &kag.DeleteKeyAccessGrantsResponse{}, nil -} diff --git a/services/namespaces/namespaces.go b/services/namespaces/namespaces.go new file mode 100644 index 0000000000..d97e44dc2d --- /dev/null +++ b/services/namespaces/namespaces.go @@ -0,0 +1,125 @@ +package namespaces + +import ( + "context" + "errors" + "fmt" + "log/slog" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/opentdf/opentdf-v2-poc/internal/db" + "github.com/opentdf/opentdf-v2-poc/sdk/namespaces" + "github.com/opentdf/opentdf-v2-poc/services" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type NamespacesService struct { + namespaces.UnimplementedNamespaceServiceServer + dbClient *db.Client +} + +func NewNamespacesServer(dbClient *db.Client, g *grpc.Server, s *runtime.ServeMux) error { + ns := &NamespacesService{ + dbClient: dbClient, + } + namespaces.RegisterNamespaceServiceServer(g, ns) + err := namespaces.RegisterNamespaceServiceHandlerServer(context.Background(), s, ns) + if err != nil { + return fmt.Errorf("failed to register namespace service handler: %w", err) + } + return nil +} + +func (ns NamespacesService) ListNamespaces(ctx context.Context, req *namespaces.ListNamespacesRequest) (*namespaces.ListNamespacesResponse, error) { + slog.Debug("listing namespaces") + + rsp := &namespaces.ListNamespacesResponse{} + list, err := ns.dbClient.ListNamespaces(ctx) + if err != nil { + return nil, status.Error(codes.Internal, services.ErrListingResource) + } + + slog.Debug("listed namespaces") + rsp.Namespaces = list + + return rsp, nil +} + +func (ns NamespacesService) GetNamespace(ctx context.Context, req *namespaces.GetNamespaceRequest) (*namespaces.GetNamespaceResponse, error) { + slog.Debug("getting namespace", slog.String("id", req.Id)) + + rsp := &namespaces.GetNamespaceResponse{} + + namespace, err := ns.dbClient.GetNamespace(ctx, req.Id) + if err != nil { + if errors.Is(err, db.ErrNotFound) { + return nil, status.Error(codes.NotFound, services.ErrNotFound) + } + return nil, status.Error(codes.Internal, services.ErrGettingResource) + } + + slog.Debug("got namespace", slog.String("id", req.Id)) + rsp.Namespace = namespace + + return rsp, nil +} + +func (ns NamespacesService) CreateNamespace(ctx context.Context, req *namespaces.CreateNamespaceRequest) (*namespaces.CreateNamespaceResponse, error) { + slog.Debug("creating new namespace", slog.String("name", req.Name)) + rsp := &namespaces.CreateNamespaceResponse{} + + id, err := ns.dbClient.CreateNamespace(ctx, req.Name) + if err != nil { + if errors.Is(err, db.ErrUniqueConstraintViolation) { + return nil, status.Error(codes.AlreadyExists, services.ErrConflict) + } + return nil, status.Error(codes.Internal, services.ErrCreatingResource) + } + + slog.Debug("created new namespace", slog.String("name", req.Name)) + rsp.Namespace = &namespaces.Namespace{ + Id: id, + // TODO: are we responding with id only or the entire new namespace? + // Name: req.Namespace.Name, + } + + return rsp, nil +} + +func (ns NamespacesService) UpdateNamespace(ctx context.Context, req *namespaces.UpdateNamespaceRequest) (*namespaces.UpdateNamespaceResponse, error) { + slog.Debug("updating namespace", slog.String("name", req.Name)) + rsp := &namespaces.UpdateNamespaceResponse{} + + namespace, err := ns.dbClient.UpdateNamespace(ctx, req.Id, req.Name) + if err != nil { + if errors.Is(err, db.ErrUniqueConstraintViolation) { + return nil, status.Error(codes.AlreadyExists, services.ErrConflict) + } + if errors.Is(err, db.ErrNotFound) { + return nil, status.Error(codes.NotFound, services.ErrNotFound) + } + return nil, status.Error(codes.Internal, services.ErrUpdatingResource) + } + + slog.Debug("updated namespace", slog.String("name", req.Name)) + rsp.Namespace = namespace + + return rsp, nil +} + +func (ns NamespacesService) DeleteNamespace(ctx context.Context, req *namespaces.DeleteNamespaceRequest) (*namespaces.DeleteNamespaceResponse, error) { + slog.Debug("deleting namespace", slog.String("id", req.Id)) + rsp := &namespaces.DeleteNamespaceResponse{} + + if err := ns.dbClient.DeleteNamespace(ctx, req.Id); err != nil { + if errors.Is(err, db.ErrNotFound) { + return nil, status.Error(codes.NotFound, services.ErrNotFound) + } + return nil, status.Error(codes.Internal, services.ErrDeletingResource) + } + + slog.Debug("deleted namespace", slog.String("id", req.Id)) + return rsp, nil +} diff --git a/services/namespaces/namespaces_test.go b/services/namespaces/namespaces_test.go new file mode 100644 index 0000000000..d6ba53607a --- /dev/null +++ b/services/namespaces/namespaces_test.go @@ -0,0 +1,29 @@ +package namespaces + +import ( + "log/slog" + + "github.com/opentdf/opentdf-v2-poc/internal/db" + "github.com/pashagolub/pgxmock/v3" + "github.com/stretchr/testify/suite" +) + +type NamespacesSuite struct { + suite.Suite + mock pgxmock.PgxPoolIface + namespaceServer *NamespacesService +} + +func (suite *NamespacesSuite) SetupTest() { + mock, err := pgxmock.NewPool() + if err != nil { + slog.Error("failed to create mock database connection", slog.String("error", err.Error())) + } + suite.mock = mock + suite.namespaceServer = &NamespacesService{ + dbClient: &db.Client{ + PgxIface: mock, + }, + } +} + diff --git a/services/resourcemapping/resource_mapping.go b/services/resourcemapping/resource_mapping.go new file mode 100644 index 0000000000..e60ac67b46 --- /dev/null +++ b/services/resourcemapping/resource_mapping.go @@ -0,0 +1,116 @@ +package resourcemapping + +import ( + "context" + "errors" + "log/slog" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/jackc/pgx/v5" + "github.com/opentdf/opentdf-v2-poc/internal/db" + "github.com/opentdf/opentdf-v2-poc/sdk/resourcemapping" + "github.com/opentdf/opentdf-v2-poc/services" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type ResourceMappingService struct { + resourcemapping.UnimplementedResourceMappingServiceServer + dbClient *db.Client +} + +func NewResourceMappingServer(dbClient *db.Client, grpcServer *grpc.Server, mux *runtime.ServeMux) error { + as := &ResourceMappingService{ + dbClient: dbClient, + } + resourcemapping.RegisterResourceMappingServiceServer(grpcServer, as) + err := resourcemapping.RegisterResourceMappingServiceHandlerServer(context.Background(), mux, as) + if err != nil { + return errors.New("failed to register resource encoding service handler") + } + return nil +} + +/* + Resource Mappings +*/ + +func (s ResourceMappingService) CreateResourceMapping(ctx context.Context, + req *resourcemapping.CreateResourceMappingRequest) (*resourcemapping.CreateResourceMappingResponse, error) { + slog.Debug("creating resource mapping") + + rm, err := s.dbClient.CreateResourceMapping(ctx, req.ResourceMapping) + if err != nil { + slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrCreatingResource) + } + + return &resourcemapping.CreateResourceMappingResponse{ + ResourceMapping: rm, + }, nil +} + +func (s ResourceMappingService) ListResourceMappings(ctx context.Context, + req *resourcemapping.ListResourceMappingsRequest) (*resourcemapping.ListResourceMappingsResponse, error) { + resourceMappings, err := s.dbClient.ListResourceMappings(ctx) + if err != nil { + slog.Error(services.ErrListingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrListingResource) + } + + return &resourcemapping.ListResourceMappingsResponse{ + ResourceMappings: resourceMappings, + }, nil +} + +func (s ResourceMappingService) GetResourceMapping(ctx context.Context, + req *resourcemapping.GetResourceMappingRequest) (*resourcemapping.GetResourceMappingResponse, error) { + rm, err := s.dbClient.GetResourceMapping(ctx, req.Id) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + slog.Error(services.ErrNotFound, slog.String("error", err.Error())) + return nil, status.Error(codes.NotFound, services.ErrNotFound) + } + slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrGettingResource) + } + + return &resourcemapping.GetResourceMappingResponse{ + ResourceMapping: rm, + }, nil +} + +func (s ResourceMappingService) UpdateResourceMapping(ctx context.Context, + req *resourcemapping.UpdateResourceMappingRequest) (*resourcemapping.UpdateResourceMappingResponse, error) { + rm, err := s.dbClient.UpdateResourceMapping( + ctx, + req.Id, + req.ResourceMapping, + ) + if err != nil { + slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) + return nil, + status.Error(codes.Internal, services.ErrUpdatingResource) + } + return &resourcemapping.UpdateResourceMappingResponse{ + ResourceMapping: rm, + }, nil +} + +func (s ResourceMappingService) DeleteResourceMapping(ctx context.Context, + req *resourcemapping.DeleteResourceMappingRequest) (*resourcemapping.DeleteResourceMappingResponse, error) { + rm, err := s.dbClient.DeleteResourceMapping(ctx, req.Id) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + slog.Error(services.ErrNotFound, slog.String("error", err.Error())) + return nil, status.Error(codes.NotFound, services.ErrNotFound) + } + slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrDeletingResource) + } + return &resourcemapping.DeleteResourceMappingResponse{ + ResourceMapping: rm, + }, nil +} diff --git a/services/acre/acre_test.go b/services/resourcemapping/resource_mapping_test.gox similarity index 100% rename from services/acre/acre_test.go rename to services/resourcemapping/resource_mapping_test.gox diff --git a/services/response_messages.go b/services/response_messages.go index 43ec20c6a2..0ebfabe301 100644 --- a/services/response_messages.go +++ b/services/response_messages.go @@ -7,4 +7,5 @@ const ( ErrListingResource = "failed to list resources" ErrUpdatingResource = "failed to update resource" ErrNotFound = "resource not found" + ErrConflict = "resource unique field violation" ) diff --git a/services/acse/acse_test.go b/services/subjectmapping/acse_test.gox similarity index 100% rename from services/acse/acse_test.go rename to services/subjectmapping/acse_test.gox diff --git a/services/subjectmapping/subjectmapping.go b/services/subjectmapping/subjectmapping.go new file mode 100644 index 0000000000..56953133f7 --- /dev/null +++ b/services/subjectmapping/subjectmapping.go @@ -0,0 +1,117 @@ +package subjectmapping + +import ( + "context" + "errors" + "fmt" + "log/slog" + + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/jackc/pgx/v5" + "github.com/opentdf/opentdf-v2-poc/internal/db" + "github.com/opentdf/opentdf-v2-poc/sdk/subjectmapping" + + "github.com/opentdf/opentdf-v2-poc/services" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +type SubjectMappingService struct { + subjectmapping.UnimplementedSubjectMappingServiceServer + dbClient *db.Client +} + +func NewSubjectMappingServer(dbClient *db.Client, grpcServer *grpc.Server, + grpcInprocess *grpc.Server, mux *runtime.ServeMux) error { + s := &SubjectMappingService{ + dbClient: dbClient, + } + subjectmapping.RegisterSubjectMappingServiceServer(grpcServer, s) + if grpcInprocess != nil { + subjectmapping.RegisterSubjectMappingServiceServer(grpcInprocess, s) + } + err := subjectmapping.RegisterSubjectMappingServiceHandlerServer(context.Background(), mux, s) + if err != nil { + return fmt.Errorf("failed to register subject encoding service handler: %w", err) + } + return nil +} + +func (s SubjectMappingService) CreateSubjectMapping(ctx context.Context, + req *subjectmapping.CreateSubjectMappingRequest) (*subjectmapping.CreateSubjectMappingResponse, error) { + rsp := &subjectmapping.CreateSubjectMappingResponse{} + slog.Debug("creating subject mapping") + + mappings, err := s.dbClient.CreateSubjectMapping(context.Background(), req.SubjectMapping) + if err != nil { + slog.Error(services.ErrCreatingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrCreatingResource) + } + rsp.SubjectMapping = mappings + + return rsp, nil +} + +func (s SubjectMappingService) ListSubjectMappings(ctx context.Context, + req *subjectmapping.ListSubjectMappingsRequest) (*subjectmapping.ListSubjectMappingsResponse, error) { + rsp := &subjectmapping.ListSubjectMappingsResponse{} + + mappings, err := s.dbClient.ListSubjectMappings(ctx) + if err != nil { + slog.Error(services.ErrListingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrListingResource) + } + + rsp.SubjectMappings = mappings + + return rsp, nil +} + +func (s SubjectMappingService) GetSubjectMapping(ctx context.Context, + req *subjectmapping.GetSubjectMappingRequest) (*subjectmapping.GetSubjectMappingResponse, error) { + rsp := &subjectmapping.GetSubjectMappingResponse{} + + mapping, err := s.dbClient.GetSubjectMapping(ctx, req.Id) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + return nil, status.Error(codes.NotFound, services.ErrNotFound) + } + slog.Error(services.ErrGettingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrGettingResource) + } + + rsp.SubjectMapping = mapping + + return rsp, nil +} + +func (s SubjectMappingService) UpdateSubjectMapping(ctx context.Context, + req *subjectmapping.UpdateSubjectMappingRequest) (*subjectmapping.UpdateSubjectMappingResponse, error) { + rsp := &subjectmapping.UpdateSubjectMappingResponse{} + + mapping, err := s.dbClient.UpdateSubjectMapping(ctx, req.Id, req.SubjectMapping) + if err != nil { + slog.Error(services.ErrUpdatingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrUpdatingResource) + } + + rsp.SubjectMapping = mapping + + return rsp, nil +} + +func (s SubjectMappingService) DeleteSubjectMapping(ctx context.Context, + req *subjectmapping.DeleteSubjectMappingRequest) (*subjectmapping.DeleteSubjectMappingResponse, error) { + rsp := &subjectmapping.DeleteSubjectMappingResponse{} + + mapping, err := s.dbClient.DeleteSubjectMapping(ctx, req.Id) + if err != nil { + slog.Error(services.ErrDeletingResource, slog.String("error", err.Error())) + return nil, status.Error(codes.Internal, services.ErrDeletingResource) + } + + rsp.SubjectMapping = mapping + + return rsp, nil +} diff --git a/tests/acre_test.go b/tests/acre_test.go deleted file mode 100644 index b48cc2c1d7..0000000000 --- a/tests/acre_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package tests - -import ( - "testing" - - "github.com/opentdf/opentdf-v2-poc/sdk/acre" - "github.com/stretchr/testify/suite" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" -) - -type AcreSuite struct { - suite.Suite - conn *grpc.ClientConn - client acre.ResourceEncodingServiceClient -} - -func (suite *AcreSuite) SetupSuite() { - conn, err := grpc.Dial("localhost:9000", grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - suite.T().Fatal(err) - } - suite.conn = conn - - suite.client = acre.NewResourceEncodingServiceClient(conn) -} - -func (suite *AcreSuite) TearDownSuite() { - suite.conn.Close() -} - -func TestAcreSuite(t *testing.T) { - if testing.Short() { - t.Skip("skipping acre integration tests") - } - suite.Run(t, new(AcreSuite)) -} diff --git a/tests/acse_test.go b/tests/acse_test.go deleted file mode 100644 index c8caa626d7..0000000000 --- a/tests/acse_test.go +++ /dev/null @@ -1,37 +0,0 @@ -package tests - -import ( - "testing" - - "github.com/opentdf/opentdf-v2-poc/sdk/acse" - "github.com/stretchr/testify/suite" - "google.golang.org/grpc" - "google.golang.org/grpc/credentials/insecure" -) - -type AcseSuite struct { - suite.Suite - conn *grpc.ClientConn - client acse.SubjectEncodingServiceClient -} - -func (suite *AcseSuite) SetupSuite() { - conn, err := grpc.Dial("localhost:9000", grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - suite.T().Fatal(err) - } - suite.conn = conn - - suite.client = acse.NewSubjectEncodingServiceClient(conn) -} - -func (suite *AcseSuite) TearDownSuite() { - suite.conn.Close() -} - -func TestAcseSuite(t *testing.T) { - if testing.Short() { - t.Skip("skipping acse integration tests") - } - suite.Run(t, new(AcseSuite)) -} diff --git a/tests/attributes_test.go b/tests/attributes_test.go deleted file mode 100644 index 72b42480d4..0000000000 --- a/tests/attributes_test.go +++ /dev/null @@ -1,183 +0,0 @@ -package tests - -import ( - "context" - "encoding/json" - "log/slog" - "os" - "testing" - - "github.com/opentdf/opentdf-v2-poc/sdk/attributes" - "github.com/opentdf/opentdf-v2-poc/sdk/common" - "github.com/opentdf/opentdf-v2-poc/services" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/credentials/insecure" - "google.golang.org/grpc/status" -) - -const ( - definitionsTestData = "testdata/attributes/attribute_definitions.json" -) - -type AttributesSuite struct { - suite.Suite - conn *grpc.ClientConn - client attributes.AttributesServiceClient -} - -func (suite *AttributesSuite) SetupSuite() { - ctx := context.Background() - conn, err := grpc.Dial("localhost:9000", grpc.WithTransportCredentials(insecure.NewCredentials())) - if err != nil { - slog.Error("could not connect", slog.String("error", err.Error())) - suite.T().Fatal(err) - } - suite.conn = conn - - suite.client = attributes.NewAttributesServiceClient(conn) - - testData, err := os.ReadFile(definitionsTestData) - if err != nil { - slog.Error("could not read attributes.json", slog.String("error", err.Error())) - suite.T().Fatal(err) - } - - var attrs = make([]*attributes.AttributeDefinition, 0) - - err = json.Unmarshal(testData, &attrs) - - if err != nil { - slog.Error("could not unmarshal attributes.json", slog.String("error", err.Error())) - suite.T().Fatal(err) - } - - for _, attr := range attrs { - _, err = suite.client.CreateAttribute(ctx, &attributes.CreateAttributeRequest{ - Definition: attr, - }) - if err != nil { - slog.Error("could not create attribute", slog.String("error", err.Error())) - suite.T().Fatal(err) - } - } - slog.Info("loaded attributes test data") -} - -func (suite *AttributesSuite) TearDownSuite() { - slog.Info("tearing down attributes test suite") - defer suite.conn.Close() -} - -func TestAttributeSuite(t *testing.T) { - if testing.Short() { - t.Skip("skipping attributes integration tests") - } - suite.Run(t, new(AttributesSuite)) -} - -func (suite *AttributesSuite) Test_CreateAttribute_Returns_Success_When_Valid_Definition() { - definition := attributes.AttributeDefinition{ - Name: "relto", - Rule: attributes.AttributeDefinition_ATTRIBUTE_RULE_TYPE_ANY_OF, - Values: []*attributes.AttributeDefinitionValue{ - { - Value: "USA", - }, - { - Value: "GBR", - }, - }, - Descriptor_: &common.ResourceDescriptor{ - Version: 1, - Namespace: "virtru.com", - Name: "relto", - Type: common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION, - }, - } - - _, err := suite.client.CreateAttribute(context.Background(), &attributes.CreateAttributeRequest{ - Definition: &definition, - }) - - assert.Nil(suite.T(), err) -} - -func (suite *AttributesSuite) Test_CreateAttribute_Returns_BadRequest_When_InvalidRuleType() { - definition := attributes.AttributeDefinition{ - Name: "relto", - Rule: 543, - Values: []*attributes.AttributeDefinitionValue{ - { - Value: "USA", - }, - { - Value: "GBR", - }, - }, - Descriptor_: &common.ResourceDescriptor{ - Version: 1, - Namespace: "virtru.com", - Name: "relto", - Type: common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION, - }, - } - - _, err := suite.client.CreateAttribute(context.Background(), &attributes.CreateAttributeRequest{ - Definition: &definition, - }) - - if assert.Error(suite.T(), err) { - st, _ := status.FromError(err) - assert.Equal(suite.T(), codes.InvalidArgument, st.Code()) - assert.Equal(suite.T(), st.Message(), "validation error:\n - definition.rule: value must be one of the defined enum values [enum.defined_only]") - } -} - -func (suite *AttributesSuite) Test_CreateAttribute_Returns_BadRequest_When_InvalidNamespace() { - definition := attributes.AttributeDefinition{ - Name: "relto", - Rule: attributes.AttributeDefinition_ATTRIBUTE_RULE_TYPE_ANY_OF, - Values: []*attributes.AttributeDefinitionValue{ - { - Value: "USA", - }, - { - Value: "GBR", - }, - }, - Descriptor_: &common.ResourceDescriptor{ - Version: 1, - Namespace: "virtru", - Name: "relto", - Type: common.PolicyResourceType_POLICY_RESOURCE_TYPE_ATTRIBUTE_DEFINITION, - }, - } - - _, err := suite.client.CreateAttribute(context.Background(), &attributes.CreateAttributeRequest{ - Definition: &definition, - }) - - if assert.Error(suite.T(), err) { - st, _ := status.FromError(err) - assert.Equal(suite.T(), codes.InvalidArgument, st.Code()) - assert.Equal(suite.T(), st.Message(), "validation error:\n - definition.descriptor.namespace: Namespace must be a valid hostname. It should include at least one dot, with each segment (label) starting and ending with an alphanumeric character. Each label must be 1 to 63 characters long, allowing hyphens but not as the first or last character. The top-level domain (the last segment after the final dot) must consist of at least two alphabetic characters. [namespace_format]") - } -} - -func (suite *AttributesSuite) Test_GetAttribute_Returns_NotFound_When_ID_Does_Not_Exist() { - definition, err := suite.client.GetAttribute(context.Background(), &attributes.GetAttributeRequest{ - Id: 10000, - }) - assert.Nil(suite.T(), definition) - assert.NotNil(suite.T(), err) - - if assert.Error(suite.T(), err) { - st, _ := status.FromError(err) - assert.Equal(suite.T(), codes.NotFound, st.Code()) - assert.Equal(suite.T(), st.Message(), services.ErrNotFound) - } -} diff --git a/tests/main_test.go b/tests/main_test.go deleted file mode 100644 index 7832c4505a..0000000000 --- a/tests/main_test.go +++ /dev/null @@ -1,130 +0,0 @@ -package tests - -import ( - "context" - "log/slog" - "os" - "testing" - "time" - - "github.com/creasty/defaults" - "github.com/opentdf/opentdf-v2-poc/cmd" - "github.com/opentdf/opentdf-v2-poc/internal/config" - "github.com/opentdf/opentdf-v2-poc/internal/db" - "github.com/opentdf/opentdf-v2-poc/internal/opa" - "github.com/opentdf/opentdf-v2-poc/internal/server" - tc "github.com/testcontainers/testcontainers-go" - "github.com/testcontainers/testcontainers-go/wait" -) - -func TestMain(m *testing.M) { - ctx := context.Background() - conf := &config.Config{} - - if err := defaults.Set(conf); err != nil { - slog.Error("could not set defaults", slog.String("error", err.Error())) - os.Exit(1) - } - - /* - For podman - export TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED=true; # needed to run Reaper (alternative disable it TESTCONTAINERS_RYUK_DISABLED=true) - export TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock; # needed to apply the bind with statfs - */ - - var providerType tc.ProviderType - - if os.Getenv("TESTCONTAINERS_PODMAN") == "true" { - providerType = tc.ProviderPodman - } else { - providerType = tc.ProviderDocker - } - - req := tc.GenericContainerRequest{ - ProviderType: providerType, - ContainerRequest: tc.ContainerRequest{ - Image: "postgres:13.3", - Name: "testcontainer-postgres", - ExposedPorts: []string{"5432/tcp"}, - - Env: map[string]string{ - "POSTGRES_USER": conf.DB.User, - "POSTGRES_PASSWORD": conf.DB.Password, - "POSTGRES_DB": conf.DB.Database, - }, - - WaitingFor: wait.ForExec([]string{"pg_isready", "-h", "localhost", "-U", conf.DB.User}).WithStartupTimeout(120 * time.Second), - }, - Started: true, - } - - postgres, err := tc.GenericContainer(context.Background(), req) - if err != nil { - slog.Error("could not start postgres container", slog.String("error", err.Error())) - panic(err) - } - - // Cleanup the container - defer func() { - if err := postgres.Terminate(ctx); err != nil { - slog.Error("could not stop postgres container", slog.String("error", err.Error())) - return - } - - if err := recover(); err != nil { - os.Exit(1) - } - }() - - port, err := postgres.MappedPort(ctx, "5432/tcp") - if err != nil { - slog.Error("could not get postgres mapped port", slog.String("error", err.Error())) - panic(err) - } - - conf.DB.Port = port.Int() - - dbClient, err := db.NewClient(conf.DB) - if err != nil { - slog.Error("issue creating database client", slog.String("error", err.Error())) - panic(err) - } - - applied, err := dbClient.RunMigrations() - if err != nil { - slog.Error("issue running migrations", slog.String("error", err.Error())) - panic(err) - } - - slog.Info("applied migrations", slog.Int("count", applied)) - - otdf, err := server.NewOpenTDFServer(conf.Server) - if err != nil { - slog.Error("issue creating opentdf server", slog.String("error", err.Error())) - panic(err) - } - defer otdf.Stop() - - slog.Info("starting opa engine") - // Start the opa engine - conf.OPA.Embedded = true - eng, err := opa.NewEngine(conf.OPA) - if err != nil { - slog.Error("could not start opa engine", slog.String("error", err.Error())) - panic(err) - } - defer eng.Stop(context.Background()) - - // Register the services - err = cmd.RegisterServices(*conf, otdf, dbClient, eng) - if err != nil { - slog.Error("issue registering services", slog.String("error", err.Error())) - panic(err) - } - - // Start the server - slog.Info("starting opentdf server", slog.Int("grpcPort", conf.Server.Grpc.Port), slog.Int("httpPort", conf.Server.HTTP.Port)) - otdf.Run() - - m.Run() -} diff --git a/tests/testdata/acre/resource_groups.json b/tests/testdata/acre/resource_groups.json deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/testdata/acre/resource_mappings.json b/tests/testdata/acre/resource_mappings.json deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/testdata/acre/resource_synonyms.json b/tests/testdata/acre/resource_synonyms.json deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/testdata/acse/subject_mappings.json b/tests/testdata/acse/subject_mappings.json deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/testdata/attributes/attribute_definitions.json b/tests/testdata/attributes/attribute_definitions.json deleted file mode 100644 index 762314b9db..0000000000 --- a/tests/testdata/attributes/attribute_definitions.json +++ /dev/null @@ -1,53 +0,0 @@ -[ - - { - "name": "architecture", - "rule":2, - "values": [ - { - "value": "collaborator" - }, - { - "value": "contributor" - }, - { - "value": "owner" - } - ], - "descriptor": { - "labels": { - "group": "architecture", - "owner": "virtru" - }, - "description": "this is a test attribute engineering", - "namespace": "virtru.com", - "name": "architecture", - "type":7 - } - }, - { - "name": "engineering", - "rule":2, - "values": [ - { - "value": "collaborator" - }, - { - "value": "contributor" - }, - { - "value": "owner" - } - ], - "descriptor": { - "labels": { - "group": "engineering", - "owner": "virtru" - }, - "description": "this is a test attribute engineering", - "namespace": "virtru.com", - "name": "engineering", - "type":7 - } - } -] \ No newline at end of file diff --git a/tests/testdata/attributes/attribute_groups.json b/tests/testdata/attributes/attribute_groups.json deleted file mode 100644 index e69de29bb2..0000000000