From a5423e8a43e46664b850b28324b17a19ce0e92d8 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Thu, 29 Feb 2024 09:55:28 -0500 Subject: [PATCH 1/9] WIP --- ...240228000000_add_subject_condition_sets.md | 2 +- ...40228000000_add_subject_condition_sets.sql | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 migrations/20240228000000_add_subject_condition_sets.sql diff --git a/migrations/20240228000000_add_subject_condition_sets.md b/migrations/20240228000000_add_subject_condition_sets.md index 9d997e9db0..cdc2b9fbb1 100644 --- a/migrations/20240228000000_add_subject_condition_sets.md +++ b/migrations/20240228000000_add_subject_condition_sets.md @@ -124,7 +124,7 @@ erDiagram } SubjectMapping }|--|| AttributeValue: has - SubjectConditionSet ||--|{ SubjectSets: "marshals in condition column" + SubjectConditionSet ||--|| SubjectSets: "marshals in condition column" SubjectSets ||--|{ ConditionGroups: has ConditionGroups ||--|{ Conditions: has diff --git a/migrations/20240228000000_add_subject_condition_sets.sql b/migrations/20240228000000_add_subject_condition_sets.sql new file mode 100644 index 0000000000..5674a912c5 --- /dev/null +++ b/migrations/20240228000000_add_subject_condition_sets.sql @@ -0,0 +1,57 @@ +-- +goose Up +-- +goose StatementBegin + +CREATE TABLE IF NOT EXISTS subject_condition_set ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + name VARCHAR UNIQUE, + metadata JSONB, + condition JSONB NOT NULL +); + +CREATE TABLE IF NOT EXISTS subject_mapping_condition_set_pivot ( + id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + subject_mapping_id UUID REFERENCES subject_mappings(id) ON DELETE CASCADE, + subject_condition_set_id UUID REFERENCES subject_condition_set(id) ON DELETE CASCADE +); + +INSERT INTO subject_condition_set(metadata, condition) VALUES ( + SELECT JSON_AGG(JSON_BUILD_OBJECT( + 'created_at', subject_mappings.created_at, + 'updated_at', subject_mappings.updated_at, + )), + SELECT JSON_AGG(JSON_BUILD_OBJECT( + 'subject_sets', JSON_BUILD_ARRAY( + JSON_BUILD_OBJECT( + 'condition_groups', JSON_BUILD_ARRAY( + JSON_BUILD_OBJECT( + 'boolean_operator', 'AND', + JSON_BUILD_ARRAY( + JSON_BUILD_OBJECT( + 'operator', subject_mappings.operator, + 'subject_attribute', subject_mappings.subject_attribute, + 'subject_attribute_values', subject_mappings.subject_attribute_values + ) + ) + ) + ) + ) + ), + )) +) + +ALTER TABLE IF EXISTS subject_mappings DROP COLUMN operator, DROP COLUMN subject_attribute, DROP COLUMN subject_attribute_values; +ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_pivot_ids UUID[], ADD COLUMN actions VARCHAR[]; +DROP TYPE IF EXISTS subject_mappings_operator; + +-- +goose StatementEnd + +-- +goose Down + +DROP TABLE subject_condition_set; +DROP TABLE subject_mapping_condition_set_pivot; +CREATE TYPE subject_mappings_operator AS ENUM ('UNSPECIFIED', 'IN', 'NOT_IN'); + + + +-- +goose StatementBegin +-- +goose StatementEnd \ No newline at end of file From 706d49569c44e1392e1b448202ccdc0f9f7bbb3b Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Thu, 29 Feb 2024 12:02:11 -0500 Subject: [PATCH 2/9] working migration of subject mapping into condition column --- ...40228000000_add_subject_condition_sets.sql | 53 ++++++++++++++----- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/migrations/20240228000000_add_subject_condition_sets.sql b/migrations/20240228000000_add_subject_condition_sets.sql index 5674a912c5..f22bd3237d 100644 --- a/migrations/20240228000000_add_subject_condition_sets.sql +++ b/migrations/20240228000000_add_subject_condition_sets.sql @@ -14,30 +14,55 @@ CREATE TABLE IF NOT EXISTS subject_mapping_condition_set_pivot ( subject_condition_set_id UUID REFERENCES subject_condition_set(id) ON DELETE CASCADE ); -INSERT INTO subject_condition_set(metadata, condition) VALUES ( - SELECT JSON_AGG(JSON_BUILD_OBJECT( - 'created_at', subject_mappings.created_at, - 'updated_at', subject_mappings.updated_at, - )), - SELECT JSON_AGG(JSON_BUILD_OBJECT( - 'subject_sets', JSON_BUILD_ARRAY( +INSERT INTO subject_condition_set(metadata, condition) SELECT + JSON_BUILD_OBJECT( + 'created_at', metadata::json->'created_at', + 'updated_at', metadata::json->'updated_at' + ), + JSON_BUILD_OBJECT( + 'subject_sets', + JSON_BUILD_ARRAY( JSON_BUILD_OBJECT( 'condition_groups', JSON_BUILD_ARRAY( JSON_BUILD_OBJECT( 'boolean_operator', 'AND', - JSON_BUILD_ARRAY( + 'conditions', JSON_BUILD_ARRAY( JSON_BUILD_OBJECT( - 'operator', subject_mappings.operator, - 'subject_attribute', subject_mappings.subject_attribute, - 'subject_attribute_values', subject_mappings.subject_attribute_values + 'operator', operator, + 'subject_external_field', subject_attribute, + 'subject_external_values', subject_attribute_values ) ) ) ) ) - ), - )) -) + ) + ) +FROM subject_mappings; +/* Example of built JSON: +{ + "subject_sets": [ + { + "condition_groups": [ + { + "conditions": [ + { + "operator": "IN", + "subject_external_field": "subject_attribute1", + "subject_external_values": [ + "value1", + "value2" + ] + } + ], + "boolean_operator": "AND" + } + ] + } + ] +} +*/ + ALTER TABLE IF EXISTS subject_mappings DROP COLUMN operator, DROP COLUMN subject_attribute, DROP COLUMN subject_attribute_values; ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_pivot_ids UUID[], ADD COLUMN actions VARCHAR[]; From b6a22f60decd413f06c3bef02429b39715c8b87e Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Thu, 29 Feb 2024 14:11:33 -0500 Subject: [PATCH 3/9] add migrate up command and bump goose version to latest --- cmd/migrate.go | 20 ++++++++++++++++++-- go.mod | 5 +++-- go.sum | 11 +++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/cmd/migrate.go b/cmd/migrate.go index a78f66dadf..da06eb9cc3 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -17,7 +17,7 @@ var ( migrateDownCmd = &cobra.Command{ Use: "down", - Short: "Run database migrations", + Short: "Run database migration down one version", Run: func(cmd *cobra.Command, args []string) { dbClient, err := migrateDbClient() if err != nil { @@ -31,6 +31,22 @@ var ( fmt.Print("migration down applied: ", slog.Any("res", res)) }, } + migrateUpCmd = &cobra.Command{ + Use: "up", + Short: "Run database migrations up to the latest version", + Run: func(cmd *cobra.Command, args []string) { + dbClient, err := migrateDbClient() + if err != nil { + panic(fmt.Errorf("could not load config: %w", err)) + } + + res, err := dbClient.RunMigrations(cmd.Context()) + if err != nil { + panic(fmt.Errorf("migration up failed: %w", err)) + } + fmt.Print("migration up applied: ", slog.Any("res", res)) + }, + } ) func migrateDbClient() (*db.Client, error) { @@ -47,10 +63,10 @@ func migrateDbClient() (*db.Client, error) { return nil, err } return dbClient, nil - } func init() { migrateCmd.AddCommand(migrateDownCmd) + migrateCmd.AddCommand(migrateUpCmd) rootCmd.AddCommand(migrateCmd) } diff --git a/go.mod b/go.mod index 39f0dbe519..061903ef6a 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/jackc/pgx/v5 v5.5.3 github.com/open-policy-agent/opa v0.61.0 github.com/opentdf/platform/protocol/go v0.0.0-00010101000000-000000000000 - github.com/pressly/goose/v3 v3.16.0 + github.com/pressly/goose/v3 v3.18.0 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.8.4 @@ -68,6 +68,7 @@ require ( github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect + github.com/mfridman/interpolate v0.0.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/locker v1.0.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect @@ -132,7 +133,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect golang.org/x/crypto v0.19.0 // indirect golang.org/x/net v0.20.0 // indirect - golang.org/x/sync v0.5.0 // indirect + golang.org/x/sync v0.6.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 // indirect diff --git a/go.sum b/go.sum index d092a3c1a4..96dca0f189 100644 --- a/go.sum +++ b/go.sum @@ -10,6 +10,7 @@ github.com/ClickHouse/ch-go v0.58.2 h1:jSm2szHbT9MCAB1rJ3WuCJqmGLi5UTjlNu+f530UT github.com/ClickHouse/ch-go v0.58.2/go.mod h1:Ap/0bEmiLa14gYjCiRkYGbXvbe8vwdrfTYWhsuQ99aw= github.com/ClickHouse/clickhouse-go/v2 v2.15.0 h1:G0hTKyO8fXXR1bGnZ0DY3vTG01xYfOGW76zgjg5tmC4= github.com/ClickHouse/clickhouse-go/v2 v2.15.0/go.mod h1:kXt1SRq0PIRa6aKZD7TnFnY9PQKmc2b13sHtOYcK6cQ= +github.com/ClickHouse/clickhouse-go/v2 v2.17.1 h1:ZCmAYWpu75IyEi7+Yrs/uaAjiCGY5wfW5kXo64exkX4= github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM= github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= @@ -79,6 +80,7 @@ github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkp github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= github.com/elastic/go-sysinfo v1.11.1 h1:g9mwl05njS4r69TisC+vwHWTSKywZFYYUu3so3T/Lao= github.com/elastic/go-sysinfo v1.11.1/go.mod h1:6KQb31j0QeWBDF88jIdWSxE8cwoOB9tO4Y4osN7Q70E= +github.com/elastic/go-sysinfo v1.11.2 h1:mcm4OSYVMyws6+n2HIVMGkln5HOpo5Ie1ZmbbNn0jg4= github.com/elastic/go-windows v1.0.1 h1:AlYZOldA+UJ0/2nBuqWdo90GFCgG9xuyw9SYzGUtJm0= github.com/elastic/go-windows v1.0.1/go.mod h1:FoVvqWSun28vaDQPbj2Elfc0JahhPB7WQEGa3c814Ss= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= @@ -186,6 +188,8 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= +github.com/mfridman/interpolate v0.0.2 h1:pnuTK7MQIxxFz1Gr+rjSIx9u7qVjf5VOoM/u6BbAxPY= +github.com/mfridman/interpolate v0.0.2/go.mod h1:p+7uk6oE07mpE/Ik1b8EckO0O4ZXiGAfshKBWLUM9Xg= github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= @@ -229,6 +233,8 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/pressly/goose/v3 v3.16.0 h1:xMJUsZdHLqSnCqESyKSqEfcYVYsUuup1nrOhaEFftQg= github.com/pressly/goose/v3 v3.16.0/go.mod h1:JwdKVnmCRhnF6XLQs2mHEQtucFD49cQBdRM4UiwkxsM= +github.com/pressly/goose/v3 v3.18.0 h1:CUQKjZ0li91GLrMekHPR0yz4UyjT21AqyhSm/ERcPTo= +github.com/pressly/goose/v3 v3.18.0/go.mod h1:NTDry9taDJXEV6IqkABnZqm1MRGOSrCWrNEz1x6f4wI= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= @@ -313,8 +319,10 @@ github.com/yashtewari/glob-intersection v0.2.0 h1:8iuHdN88yYuCzCdjt0gDe+6bAhUwBe github.com/yashtewari/glob-intersection v0.2.0/go.mod h1:LK7pIC3piUjovexikBbJ26Yml7g8xa5bsjfx2v1fwok= github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd h1:dzWP1Lu+A40W883dK/Mr3xyDSM/2MggS8GtHT0qgAnE= github.com/ydb-platform/ydb-go-genproto v0.0.0-20231012155159-f85a672542fd/go.mod h1:Er+FePu1dNUieD+XTMDduGpQuCPssK5Q4BjF+IIXJ3I= +github.com/ydb-platform/ydb-go-genproto v0.0.0-20240126124512-dbb0e1720dbf h1:ckwNHVo4bv2tqNkgx3W3HANh3ta1j6TR5qw08J1A7Tw= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2 h1:E0yUuuX7UmPxXm92+yQCjMveLFO3zfvYFIJVuAqsVRA= github.com/ydb-platform/ydb-go-sdk/v3 v3.54.2/go.mod h1:fjBLQ2TdQNl4bMjuWl9adoTGBypwUTPoGC+EqYqiIcU= +github.com/ydb-platform/ydb-go-sdk/v3 v3.55.1 h1:Ebo6J5AMXgJ3A438ECYotA0aK7ETqjQx9WoZvVxzKBE= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= @@ -361,6 +369,8 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -431,6 +441,7 @@ modernc.org/opt v0.1.3 h1:3XOZf2yznlhC+ibLltsDGzABUGVx8J6pnFMS3E4dcq4= modernc.org/opt v0.1.3/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= modernc.org/sqlite v1.27.0 h1:MpKAHoyYB7xqcwnUwkuD+npwEa0fojF0B5QRbN+auJ8= modernc.org/sqlite v1.27.0/go.mod h1:Qxpazz0zH8Z1xCFyi5GSL3FzbtZ3fvbjmywNogldEW0= +modernc.org/sqlite v1.28.0 h1:Zx+LyDDmXczNnEQdvPuEfcFVA2ZPyaD7UCZDjef3BHQ= modernc.org/strutil v1.2.0 h1:agBi9dp1I+eOnxXeiZawM8F4LawKv4NzGWSaLfyeNZA= modernc.org/strutil v1.2.0/go.mod h1:/mdcBmfOibveCTBxUl5B5l6W+TTH1FXPLHZE6bTosX0= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= From 78657d3e1a13c2bddbce8c282f39a5c851ae2609 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Thu, 29 Feb 2024 15:09:35 -0500 Subject: [PATCH 4/9] fix migration down command --- cmd/migrate.go | 4 +- internal/db/db_migration.go | 24 +++-- ...40228000000_add_subject_condition_sets.sql | 99 ++++++++++++++----- 3 files changed, 90 insertions(+), 37 deletions(-) diff --git a/cmd/migrate.go b/cmd/migrate.go index da06eb9cc3..b69ed7a3eb 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -24,11 +24,11 @@ var ( panic(fmt.Errorf("could not load config: %w", err)) } - res, err := dbClient.MigrationDown() + err = dbClient.MigrationDown(cmd.Context()) if err != nil { panic(fmt.Errorf("migration down failed: %w", err)) } - fmt.Print("migration down applied: ", slog.Any("res", res)) + fmt.Print("migration down applied successfully") }, } migrateUpCmd = &cobra.Command{ diff --git a/internal/db/db_migration.go b/internal/db/db_migration.go index e0e433ad6b..841cf5b44a 100644 --- a/internal/db/db_migration.go +++ b/internal/db/db_migration.go @@ -73,19 +73,19 @@ func (c *Client) RunMigrations(ctx context.Context) (int, error) { return applied, nil } -func (c *Client) MigrationDown() (int, error) { - var applied int - +func (c *Client) MigrationDown(ctx context.Context) error { if !c.config.RunMigrations { slog.Info("skipping migrations", slog.String("reason", "runMigrations is false"), slog.Bool("runMigrations", c.config.RunMigrations)) - return applied, nil + return nil } + c.Pgx.Exec(ctx, fmt.Sprintf("SET search_path TO %s", c.config.Schema)) + pool, ok := c.Pgx.(*pgxpool.Pool) if !ok || pool == nil { - return applied, fmt.Errorf("failed to cast pgxpool.Pool") + return fmt.Errorf("failed to cast pgxpool.Pool") } conn := stdlib.OpenDBFromPool(pool) @@ -93,16 +93,22 @@ func (c *Client) MigrationDown() (int, error) { provider, err := goose.NewProvider(goose.DialectPostgres, conn, migrations.MigrationsFS) if err != nil { - return applied, errors.Join(fmt.Errorf("failed to create goose provider"), err) + return errors.Join(fmt.Errorf("failed to create goose provider"), err) } + v, e := provider.GetDBVersion(context.Background()) + if e != nil { + return errors.Join(fmt.Errorf("failed to get current version"), e) + } + fmt.Printf("Current DB version: %d. Migrating one down to %d.\n", v, v-1) + res, err := provider.Down(context.Background()) if err != nil { - return applied, errors.Join(fmt.Errorf("failed to run migrations"), err) + return 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 errors.Join(fmt.Errorf("failed to run migrations"), res.Error) } - return applied, nil + return nil } diff --git a/migrations/20240228000000_add_subject_condition_sets.sql b/migrations/20240228000000_add_subject_condition_sets.sql index f22bd3237d..9343a3711d 100644 --- a/migrations/20240228000000_add_subject_condition_sets.sql +++ b/migrations/20240228000000_add_subject_condition_sets.sql @@ -11,35 +11,63 @@ CREATE TABLE IF NOT EXISTS subject_condition_set ( CREATE TABLE IF NOT EXISTS subject_mapping_condition_set_pivot ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), subject_mapping_id UUID REFERENCES subject_mappings(id) ON DELETE CASCADE, - subject_condition_set_id UUID REFERENCES subject_condition_set(id) ON DELETE CASCADE + subject_condition_set_id UUID ); -INSERT INTO subject_condition_set(metadata, condition) SELECT - JSON_BUILD_OBJECT( - 'created_at', metadata::json->'created_at', - 'updated_at', metadata::json->'updated_at' - ), - JSON_BUILD_OBJECT( - 'subject_sets', - JSON_BUILD_ARRAY( - JSON_BUILD_OBJECT( - 'condition_groups', JSON_BUILD_ARRAY( - JSON_BUILD_OBJECT( - 'boolean_operator', 'AND', - 'conditions', JSON_BUILD_ARRAY( - JSON_BUILD_OBJECT( - 'operator', operator, - 'subject_external_field', subject_attribute, - 'subject_external_values', subject_attribute_values +ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_pivot_ids UUID[], ADD COLUMN actions VARCHAR[]; + +WITH subject_mappings_migration_data AS ( + SELECT + JSON_BUILD_OBJECT( + 'created_at', metadata::json->'created_at', + 'updated_at', metadata::json->'updated_at' + ) AS metadata, + JSON_BUILD_OBJECT( + 'subject_sets', + JSON_BUILD_ARRAY( + JSON_BUILD_OBJECT( + 'condition_groups', JSON_BUILD_ARRAY( + JSON_BUILD_OBJECT( + 'boolean_operator', 'AND', + 'conditions', JSON_BUILD_ARRAY( + JSON_BUILD_OBJECT( + 'operator', operator, + 'subject_external_field', subject_attribute, + 'subject_external_values', subject_attribute_values + ) ) ) ) ) ) - ) - ) -FROM subject_mappings; -/* Example of built JSON: + ) AS condition_json, + id AS sm_id + FROM subject_mappings +), +-- populate the pivot table +pivot_insert AS ( + INSERT INTO subject_mapping_condition_set_pivot(subject_mapping_id, subject_condition_set_id) + SELECT subject_mappings_migration_data.sm_id, gen_random_uuid() + FROM subject_mappings_migration_data + RETURNING id AS pivot_id, subject_mapping_id, subject_condition_set_id +), +-- populate the condition set table +insert_subject_condition_set AS ( + INSERT INTO subject_condition_set(metadata, condition, id) + SELECT metadata, condition_json, subject_condition_set_id + FROM subject_mappings_migration_data JOIN pivot_insert ON subject_mappings_migration_data.sm_id = pivot_insert.subject_mapping_id +) +-- populate the subject_mappings column with the new pivot id +UPDATE subject_mappings +SET subject_condition_set_pivot_ids = ( + SELECT ARRAY_AGG(pivot_insert.pivot_id) + FROM pivot_insert + WHERE subject_mappings.id = pivot_insert.subject_mapping_id +); + +ALTER TABLE subject_mapping_condition_set_pivot ADD FOREIGN KEY (subject_condition_set_id) REFERENCES subject_condition_set(id) ON DELETE CASCADE; + +/* Example of the built 'condition' JSON that maps to the protos: { "subject_sets": [ { @@ -65,18 +93,37 @@ FROM subject_mappings; ALTER TABLE IF EXISTS subject_mappings DROP COLUMN operator, DROP COLUMN subject_attribute, DROP COLUMN subject_attribute_values; -ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_pivot_ids UUID[], ADD COLUMN actions VARCHAR[]; DROP TYPE IF EXISTS subject_mappings_operator; -- +goose StatementEnd -- +goose Down -DROP TABLE subject_condition_set; -DROP TABLE subject_mapping_condition_set_pivot; -CREATE TYPE subject_mappings_operator AS ENUM ('UNSPECIFIED', 'IN', 'NOT_IN'); +ALTER TABLE IF EXISTS subject_mappings ADD COLUMN operator VARCHAR, ADD COLUMN subject_attribute VARCHAR, ADD COLUMN subject_attribute_values VARCHAR[]; +--- populate the old columns with the new data +WITH subject_mappings_migration_data AS ( + SELECT + (condition->'subject_sets'->0->'condition_groups'->0->'conditions'->0->'operator')::TEXT AS operator, + (condition->'subject_sets'->0->'condition_groups'->0->'conditions'->0->'subject_external_field')::TEXT AS subject_attribute, + (condition->'subject_sets'->0->'condition_groups'->0->'conditions'->0->'subject_external_values')::TEXT AS subject_attribute_values, + id AS set_id + FROM subject_condition_set +) +UPDATE subject_mappings +SET operator = subject_mappings_migration_data.operator, + subject_attribute = subject_mappings_migration_data.subject_attribute, + subject_attribute_values = ARRAY( + SELECT subject_mappings_migration_data.subject_attribute_values + ) +FROM subject_mappings_migration_data +JOIN subject_mapping_condition_set_pivot ON subject_mappings_migration_data.set_id = subject_mapping_condition_set_pivot.subject_condition_set_id +WHERE subject_mapping_condition_set_pivot.subject_mapping_id = subject_mappings.id; +ALTER TABLE IF EXISTS subject_mappings DROP COLUMN subject_condition_set_pivot_ids, DROP COLUMN actions; +DROP TABLE subject_mapping_condition_set_pivot; +DROP TABLE subject_condition_set; +CREATE TYPE subject_mappings_operator AS ENUM ('UNSPECIFIED', 'IN', 'NOT_IN'); -- +goose StatementBegin -- +goose StatementEnd \ No newline at end of file From f8af59c71921b1393fb0b35ab52786a8fd7d477e Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Thu, 29 Feb 2024 15:25:34 -0500 Subject: [PATCH 5/9] cleanup --- integration/subject_mappings_test.go | 3 ++- migrations/20240228000000_add_subject_condition_sets.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index 69b3678905..06d2ee199b 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -2,10 +2,11 @@ package integration import ( "context" - "github.com/opentdf/platform/protocol/go/authorization" "log/slog" "testing" + "github.com/opentdf/platform/protocol/go/authorization" + "github.com/opentdf/platform/internal/fixtures" "github.com/opentdf/platform/protocol/go/common" "github.com/opentdf/platform/protocol/go/policy/subjectmapping" diff --git a/migrations/20240228000000_add_subject_condition_sets.md b/migrations/20240228000000_add_subject_condition_sets.md index cdc2b9fbb1..5f5bba2ece 100644 --- a/migrations/20240228000000_add_subject_condition_sets.md +++ b/migrations/20240228000000_add_subject_condition_sets.md @@ -30,7 +30,7 @@ all the way back up the tree to an internal Platform-ABAC `Attribute Value`. A PDP should consider all of the following joined by an AND relationship: - more than one SubjectMapping for an Attribute Value - - more than one SubjectSet in the JSONB of a SubjectConditionSet + - more than one SubjectSet in the JSONB of a SubjectConditionSet - more than one ConditionGroup on a SubjectSet For now, ConditionGroups are the only place a policy platform administrator has control over the boolean @@ -124,7 +124,7 @@ erDiagram } SubjectMapping }|--|| AttributeValue: has - SubjectConditionSet ||--|| SubjectSets: "marshals in condition column" + SubjectConditionSet ||--|{ SubjectSets: "marshals in condition column" SubjectSets ||--|{ ConditionGroups: has ConditionGroups ||--|{ Conditions: has From d8c22c6461d72cad008c6ca4b4c009637508f513 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Thu, 29 Feb 2024 16:29:49 -0500 Subject: [PATCH 6/9] update protos --- ...40228000000_add_subject_condition_sets.sql | 39 ++--- .../subjectmapping/subject_mapping.proto | 161 ++---------------- 2 files changed, 33 insertions(+), 167 deletions(-) diff --git a/migrations/20240228000000_add_subject_condition_sets.sql b/migrations/20240228000000_add_subject_condition_sets.sql index 9343a3711d..5c367c2e6e 100644 --- a/migrations/20240228000000_add_subject_condition_sets.sql +++ b/migrations/20240228000000_add_subject_condition_sets.sql @@ -4,7 +4,6 @@ CREATE TABLE IF NOT EXISTS subject_condition_set ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), name VARCHAR UNIQUE, - metadata JSONB, condition JSONB NOT NULL ); @@ -18,10 +17,6 @@ ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_pivot_id WITH subject_mappings_migration_data AS ( SELECT - JSON_BUILD_OBJECT( - 'created_at', metadata::json->'created_at', - 'updated_at', metadata::json->'updated_at' - ) AS metadata, JSON_BUILD_OBJECT( 'subject_sets', JSON_BUILD_ARRAY( @@ -53,8 +48,8 @@ pivot_insert AS ( ), -- populate the condition set table insert_subject_condition_set AS ( - INSERT INTO subject_condition_set(metadata, condition, id) - SELECT metadata, condition_json, subject_condition_set_id + INSERT INTO subject_condition_set(condition, id) + SELECT condition_json, subject_condition_set_id FROM subject_mappings_migration_data JOIN pivot_insert ON subject_mappings_migration_data.sm_id = pivot_insert.subject_mapping_id ) -- populate the subject_mappings column with the new pivot id @@ -71,21 +66,21 @@ ALTER TABLE subject_mapping_condition_set_pivot ADD FOREIGN KEY (subject_conditi { "subject_sets": [ { - "condition_groups": [ - { - "conditions": [ - { - "operator": "IN", - "subject_external_field": "subject_attribute1", - "subject_external_values": [ - "value1", - "value2" - ] - } - ], - "boolean_operator": "AND" - } - ] + "condition_groups": [ + { + "conditions": [ + { + "operator": "IN", + "subject_external_field": "subject_attribute1", + "subject_external_values": [ + "value1", + "value2" + ] + } + ], + "boolean_operator": "AND" + } + ] } ] } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 0da64549cd..6bdbc9fcdb 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -20,61 +20,6 @@ import "policy/attributes/attributes.proto"; - FQN: "http://demo.com/attr/example/value/foobar" - UUID: "12345678-1234-1234-1234-123456789012" - ### Request - Create a Subject Set with a single condition: user attribute division = Marketing or Sales - - ```bash - grpcurl -plaintext -d '{ - "subject_set": { - "metadata": { - "labels": { - "name": "example" - } - }, - "condition_groups": [ - { - "conditions": [ - { - "subject_attribute": "division", - "subject_values": [ - "Marketing", - "Sales" - ] - } - ] - } - ] - } - }' localhost:8080 SubjectMappingService.CreateSubjectSet - - ``` - - #### Response: - - ``` - { - "subject_set": { - "id": "0000-1111-2222", - "metadata": { - "labels": { - "name": "example" - } - }, - "condition_groups": [ - { - "conditions": [ - { - "subject_attribute": "division", - "subject_values": [ - "Marketing", - "Sales" - ] - } - ] - } - ] - } - } - ``` ## Create a Subject Mapping Policy using the above (previous) Subject Set for attribute http://demo.com/attr/example/value/foobar and permitted actions TRANSMIT and DECRYPT @@ -131,25 +76,25 @@ enum ConditionBooleanTypeEnum { } /** - A Condition defines a rule of + A Condition defines a rule of - Example: Match Subjects with an attribute "division" with a value of "Accounting" or "Marketing": + Example: Match Subjects with field "division" and a value of "Accounting" or "Marketing": { - "subject_attribute": "division", + "subject_external_field": "division", "operator": "IN", - "subject_values" : ["Accounting", "Marketing"] + "subject_external_values" : ["Accounting", "Marketing"] } - Example: Match a subject by preferred username: + Example: Match a subject by ensuring they are not part of the Fantastic Four: { - "subject_attribute": "preferredUsername", - "operator": "IN", - "subject_values" : ["alice@example.org"] + "subject_external_field": "superhero_name", + "operator": "NOT_IN", + "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] } */ message Condition { - // Resource Attribute Key; NOT Attribute Definition Attribute name - string subject_attribute = 1; + // externally known field name (such as from idP/LDAP) + string subject_external_field = 1; // the operator SubjectMappingOperatorEnum operator = 2 [ @@ -157,11 +102,8 @@ message Condition { (buf.validate.field).required = true ]; - // The list of comparison values for a resource's value - repeated string subject_values = 3; - - //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 + // list of comparison values for the subject_external_field + repeated string subject_external_values = 3; } // A Group of conditions with either OR or AND evaluation across the contained conditions @@ -177,12 +119,8 @@ message ConditionGroup { // A Set of subjects described by matching criteria via a list of condition groups. // A Subject Set can be used by multiple Subject Mappings message SubjectSet { - string id = 1; - - common.Metadata metadata = 2; - // The conditions groups describing the matching rules for subjects in the set - repeated ConditionGroup condition_groups = 3 [(buf.validate.field).repeated.min_items = 1]; + repeated ConditionGroup condition_groups = 1 [(buf.validate.field).repeated.min_items = 1]; } /* @@ -194,14 +132,13 @@ message SubjectSet { "id": "someid", "attribute_value": {example_one_attribute_value...}, "subject_sets": [{subject_set_1},{subject_set_2}] - "actions": ["TRANSMIT", "DECRYPT"] + "actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] } */ message SubjectMapping { string id = 1; common.Metadata metadata = 2; - //TODO should this be a list of values? // Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute" policy.attributes.Value attribute_value = 3; @@ -213,47 +150,6 @@ message SubjectMapping { repeated authorization.Action actions = 5; } -message SubjectSetCreateUpdate { - common.MetadataMutable metadata = 1; - - repeated ConditionGroup condition_groups = 2; -} - -message GetSubjectSetRequest { - string id = 1 [(buf.validate.field).required = true]; -} - -message GetSubjectSetResponse { - SubjectSet subject_set = 1; -} - -message CreateSubjectSetRequest { - SubjectSetCreateUpdate subject_set = 1 [(buf.validate.field).required = true]; -} -message CreateSubjectSetResponse { - SubjectSet subject_set = 1; -} - -message UpdateSubjectSetRequest { - string id = 1 [(buf.validate.field).required = true]; - SubjectSetCreateUpdate subject_set = 2 [(buf.validate.field).required = true]; -} -message UpdateSubjectSetResponse { - SubjectSet subject_set = 1; -} - -message DeleteSubjectSetRequest { - string id = 1 [(buf.validate.field).required = true]; -} -message DeleteSubjectSetResponse { - SubjectSet subject_set = 1; -} - -message ListSubjectSetsRequest {} -message ListSubjectSetsResponse { - repeated SubjectSet subject_sets = 1; -} - // A Representation of a subject as attribute->value pairs. This would mirror user attributes retrieved // from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc. message Subject { @@ -274,8 +170,8 @@ message SubjectMappingCreateUpdate { // Attribute Value to be mapped to string attribute_value_id = 2; - // the subjects sets in this mapping - repeated string subject_set_ids = 3; + // The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements + repeated SubjectSet subject_sets = 3; // The actions permitted by subjects in this mapping repeated authorization.Action actions = 4; @@ -316,31 +212,6 @@ message DeleteSubjectMappingResponse { } service SubjectMappingService { - rpc GetSubjectSet(GetSubjectSetRequest) returns (GetSubjectSetResponse) { - option (google.api.http) = {get: "/subject-sets/{id}"}; - } - - rpc CreateSubjectSet(CreateSubjectSetRequest) returns (CreateSubjectSetResponse) { - option (google.api.http) = { - post: "/subject-sets" - body: "subject_set" - }; - } - - rpc UpdateSubjectSet(UpdateSubjectSetRequest) returns (UpdateSubjectSetResponse) { - option (google.api.http) = { - post: "/subject-sets/{id}" - body: "subject_set" - }; - } - - rpc DeleteSubjectSet(DeleteSubjectSetRequest) returns (DeleteSubjectSetResponse) { - option (google.api.http) = {delete: "/subject-sets/{id}"}; - } - - rpc ListSubjectSets(ListSubjectSetsRequest) returns (ListSubjectSetsResponse) { - option (google.api.http) = {get: "/subject-sets"}; - } // Find matching Subject Mappings for a given Subject rpc MatchSubjectMappings(MatchSubjectMappingsRequest) returns (MatchSubjectMappingsResponse) { From d8284392d866a52c64b301e19f72f52ab22ee500 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Thu, 29 Feb 2024 16:30:09 -0500 Subject: [PATCH 7/9] gen protos and docs --- docs/grpc/index.html | 424 +---- .../subject_mapping.swagger.json | 235 +-- .../subjectmapping/subject_mapping.pb.go | 1544 ++++------------- .../subjectmapping/subject_mapping.pb.gw.go | 479 ----- .../subjectmapping/subject_mapping_grpc.pb.go | 185 -- .../policy/subjectmapping/Condition.java | 334 ++-- .../subjectmapping/ConditionOrBuilder.java | 48 +- .../CreateSubjectSetRequest.java | 599 ------- .../CreateSubjectSetRequestOrBuilder.java | 25 - .../CreateSubjectSetResponse.java | 599 ------- .../CreateSubjectSetResponseOrBuilder.java | 25 - .../DeleteSubjectSetRequest.java | 542 ------ .../DeleteSubjectSetRequestOrBuilder.java | 22 - .../DeleteSubjectSetResponse.java | 599 ------- .../DeleteSubjectSetResponseOrBuilder.java | 25 - .../subjectmapping/GetSubjectSetRequest.java | 542 ------ .../GetSubjectSetRequestOrBuilder.java | 22 - .../subjectmapping/GetSubjectSetResponse.java | 599 ------- .../GetSubjectSetResponseOrBuilder.java | 25 - .../ListSubjectSetsRequest.java | 399 ----- .../ListSubjectSetsRequestOrBuilder.java | 10 - .../ListSubjectSetsResponse.java | 760 -------- .../ListSubjectSetsResponseOrBuilder.java | 34 - .../policy/subjectmapping/SubjectMapping.java | 52 +- .../SubjectMappingCreateUpdate.java | 492 ++++-- .../SubjectMappingCreateUpdateOrBuilder.java | 43 +- .../SubjectMappingOrBuilder.java | 12 - .../subjectmapping/SubjectMappingProto.java | 389 ++--- .../SubjectMappingServiceGrpc.java | 382 +--- .../policy/subjectmapping/SubjectSet.java | 406 +---- .../SubjectSetCreateUpdate.java | 954 ---------- .../SubjectSetCreateUpdateOrBuilder.java | 49 - .../subjectmapping/SubjectSetOrBuilder.java | 37 +- .../UpdateSubjectSetRequest.java | 735 -------- .../UpdateSubjectSetRequestOrBuilder.java | 37 - .../UpdateSubjectSetResponse.java | 599 ------- .../UpdateSubjectSetResponseOrBuilder.java | 25 - 37 files changed, 1112 insertions(+), 11176 deletions(-) delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetRequest.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetRequestOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetResponse.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetResponseOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetRequest.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetRequestOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetResponse.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetResponseOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetRequest.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetRequestOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetResponse.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetResponseOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsRequest.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsRequestOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsResponse.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsResponseOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetCreateUpdate.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetCreateUpdateOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetRequest.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetRequestOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetResponse.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetResponseOrBuilder.java diff --git a/docs/grpc/index.html b/docs/grpc/index.html index 168c30ec3f..d9366df039 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -703,14 +703,6 @@

Table of Contents

MCreateSubjectMappingResponse -
  • - MCreateSubjectSetRequest -
  • - -
  • - MCreateSubjectSetResponse -
  • -
  • MDeleteSubjectMappingRequest
  • @@ -719,14 +711,6 @@

    Table of Contents

    MDeleteSubjectMappingResponse -
  • - MDeleteSubjectSetRequest -
  • - -
  • - MDeleteSubjectSetResponse -
  • -
  • MGetSubjectMappingRequest
  • @@ -735,14 +719,6 @@

    Table of Contents

    MGetSubjectMappingResponse -
  • - MGetSubjectSetRequest -
  • - -
  • - MGetSubjectSetResponse -
  • -
  • MListSubjectMappingsRequest
  • @@ -751,14 +727,6 @@

    Table of Contents

    MListSubjectMappingsResponse -
  • - MListSubjectSetsRequest -
  • - -
  • - MListSubjectSetsResponse -
  • -
  • MMatchSubjectMappingsRequest
  • @@ -783,10 +751,6 @@

    Table of Contents

    MSubjectSet -
  • - MSubjectSetCreateUpdate -
  • -
  • MUpdateSubjectMappingRequest
  • @@ -795,14 +759,6 @@

    Table of Contents

    MUpdateSubjectMappingResponse -
  • - MUpdateSubjectSetRequest -
  • - -
  • - MUpdateSubjectSetResponse -
  • -
  • EConditionBooleanTypeEnum @@ -5183,7 +5139,7 @@

    policy/subjectmapping/subje

    Condition

    -

    A Condition defines a rule of

    Example: Match Subjects with an attribute "division" with a value of "Accounting" or "Marketing":

    {

    "subject_attribute": "division",

    "operator": "IN",

    "subject_values" : ["Accounting", "Marketing"]

    }

    Example: Match a subject by preferred username:

    {

    "subject_attribute": "preferredUsername",

    "operator": "IN",

    "subject_values" : ["alice@example.org"]

    }

    +

    A Condition defines a rule of

    Example: Match Subjects with field "division" and a value of "Accounting" or "Marketing":

    {

    "subject_external_field": "division",

    "operator": "IN",

    "subject_external_values" : ["Accounting", "Marketing"]

    }

    Example: Match a subject by ensuring they are not part of the Fantastic Four:

    {

    "subject_external_field": "superhero_name",

    "operator": "NOT_IN",

    "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"]

    }

    @@ -5193,10 +5149,10 @@

    Condition

    - + - + @@ -5207,10 +5163,10 @@

    Condition

    - + - + @@ -5299,54 +5255,6 @@

    CreateSubjectMapping -

    CreateSubjectSetRequest

    -

    - - -
    subject_attributesubject_external_field string

    Resource Attribute Key; NOT Attribute Definition Attribute name

    externally known field name (such as from idP/LDAP)

    subject_valuessubject_external_values string repeated

    The list of comparison values for a resource's <attribute> value

    list of comparison values for the subject_external_field

    - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    subject_setSubjectSetCreateUpdate

    - - - - - -

    CreateSubjectSetResponse

    -

    - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    subject_setSubjectSet

    - - - - -

    DeleteSubjectMappingRequest

    @@ -5395,54 +5303,6 @@

    DeleteSubjectMapping -

    DeleteSubjectSetRequest

    -

    - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    idstring

    - - - - - -

    DeleteSubjectSetResponse

    -

    - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    subject_setSubjectSet

    - - - - -

    GetSubjectMappingRequest

    @@ -5491,54 +5351,6 @@

    GetSubjectMappingRespon -

    GetSubjectSetRequest

    -

    - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    idstring

    - - - - - -

    GetSubjectSetResponse

    -

    - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    subject_setSubjectSet

    - - - - -

    ListSubjectMappingsRequest

    @@ -5570,37 +5382,6 @@

    ListSubjectMappingsRe -

    ListSubjectSetsRequest

    -

    - - - - - -

    ListSubjectSetsResponse

    -

    - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    subject_setsSubjectSetrepeated

    - - - - -

    MatchSubjectMappingsRequest

    @@ -5674,7 +5455,7 @@

    Subject

    SubjectMapping

    -

    Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination

    Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one

    with permitted actions TRANSMIT and DECRYPT

    {

    "id": "someid",

    "attribute_value": {example_one_attribute_value...},

    "subject_sets": [{subject_set_1},{subject_set_2}]

    "actions": ["TRANSMIT", "DECRYPT"]

    }

    +

    Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination

    Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one

    with permitted actions TRANSMIT and DECRYPT

    {

    "id": "someid",

    "attribute_value": {example_one_attribute_value...},

    "subject_sets": [{subject_set_1},{subject_set_2}]

    "actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"]

    }

    @@ -5694,7 +5475,7 @@

    SubjectMapping

    - + @@ -5750,10 +5531,10 @@

    SubjectMappingCreateUp

    - - + + - + @@ -5780,20 +5561,6 @@

    SubjectSet

    - - - - - - - - - - - - - - @@ -5808,37 +5575,6 @@

    SubjectSet

    -

    SubjectSetCreateUpdate

    -

    - - -
    metadata common.Metadata

    TODO should this be a list of values?

    subject_set_idsstringsubject_setsSubjectSet repeated

    the subjects sets in this mapping

    The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements

    idstring

    metadatacommon.Metadata

    condition_groups ConditionGroup
    - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    metadatacommon.MetadataMutable

    condition_groupsConditionGrouprepeated

    - - - - -

    UpdateSubjectMappingRequest

    @@ -5894,61 +5630,6 @@

    UpdateSubjectMapping -

    UpdateSubjectSetRequest

    -

    - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    idstring

    subject_setSubjectSetCreateUpdate

    - - - - - -

    UpdateSubjectSetResponse

    -

    - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    subject_setSubjectSet

    - - - - -

    ConditionBooleanTypeEnum

    @@ -6021,41 +5702,6 @@

    SubjectMappingService

    - - GetSubjectSet - GetSubjectSetRequest - GetSubjectSetResponse -

    - - - - CreateSubjectSet - CreateSubjectSetRequest - CreateSubjectSetResponse -

    - - - - UpdateSubjectSet - UpdateSubjectSetRequest - UpdateSubjectSetResponse -

    - - - - DeleteSubjectSet - DeleteSubjectSetRequest - DeleteSubjectSetResponse -

    - - - - ListSubjectSets - ListSubjectSetsRequest - ListSubjectSetsResponse -

    - - MatchSubjectMappings MatchSubjectMappingsRequest @@ -6118,56 +5764,6 @@

    Methods with HTTP bindings

    - - GetSubjectSet - GET - /subject-sets/{id} - - - - - - - - CreateSubjectSet - POST - /subject-sets - subject_set - - - - - - - UpdateSubjectSet - POST - /subject-sets/{id} - subject_set - - - - - - - DeleteSubjectSet - DELETE - /subject-sets/{id} - - - - - - - - ListSubjectSets - GET - /subject-sets - - - - - - MatchSubjectMappings POST diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 92effaaa9a..c352c21621 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -194,152 +194,6 @@ "SubjectMappingService" ] } - }, - "/subject-sets": { - "get": { - "operationId": "SubjectMappingService_ListSubjectSets", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/subjectmappingListSubjectSetsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "tags": [ - "SubjectMappingService" - ] - }, - "post": { - "operationId": "SubjectMappingService_CreateSubjectSet", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/subjectmappingCreateSubjectSetResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "subjectSet", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/subjectmappingSubjectSetCreateUpdate" - } - } - ], - "tags": [ - "SubjectMappingService" - ] - } - }, - "/subject-sets/{id}": { - "get": { - "operationId": "SubjectMappingService_GetSubjectSet", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/subjectmappingGetSubjectSetResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "SubjectMappingService" - ] - }, - "delete": { - "operationId": "SubjectMappingService_DeleteSubjectSet", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/subjectmappingDeleteSubjectSetResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - } - ], - "tags": [ - "SubjectMappingService" - ] - }, - "post": { - "operationId": "SubjectMappingService_UpdateSubjectSet", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/subjectmappingUpdateSubjectSetResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "subjectSet", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/subjectmappingSubjectSetCreateUpdate" - } - } - ], - "tags": [ - "SubjectMappingService" - ] - } } }, "definitions": { @@ -521,24 +375,24 @@ "subjectmappingCondition": { "type": "object", "properties": { - "subjectAttribute": { + "subjectExternalField": { "type": "string", - "title": "Resource Attribute Key; NOT Attribute Definition Attribute name" + "title": "externally known field name (such as from idP/LDAP)" }, "operator": { "$ref": "#/definitions/subjectmappingSubjectMappingOperatorEnum", "title": "the operator" }, - "subjectValues": { + "subjectExternalValues": { "type": "array", "items": { "type": "string" }, - "title": "The list of comparison values for a resource's \u003cattribute\u003e value" + "title": "list of comparison values for the subject_external_field" } }, - "description": "Example: Match Subjects with an attribute \"division\" with a value of \"Accounting\" or \"Marketing\":\n{\n\"subject_attribute\": \"division\",\n\"operator\": \"IN\",\n\"subject_values\" : [\"Accounting\", \"Marketing\"]\n}\n\nExample: Match a subject by preferred username:\n{\n\"subject_attribute\": \"preferredUsername\",\n\"operator\": \"IN\",\n\"subject_values\" : [\"alice@example.org\"]\n}", - "title": "*\nA Condition defines a rule of \u003csubject attribute\u003e \u003coperator\u003e \u003csubject values\u003e" + "description": "Example: Match Subjects with field \"division\" and a value of \"Accounting\" or \"Marketing\":\n{\n\"subject_external_field\": \"division\",\n\"operator\": \"IN\",\n\"subject_external_values\" : [\"Accounting\", \"Marketing\"]\n}\n\nExample: Match a subject by ensuring they are not part of the Fantastic Four:\n{\n\"subject_external_field\": \"superhero_name\",\n\"operator\": \"NOT_IN\",\n\"subject_external_values\" : [\"mister_fantastic\", \"the_thing\", \"human_torch\", \"invisible_woman\"]\n}", + "title": "*\nA Condition defines a rule of \u003csubject external field name\u003e \u003coperator\u003e \u003csubject external values\u003e" }, "subjectmappingConditionBooleanTypeEnum": { "type": "string", @@ -575,14 +429,6 @@ } } }, - "subjectmappingCreateSubjectSetResponse": { - "type": "object", - "properties": { - "subjectSet": { - "$ref": "#/definitions/subjectmappingSubjectSet" - } - } - }, "subjectmappingDeleteSubjectMappingResponse": { "type": "object", "properties": { @@ -591,14 +437,6 @@ } } }, - "subjectmappingDeleteSubjectSetResponse": { - "type": "object", - "properties": { - "subjectSet": { - "$ref": "#/definitions/subjectmappingSubjectSet" - } - } - }, "subjectmappingGetSubjectMappingResponse": { "type": "object", "properties": { @@ -607,14 +445,6 @@ } } }, - "subjectmappingGetSubjectSetResponse": { - "type": "object", - "properties": { - "subjectSet": { - "$ref": "#/definitions/subjectmappingSubjectSet" - } - } - }, "subjectmappingListSubjectMappingsResponse": { "type": "object", "properties": { @@ -627,18 +457,6 @@ } } }, - "subjectmappingListSubjectSetsResponse": { - "type": "object", - "properties": { - "subjectSets": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/subjectmappingSubjectSet" - } - } - } - }, "subjectmappingMatchSubjectMappingsResponse": { "type": "object", "properties": { @@ -667,8 +485,7 @@ "type": "string" }, "metadata": { - "$ref": "#/definitions/commonMetadata", - "title": "TODO should this be a list of values?" + "$ref": "#/definitions/commonMetadata" }, "attributeValue": { "$ref": "#/definitions/policyattributesValue", @@ -691,7 +508,7 @@ "title": "The actions permitted by subjects in this mapping" } }, - "description": "Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one\nwith permitted actions TRANSMIT and DECRYPT\n{\n\"id\": \"someid\",\n\"attribute_value\": {example_one_attribute_value...},\n\"subject_sets\": [{subject_set_1},{subject_set_2}]\n\"actions\": [\"TRANSMIT\", \"DECRYPT\"]\n}", + "description": "Example: Subjects in sets 1 and 2 are entitled attribute value http://wwww.example.org/attr/example/value/one\nwith permitted actions TRANSMIT and DECRYPT\n{\n\"id\": \"someid\",\n\"attribute_value\": {example_one_attribute_value...},\n\"subject_sets\": [{subject_set_1},{subject_set_2}]\n\"actions\": [\"STANDARD_ACTION_TRANSMIT\", \"STANDARD_ACTION_DECRYPT\"]\n}", "title": "Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination" }, "subjectmappingSubjectMappingCreateUpdate": { @@ -704,12 +521,13 @@ "type": "string", "title": "Attribute Value to be mapped to" }, - "subjectSetIds": { + "subjectSets": { "type": "array", "items": { - "type": "string" + "type": "object", + "$ref": "#/definitions/subjectmappingSubjectSet" }, - "title": "the subjects sets in this mapping" + "title": "The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements" }, "actions": { "type": "array", @@ -734,12 +552,6 @@ "subjectmappingSubjectSet": { "type": "object", "properties": { - "id": { - "type": "string" - }, - "metadata": { - "$ref": "#/definitions/commonMetadata" - }, "conditionGroups": { "type": "array", "items": { @@ -751,21 +563,6 @@ }, "title": "A Set of subjects described by matching criteria via a list of condition groups.\nA Subject Set can be used by multiple Subject Mappings" }, - "subjectmappingSubjectSetCreateUpdate": { - "type": "object", - "properties": { - "metadata": { - "$ref": "#/definitions/commonMetadataMutable" - }, - "conditionGroups": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/subjectmappingConditionGroup" - } - } - } - }, "subjectmappingUpdateSubjectMappingResponse": { "type": "object", "properties": { @@ -773,14 +570,6 @@ "$ref": "#/definitions/subjectmappingSubjectMapping" } } - }, - "subjectmappingUpdateSubjectSetResponse": { - "type": "object", - "properties": { - "subjectSet": { - "$ref": "#/definitions/subjectmappingSubjectSet" - } - } } } } diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 3a573c487b..1a626344fc 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -127,32 +127,32 @@ func (ConditionBooleanTypeEnum) EnumDescriptor() ([]byte, []int) { } // * -// A Condition defines a rule of +// A Condition defines a rule of // -// Example: Match Subjects with an attribute "division" with a value of "Accounting" or "Marketing": +// Example: Match Subjects with field "division" and a value of "Accounting" or "Marketing": // { -// "subject_attribute": "division", +// "subject_external_field": "division", // "operator": "IN", -// "subject_values" : ["Accounting", "Marketing"] +// "subject_external_values" : ["Accounting", "Marketing"] // } // -// Example: Match a subject by preferred username: +// Example: Match a subject by ensuring they are not part of the Fantastic Four: // { -// "subject_attribute": "preferredUsername", -// "operator": "IN", -// "subject_values" : ["alice@example.org"] +// "subject_external_field": "superhero_name", +// "operator": "NOT_IN", +// "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] // } type Condition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Resource Attribute Key; NOT Attribute Definition Attribute name - SubjectAttribute string `protobuf:"bytes,1,opt,name=subject_attribute,json=subjectAttribute,proto3" json:"subject_attribute,omitempty"` + // externally known field name (such as from idP/LDAP) + SubjectExternalField string `protobuf:"bytes,1,opt,name=subject_external_field,json=subjectExternalField,proto3" json:"subject_external_field,omitempty"` // the operator Operator SubjectMappingOperatorEnum `protobuf:"varint,2,opt,name=operator,proto3,enum=policy.subjectmapping.SubjectMappingOperatorEnum" json:"operator,omitempty"` - // The list of comparison values for a resource's value - SubjectValues []string `protobuf:"bytes,3,rep,name=subject_values,json=subjectValues,proto3" json:"subject_values,omitempty"` + // list of comparison values for the subject_external_field + SubjectExternalValues []string `protobuf:"bytes,3,rep,name=subject_external_values,json=subjectExternalValues,proto3" json:"subject_external_values,omitempty"` } func (x *Condition) Reset() { @@ -187,9 +187,9 @@ func (*Condition) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{0} } -func (x *Condition) GetSubjectAttribute() string { +func (x *Condition) GetSubjectExternalField() string { if x != nil { - return x.SubjectAttribute + return x.SubjectExternalField } return "" } @@ -201,9 +201,9 @@ func (x *Condition) GetOperator() SubjectMappingOperatorEnum { return SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED } -func (x *Condition) GetSubjectValues() []string { +func (x *Condition) GetSubjectExternalValues() []string { if x != nil { - return x.SubjectValues + return x.SubjectExternalValues } return nil } @@ -272,10 +272,8 @@ type SubjectSet struct { 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"` // The conditions groups describing the matching rules for subjects in the set - ConditionGroups []*ConditionGroup `protobuf:"bytes,3,rep,name=condition_groups,json=conditionGroups,proto3" json:"condition_groups,omitempty"` + ConditionGroups []*ConditionGroup `protobuf:"bytes,1,rep,name=condition_groups,json=conditionGroups,proto3" json:"condition_groups,omitempty"` } func (x *SubjectSet) Reset() { @@ -310,20 +308,6 @@ func (*SubjectSet) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{2} } -func (x *SubjectSet) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *SubjectSet) GetMetadata() *common.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - func (x *SubjectSet) GetConditionGroups() []*ConditionGroup { if x != nil { return x.ConditionGroups @@ -339,7 +323,7 @@ func (x *SubjectSet) GetConditionGroups() []*ConditionGroup { // "id": "someid", // "attribute_value": {example_one_attribute_value...}, // "subject_sets": [{subject_set_1},{subject_set_2}] -// "actions": ["TRANSMIT", "DECRYPT"] +// "actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] // } type SubjectMapping struct { state protoimpl.MessageState @@ -347,7 +331,7 @@ type SubjectMapping struct { 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? + Metadata *common.Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute" AttributeValue *attributes.Value `protobuf:"bytes,3,opt,name=attribute_value,json=attributeValue,proto3" json:"attribute_value,omitempty"` // the subjects included in this mapping @@ -399,554 +383,30 @@ 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) GetSubjectSets() []*SubjectSet { - if x != nil { - return x.SubjectSets - } - return nil -} - -func (x *SubjectMapping) GetActions() []*authorization.Action { - if x != nil { - return x.Actions - } - return nil -} - -type SubjectSetCreateUpdate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - ConditionGroups []*ConditionGroup `protobuf:"bytes,2,rep,name=condition_groups,json=conditionGroups,proto3" json:"condition_groups,omitempty"` -} - -func (x *SubjectSetCreateUpdate) Reset() { - *x = SubjectSetCreateUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubjectSetCreateUpdate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubjectSetCreateUpdate) ProtoMessage() {} - -func (x *SubjectSetCreateUpdate) ProtoReflect() protoreflect.Message { - mi := &file_policy_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 SubjectSetCreateUpdate.ProtoReflect.Descriptor instead. -func (*SubjectSetCreateUpdate) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{4} -} - -func (x *SubjectSetCreateUpdate) GetMetadata() *common.MetadataMutable { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *SubjectSetCreateUpdate) GetConditionGroups() []*ConditionGroup { - if x != nil { - return x.ConditionGroups - } - return nil -} - -type GetSubjectSetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetSubjectSetRequest) Reset() { - *x = GetSubjectSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSubjectSetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubjectSetRequest) ProtoMessage() {} - -func (x *GetSubjectSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_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 GetSubjectSetRequest.ProtoReflect.Descriptor instead. -func (*GetSubjectSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{5} -} - -func (x *GetSubjectSetRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type GetSubjectSetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectSet *SubjectSet `protobuf:"bytes,1,opt,name=subject_set,json=subjectSet,proto3" json:"subject_set,omitempty"` -} - -func (x *GetSubjectSetResponse) Reset() { - *x = GetSubjectSetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetSubjectSetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetSubjectSetResponse) ProtoMessage() {} - -func (x *GetSubjectSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_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 GetSubjectSetResponse.ProtoReflect.Descriptor instead. -func (*GetSubjectSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{6} -} - -func (x *GetSubjectSetResponse) GetSubjectSet() *SubjectSet { - if x != nil { - return x.SubjectSet - } - return nil -} - -type CreateSubjectSetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectSet *SubjectSetCreateUpdate `protobuf:"bytes,1,opt,name=subject_set,json=subjectSet,proto3" json:"subject_set,omitempty"` -} - -func (x *CreateSubjectSetRequest) Reset() { - *x = CreateSubjectSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSubjectSetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSubjectSetRequest) ProtoMessage() {} - -func (x *CreateSubjectSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_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 CreateSubjectSetRequest.ProtoReflect.Descriptor instead. -func (*CreateSubjectSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{7} -} - -func (x *CreateSubjectSetRequest) GetSubjectSet() *SubjectSetCreateUpdate { - if x != nil { - return x.SubjectSet - } - return nil -} - -type CreateSubjectSetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectSet *SubjectSet `protobuf:"bytes,1,opt,name=subject_set,json=subjectSet,proto3" json:"subject_set,omitempty"` -} - -func (x *CreateSubjectSetResponse) Reset() { - *x = CreateSubjectSetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSubjectSetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSubjectSetResponse) ProtoMessage() {} - -func (x *CreateSubjectSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_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 CreateSubjectSetResponse.ProtoReflect.Descriptor instead. -func (*CreateSubjectSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{8} -} - -func (x *CreateSubjectSetResponse) GetSubjectSet() *SubjectSet { - if x != nil { - return x.SubjectSet - } - return nil -} - -type UpdateSubjectSetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - SubjectSet *SubjectSetCreateUpdate `protobuf:"bytes,2,opt,name=subject_set,json=subjectSet,proto3" json:"subject_set,omitempty"` -} - -func (x *UpdateSubjectSetRequest) Reset() { - *x = UpdateSubjectSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSubjectSetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSubjectSetRequest) ProtoMessage() {} - -func (x *UpdateSubjectSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_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 UpdateSubjectSetRequest.ProtoReflect.Descriptor instead. -func (*UpdateSubjectSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{9} -} - -func (x *UpdateSubjectSetRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *UpdateSubjectSetRequest) GetSubjectSet() *SubjectSetCreateUpdate { - if x != nil { - return x.SubjectSet - } - return nil -} - -type UpdateSubjectSetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectSet *SubjectSet `protobuf:"bytes,1,opt,name=subject_set,json=subjectSet,proto3" json:"subject_set,omitempty"` -} - -func (x *UpdateSubjectSetResponse) Reset() { - *x = UpdateSubjectSetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSubjectSetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSubjectSetResponse) ProtoMessage() {} - -func (x *UpdateSubjectSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_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 UpdateSubjectSetResponse.ProtoReflect.Descriptor instead. -func (*UpdateSubjectSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{10} -} - -func (x *UpdateSubjectSetResponse) GetSubjectSet() *SubjectSet { - if x != nil { - return x.SubjectSet - } - return nil -} - -type DeleteSubjectSetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteSubjectSetRequest) Reset() { - *x = DeleteSubjectSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSubjectSetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSubjectSetRequest) ProtoMessage() {} - -func (x *DeleteSubjectSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_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 DeleteSubjectSetRequest.ProtoReflect.Descriptor instead. -func (*DeleteSubjectSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{11} -} - -func (x *DeleteSubjectSetRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type DeleteSubjectSetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectSet *SubjectSet `protobuf:"bytes,1,opt,name=subject_set,json=subjectSet,proto3" json:"subject_set,omitempty"` -} - -func (x *DeleteSubjectSetResponse) Reset() { - *x = DeleteSubjectSetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteSubjectSetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteSubjectSetResponse) ProtoMessage() {} - -func (x *DeleteSubjectSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_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 DeleteSubjectSetResponse.ProtoReflect.Descriptor instead. -func (*DeleteSubjectSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{12} -} - -func (x *DeleteSubjectSetResponse) GetSubjectSet() *SubjectSet { - if x != nil { - return x.SubjectSet - } - return nil -} - -type ListSubjectSetsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *ListSubjectSetsRequest) Reset() { - *x = ListSubjectSetsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSubjectSetsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSubjectSetsRequest) ProtoMessage() {} - -func (x *ListSubjectSetsRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_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 ListSubjectSetsRequest.ProtoReflect.Descriptor instead. -func (*ListSubjectSetsRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{13} -} - -type ListSubjectSetsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectSets []*SubjectSet `protobuf:"bytes,1,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` -} - -func (x *ListSubjectSetsResponse) Reset() { - *x = ListSubjectSetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListSubjectSetsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListSubjectSetsResponse) ProtoMessage() {} - -func (x *ListSubjectSetsResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_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) + return nil } -// Deprecated: Use ListSubjectSetsResponse.ProtoReflect.Descriptor instead. -func (*ListSubjectSetsResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{14} +func (x *SubjectMapping) GetAttributeValue() *attributes.Value { + if x != nil { + return x.AttributeValue + } + return nil } -func (x *ListSubjectSetsResponse) GetSubjectSets() []*SubjectSet { +func (x *SubjectMapping) GetSubjectSets() []*SubjectSet { if x != nil { return x.SubjectSets } return nil } +func (x *SubjectMapping) GetActions() []*authorization.Action { + if x != nil { + return x.Actions + } + return nil +} + // A Representation of a subject as attribute->value pairs. This would mirror user attributes retrieved // from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc. type Subject struct { @@ -960,7 +420,7 @@ type Subject struct { func (x *Subject) Reset() { *x = Subject{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[15] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -973,7 +433,7 @@ func (x *Subject) String() string { func (*Subject) ProtoMessage() {} func (x *Subject) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[15] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -986,7 +446,7 @@ func (x *Subject) ProtoReflect() protoreflect.Message { // Deprecated: Use Subject.ProtoReflect.Descriptor instead. func (*Subject) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{15} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{4} } func (x *Subject) GetAttributes() *structpb.Struct { @@ -1007,7 +467,7 @@ type MatchSubjectMappingsRequest struct { func (x *MatchSubjectMappingsRequest) Reset() { *x = MatchSubjectMappingsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[16] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1020,7 +480,7 @@ func (x *MatchSubjectMappingsRequest) String() string { func (*MatchSubjectMappingsRequest) ProtoMessage() {} func (x *MatchSubjectMappingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[16] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1033,7 +493,7 @@ func (x *MatchSubjectMappingsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MatchSubjectMappingsRequest.ProtoReflect.Descriptor instead. func (*MatchSubjectMappingsRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{16} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{5} } func (x *MatchSubjectMappingsRequest) GetSubject() *Subject { @@ -1054,7 +514,7 @@ type MatchSubjectMappingsResponse struct { func (x *MatchSubjectMappingsResponse) Reset() { *x = MatchSubjectMappingsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1067,7 +527,7 @@ func (x *MatchSubjectMappingsResponse) String() string { func (*MatchSubjectMappingsResponse) ProtoMessage() {} func (x *MatchSubjectMappingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1080,7 +540,7 @@ func (x *MatchSubjectMappingsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MatchSubjectMappingsResponse.ProtoReflect.Descriptor instead. func (*MatchSubjectMappingsResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{17} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{6} } func (x *MatchSubjectMappingsResponse) GetSubjectMappings() []*SubjectMapping { @@ -1098,8 +558,8 @@ type SubjectMappingCreateUpdate struct { 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"` - // the subjects sets in this mapping - SubjectSetIds []string `protobuf:"bytes,3,rep,name=subject_set_ids,json=subjectSetIds,proto3" json:"subject_set_ids,omitempty"` + // The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements + SubjectSets []*SubjectSet `protobuf:"bytes,3,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` // The actions permitted by subjects in this mapping Actions []*authorization.Action `protobuf:"bytes,4,rep,name=actions,proto3" json:"actions,omitempty"` } @@ -1107,7 +567,7 @@ type SubjectMappingCreateUpdate struct { func (x *SubjectMappingCreateUpdate) Reset() { *x = SubjectMappingCreateUpdate{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[18] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1120,7 +580,7 @@ func (x *SubjectMappingCreateUpdate) String() string { func (*SubjectMappingCreateUpdate) ProtoMessage() {} func (x *SubjectMappingCreateUpdate) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[18] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1133,7 +593,7 @@ func (x *SubjectMappingCreateUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use SubjectMappingCreateUpdate.ProtoReflect.Descriptor instead. func (*SubjectMappingCreateUpdate) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{18} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{7} } func (x *SubjectMappingCreateUpdate) GetMetadata() *common.MetadataMutable { @@ -1150,9 +610,9 @@ func (x *SubjectMappingCreateUpdate) GetAttributeValueId() string { return "" } -func (x *SubjectMappingCreateUpdate) GetSubjectSetIds() []string { +func (x *SubjectMappingCreateUpdate) GetSubjectSets() []*SubjectSet { if x != nil { - return x.SubjectSetIds + return x.SubjectSets } return nil } @@ -1175,7 +635,7 @@ type GetSubjectMappingRequest struct { func (x *GetSubjectMappingRequest) Reset() { *x = GetSubjectMappingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[19] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1188,7 +648,7 @@ func (x *GetSubjectMappingRequest) String() string { func (*GetSubjectMappingRequest) ProtoMessage() {} func (x *GetSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[19] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1201,7 +661,7 @@ func (x *GetSubjectMappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSubjectMappingRequest.ProtoReflect.Descriptor instead. func (*GetSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{19} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{8} } func (x *GetSubjectMappingRequest) GetId() string { @@ -1222,7 +682,7 @@ type GetSubjectMappingResponse struct { func (x *GetSubjectMappingResponse) Reset() { *x = GetSubjectMappingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[20] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1235,7 +695,7 @@ func (x *GetSubjectMappingResponse) String() string { func (*GetSubjectMappingResponse) ProtoMessage() {} func (x *GetSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[20] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1248,7 +708,7 @@ func (x *GetSubjectMappingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSubjectMappingResponse.ProtoReflect.Descriptor instead. func (*GetSubjectMappingResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{20} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{9} } func (x *GetSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { @@ -1267,7 +727,7 @@ type ListSubjectMappingsRequest struct { func (x *ListSubjectMappingsRequest) Reset() { *x = ListSubjectMappingsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[21] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1280,7 +740,7 @@ func (x *ListSubjectMappingsRequest) String() string { func (*ListSubjectMappingsRequest) ProtoMessage() {} func (x *ListSubjectMappingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[21] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1293,7 +753,7 @@ func (x *ListSubjectMappingsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSubjectMappingsRequest.ProtoReflect.Descriptor instead. func (*ListSubjectMappingsRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{21} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{10} } type ListSubjectMappingsResponse struct { @@ -1307,7 +767,7 @@ type ListSubjectMappingsResponse struct { func (x *ListSubjectMappingsResponse) Reset() { *x = ListSubjectMappingsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[22] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1320,7 +780,7 @@ func (x *ListSubjectMappingsResponse) String() string { func (*ListSubjectMappingsResponse) ProtoMessage() {} func (x *ListSubjectMappingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[22] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1333,7 +793,7 @@ func (x *ListSubjectMappingsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSubjectMappingsResponse.ProtoReflect.Descriptor instead. func (*ListSubjectMappingsResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{22} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{11} } func (x *ListSubjectMappingsResponse) GetSubjectMappings() []*SubjectMapping { @@ -1354,7 +814,7 @@ type CreateSubjectMappingRequest struct { func (x *CreateSubjectMappingRequest) Reset() { *x = CreateSubjectMappingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[23] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1367,7 +827,7 @@ func (x *CreateSubjectMappingRequest) String() string { func (*CreateSubjectMappingRequest) ProtoMessage() {} func (x *CreateSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[23] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1380,7 +840,7 @@ func (x *CreateSubjectMappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateSubjectMappingRequest.ProtoReflect.Descriptor instead. func (*CreateSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{23} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{12} } func (x *CreateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingCreateUpdate { @@ -1401,7 +861,7 @@ type CreateSubjectMappingResponse struct { func (x *CreateSubjectMappingResponse) Reset() { *x = CreateSubjectMappingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[24] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1414,7 +874,7 @@ func (x *CreateSubjectMappingResponse) String() string { func (*CreateSubjectMappingResponse) ProtoMessage() {} func (x *CreateSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[24] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1427,7 +887,7 @@ func (x *CreateSubjectMappingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateSubjectMappingResponse.ProtoReflect.Descriptor instead. func (*CreateSubjectMappingResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{24} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{13} } func (x *CreateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { @@ -1449,7 +909,7 @@ type UpdateSubjectMappingRequest struct { func (x *UpdateSubjectMappingRequest) Reset() { *x = UpdateSubjectMappingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1462,7 +922,7 @@ func (x *UpdateSubjectMappingRequest) String() string { func (*UpdateSubjectMappingRequest) ProtoMessage() {} func (x *UpdateSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1475,7 +935,7 @@ func (x *UpdateSubjectMappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateSubjectMappingRequest.ProtoReflect.Descriptor instead. func (*UpdateSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{25} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{14} } func (x *UpdateSubjectMappingRequest) GetId() string { @@ -1503,7 +963,7 @@ type UpdateSubjectMappingResponse struct { func (x *UpdateSubjectMappingResponse) Reset() { *x = UpdateSubjectMappingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1516,7 +976,7 @@ func (x *UpdateSubjectMappingResponse) String() string { func (*UpdateSubjectMappingResponse) ProtoMessage() {} func (x *UpdateSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1529,7 +989,7 @@ func (x *UpdateSubjectMappingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateSubjectMappingResponse.ProtoReflect.Descriptor instead. func (*UpdateSubjectMappingResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{26} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{15} } func (x *UpdateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { @@ -1550,7 +1010,7 @@ type DeleteSubjectMappingRequest struct { func (x *DeleteSubjectMappingRequest) Reset() { *x = DeleteSubjectMappingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1563,7 +1023,7 @@ func (x *DeleteSubjectMappingRequest) String() string { func (*DeleteSubjectMappingRequest) ProtoMessage() {} func (x *DeleteSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1576,7 +1036,7 @@ func (x *DeleteSubjectMappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteSubjectMappingRequest.ProtoReflect.Descriptor instead. func (*DeleteSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{27} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{16} } func (x *DeleteSubjectMappingRequest) GetId() string { @@ -1597,7 +1057,7 @@ type DeleteSubjectMappingResponse struct { func (x *DeleteSubjectMappingResponse) Reset() { *x = DeleteSubjectMappingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1610,7 +1070,7 @@ func (x *DeleteSubjectMappingResponse) String() string { func (*DeleteSubjectMappingResponse) ProtoMessage() {} func (x *DeleteSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1623,7 +1083,7 @@ func (x *DeleteSubjectMappingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteSubjectMappingResponse.ProtoReflect.Descriptor instead. func (*DeleteSubjectMappingResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{28} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{17} } func (x *DeleteSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { @@ -1651,359 +1111,249 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x22, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 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, 0x22, 0xbb, 0x01, 0x0a, 0x09, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x10, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x41, 0x74, 0x74, 0x72, 0x69, - 0x62, 0x75, 0x74, 0x65, 0x12, 0x5a, 0x0a, 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, - 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4a, 0x0a, 0x0a, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, - 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5f, 0x0a, 0x0c, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, - 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, - 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0b, 0xba, - 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, - 0x65, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 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, 0x5a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, - 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, - 0x0f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x22, 0x88, 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, 0x41, 0x0a, 0x0f, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 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, 0x44, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x73, 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x0b, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x07, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 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, 0x22, 0x9f, 0x01, 0x0a, 0x16, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 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, 0x50, 0x0a, 0x10, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x0f, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x2e, 0x0a, - 0x14, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5b, 0x0a, - 0x15, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x0a, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x22, 0x71, 0x0a, 0x17, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x56, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, - 0x01, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x22, 0x5e, 0x0a, - 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0b, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, - 0x74, 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x22, 0x89, 0x01, - 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x56, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0a, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x22, 0x5e, 0x0a, 0x18, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6c, + 0x74, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x09, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x5a, 0x0a, + 0x08, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x12, 0x36, 0x0a, 0x17, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x15, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x73, 0x22, 0xbd, 0x01, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, + 0x72, 0x6f, 0x75, 0x70, 0x12, 0x4a, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, + 0x01, 0x02, 0x08, 0x01, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x12, 0x5f, 0x0a, 0x0c, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x42, 0x0b, 0xba, 0x48, 0x08, 0xc8, 0x01, 0x01, 0x82, + 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x68, 0x0a, 0x0a, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, + 0x5a, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x67, 0x72, 0x6f, + 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0x88, 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, 0x41, 0x0a, 0x0f, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, + 0x44, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x05, 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, 0x22, 0x42, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x0a, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x1b, 0x4d, 0x61, + 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x0a, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x22, 0x31, 0x0a, 0x17, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x5e, 0x0a, 0x18, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, + 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x22, 0x70, 0x0a, 0x1c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x50, 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, 0x25, 0x2e, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0xf6, 0x01, 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, 0x44, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, - 0x52, 0x0a, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x22, 0x18, 0x0a, 0x16, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5f, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x44, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x2f, 0x0a, + 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 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, 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, 0x6b, 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, + 0x4e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 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, 0x6f, 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, 0x50, 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, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x81, + 0x01, 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, 0x62, + 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x42, 0x0a, 0x07, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x12, 0x37, 0x0a, 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, - 0x0a, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x73, 0x22, 0x57, 0x0a, 0x1b, 0x4d, - 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, - 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x22, 0x70, 0x0a, 0x1c, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 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, 0x25, - 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0xd8, 0x01, 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, 0x26, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0d, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x49, 0x64, 0x73, - 0x12, 0x2f, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 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, 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, 0x6b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, + 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, 0x6e, 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, 0x4e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x6f, 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, - 0x50, 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, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 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, 0x81, 0x01, 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, 0x62, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 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, 0x6e, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x6e, 0x67, 0x22, 0x99, 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, 0x62, 0x0a, 0x0f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x6e, + 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, 0x4e, + 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 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, 0x6e, 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, 0x4e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x99, 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, 0x62, 0x0a, - 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x6e, 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, 0x4e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 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, 0x6e, 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, 0x4e, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x2a, 0x90, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, - 0x6e, 0x75, 0x6d, 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 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, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, + 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, 0x2a, 0x90, 0x01, 0x0a, 0x18, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x45, 0x6e, 0x75, 0x6d, + 0x12, 0x2b, 0x0a, 0x27, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, - 0x41, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, - 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xd7, 0x0d, 0x0a, 0x15, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x12, 0x86, 0x01, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2b, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x97, 0x01, 0x0a, - 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, - 0x74, 0x12, 0x2e, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x0b, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x22, 0x0d, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2e, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 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, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 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, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, - 0x74, 0x22, 0x12, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x73, 0x65, 0x74, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x8f, 0x01, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x12, 0x2e, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 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, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 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, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x14, 0x2a, 0x12, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x73, 0x65, - 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x2d, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 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, 0x53, - 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 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, 0x53, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x0f, 0x12, 0x0d, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x73, 0x65, 0x74, - 0x73, 0x12, 0xa9, 0x01, 0x0a, 0x14, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, - 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x07, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x97, 0x01, - 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, - 0x79, 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, 0x96, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x23, 0x0a, + 0x1f, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x45, + 0x41, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x41, 0x4e, 0x44, + 0x10, 0x01, 0x12, 0x22, 0x0a, 0x1e, 0x43, 0x4f, 0x4e, 0x44, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x5f, + 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, + 0x4d, 0x5f, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xf9, 0x07, 0x0a, 0x15, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0xa9, 0x01, 0x0a, 0x14, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, + 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, + 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x97, 0x01, 0x0a, + 0x13, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 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, 0x96, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x2f, 0x2e, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x30, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x30, - 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, + 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, + 0xab, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 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, 0x33, 0x2e, 0x70, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0xb0, 0x01, + 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0x33, 0x2e, 0x70, 0x6f, 0x6c, + 0x69, 0x63, 0x79, 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, 0xab, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x12, 0x9f, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, + 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, 0x33, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, + 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, 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, 0xb0, - 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 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, 0x33, 0x2e, 0x70, 0x6f, - 0x6c, 0x69, 0x63, 0x79, 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, 0x9f, 0x01, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, - 0x69, 0x63, 0x79, 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, 0x33, - 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 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, 0xf4, 0x01, 0x0a, 0x29, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, - 0x64, 0x66, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x6f, 0x6c, 0x69, - 0x63, 0x79, 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, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x70, 0x6c, 0x61, - 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, - 0x6f, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x58, 0xaa, 0x02, 0x15, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x15, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5c, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x21, - 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5c, 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, 0x16, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 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, 0xf4, 0x01, 0x0a, 0x29, 0x69, 0x6f, 0x2e, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, + 0x66, 0x2e, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x79, 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, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x70, 0x65, 0x6e, 0x74, 0x64, 0x66, 0x2f, 0x70, 0x6c, 0x61, 0x74, + 0x66, 0x6f, 0x72, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2f, 0x67, 0x6f, + 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x58, 0xaa, 0x02, 0x15, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x15, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5c, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x21, 0x50, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5c, 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, 0x16, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a, 0x3a, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -2019,7 +1369,7 @@ func file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP() []byte { } var file_policy_subjectmapping_subject_mapping_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_policy_subjectmapping_subject_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 29) +var file_policy_subjectmapping_subject_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (SubjectMappingOperatorEnum)(0), // 0: policy.subjectmapping.SubjectMappingOperatorEnum (ConditionBooleanTypeEnum)(0), // 1: policy.subjectmapping.ConditionBooleanTypeEnum @@ -2027,95 +1377,65 @@ var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (*ConditionGroup)(nil), // 3: policy.subjectmapping.ConditionGroup (*SubjectSet)(nil), // 4: policy.subjectmapping.SubjectSet (*SubjectMapping)(nil), // 5: policy.subjectmapping.SubjectMapping - (*SubjectSetCreateUpdate)(nil), // 6: policy.subjectmapping.SubjectSetCreateUpdate - (*GetSubjectSetRequest)(nil), // 7: policy.subjectmapping.GetSubjectSetRequest - (*GetSubjectSetResponse)(nil), // 8: policy.subjectmapping.GetSubjectSetResponse - (*CreateSubjectSetRequest)(nil), // 9: policy.subjectmapping.CreateSubjectSetRequest - (*CreateSubjectSetResponse)(nil), // 10: policy.subjectmapping.CreateSubjectSetResponse - (*UpdateSubjectSetRequest)(nil), // 11: policy.subjectmapping.UpdateSubjectSetRequest - (*UpdateSubjectSetResponse)(nil), // 12: policy.subjectmapping.UpdateSubjectSetResponse - (*DeleteSubjectSetRequest)(nil), // 13: policy.subjectmapping.DeleteSubjectSetRequest - (*DeleteSubjectSetResponse)(nil), // 14: policy.subjectmapping.DeleteSubjectSetResponse - (*ListSubjectSetsRequest)(nil), // 15: policy.subjectmapping.ListSubjectSetsRequest - (*ListSubjectSetsResponse)(nil), // 16: policy.subjectmapping.ListSubjectSetsResponse - (*Subject)(nil), // 17: policy.subjectmapping.Subject - (*MatchSubjectMappingsRequest)(nil), // 18: policy.subjectmapping.MatchSubjectMappingsRequest - (*MatchSubjectMappingsResponse)(nil), // 19: policy.subjectmapping.MatchSubjectMappingsResponse - (*SubjectMappingCreateUpdate)(nil), // 20: policy.subjectmapping.SubjectMappingCreateUpdate - (*GetSubjectMappingRequest)(nil), // 21: policy.subjectmapping.GetSubjectMappingRequest - (*GetSubjectMappingResponse)(nil), // 22: policy.subjectmapping.GetSubjectMappingResponse - (*ListSubjectMappingsRequest)(nil), // 23: policy.subjectmapping.ListSubjectMappingsRequest - (*ListSubjectMappingsResponse)(nil), // 24: policy.subjectmapping.ListSubjectMappingsResponse - (*CreateSubjectMappingRequest)(nil), // 25: policy.subjectmapping.CreateSubjectMappingRequest - (*CreateSubjectMappingResponse)(nil), // 26: policy.subjectmapping.CreateSubjectMappingResponse - (*UpdateSubjectMappingRequest)(nil), // 27: policy.subjectmapping.UpdateSubjectMappingRequest - (*UpdateSubjectMappingResponse)(nil), // 28: policy.subjectmapping.UpdateSubjectMappingResponse - (*DeleteSubjectMappingRequest)(nil), // 29: policy.subjectmapping.DeleteSubjectMappingRequest - (*DeleteSubjectMappingResponse)(nil), // 30: policy.subjectmapping.DeleteSubjectMappingResponse - (*common.Metadata)(nil), // 31: common.Metadata - (*attributes.Value)(nil), // 32: policy.attributes.Value - (*authorization.Action)(nil), // 33: authorization.Action - (*common.MetadataMutable)(nil), // 34: common.MetadataMutable - (*structpb.Struct)(nil), // 35: google.protobuf.Struct + (*Subject)(nil), // 6: policy.subjectmapping.Subject + (*MatchSubjectMappingsRequest)(nil), // 7: policy.subjectmapping.MatchSubjectMappingsRequest + (*MatchSubjectMappingsResponse)(nil), // 8: policy.subjectmapping.MatchSubjectMappingsResponse + (*SubjectMappingCreateUpdate)(nil), // 9: policy.subjectmapping.SubjectMappingCreateUpdate + (*GetSubjectMappingRequest)(nil), // 10: policy.subjectmapping.GetSubjectMappingRequest + (*GetSubjectMappingResponse)(nil), // 11: policy.subjectmapping.GetSubjectMappingResponse + (*ListSubjectMappingsRequest)(nil), // 12: policy.subjectmapping.ListSubjectMappingsRequest + (*ListSubjectMappingsResponse)(nil), // 13: policy.subjectmapping.ListSubjectMappingsResponse + (*CreateSubjectMappingRequest)(nil), // 14: policy.subjectmapping.CreateSubjectMappingRequest + (*CreateSubjectMappingResponse)(nil), // 15: policy.subjectmapping.CreateSubjectMappingResponse + (*UpdateSubjectMappingRequest)(nil), // 16: policy.subjectmapping.UpdateSubjectMappingRequest + (*UpdateSubjectMappingResponse)(nil), // 17: policy.subjectmapping.UpdateSubjectMappingResponse + (*DeleteSubjectMappingRequest)(nil), // 18: policy.subjectmapping.DeleteSubjectMappingRequest + (*DeleteSubjectMappingResponse)(nil), // 19: policy.subjectmapping.DeleteSubjectMappingResponse + (*common.Metadata)(nil), // 20: common.Metadata + (*attributes.Value)(nil), // 21: policy.attributes.Value + (*authorization.Action)(nil), // 22: authorization.Action + (*structpb.Struct)(nil), // 23: google.protobuf.Struct + (*common.MetadataMutable)(nil), // 24: common.MetadataMutable } var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 0, // 0: policy.subjectmapping.Condition.operator:type_name -> policy.subjectmapping.SubjectMappingOperatorEnum 2, // 1: policy.subjectmapping.ConditionGroup.conditions:type_name -> policy.subjectmapping.Condition 1, // 2: policy.subjectmapping.ConditionGroup.boolean_type:type_name -> policy.subjectmapping.ConditionBooleanTypeEnum - 31, // 3: policy.subjectmapping.SubjectSet.metadata:type_name -> common.Metadata - 3, // 4: policy.subjectmapping.SubjectSet.condition_groups:type_name -> policy.subjectmapping.ConditionGroup - 31, // 5: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata - 32, // 6: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value - 4, // 7: policy.subjectmapping.SubjectMapping.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 33, // 8: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action - 34, // 9: policy.subjectmapping.SubjectSetCreateUpdate.metadata:type_name -> common.MetadataMutable - 3, // 10: policy.subjectmapping.SubjectSetCreateUpdate.condition_groups:type_name -> policy.subjectmapping.ConditionGroup - 4, // 11: policy.subjectmapping.GetSubjectSetResponse.subject_set:type_name -> policy.subjectmapping.SubjectSet - 6, // 12: policy.subjectmapping.CreateSubjectSetRequest.subject_set:type_name -> policy.subjectmapping.SubjectSetCreateUpdate - 4, // 13: policy.subjectmapping.CreateSubjectSetResponse.subject_set:type_name -> policy.subjectmapping.SubjectSet - 6, // 14: policy.subjectmapping.UpdateSubjectSetRequest.subject_set:type_name -> policy.subjectmapping.SubjectSetCreateUpdate - 4, // 15: policy.subjectmapping.UpdateSubjectSetResponse.subject_set:type_name -> policy.subjectmapping.SubjectSet - 4, // 16: policy.subjectmapping.DeleteSubjectSetResponse.subject_set:type_name -> policy.subjectmapping.SubjectSet - 4, // 17: policy.subjectmapping.ListSubjectSetsResponse.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 35, // 18: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct - 17, // 19: policy.subjectmapping.MatchSubjectMappingsRequest.subject:type_name -> policy.subjectmapping.Subject - 5, // 20: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 34, // 21: policy.subjectmapping.SubjectMappingCreateUpdate.metadata:type_name -> common.MetadataMutable - 33, // 22: policy.subjectmapping.SubjectMappingCreateUpdate.actions:type_name -> authorization.Action - 5, // 23: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 5, // 24: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 20, // 25: policy.subjectmapping.CreateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingCreateUpdate - 5, // 26: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 20, // 27: policy.subjectmapping.UpdateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingCreateUpdate - 5, // 28: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 5, // 29: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 7, // 30: policy.subjectmapping.SubjectMappingService.GetSubjectSet:input_type -> policy.subjectmapping.GetSubjectSetRequest - 9, // 31: policy.subjectmapping.SubjectMappingService.CreateSubjectSet:input_type -> policy.subjectmapping.CreateSubjectSetRequest - 11, // 32: policy.subjectmapping.SubjectMappingService.UpdateSubjectSet:input_type -> policy.subjectmapping.UpdateSubjectSetRequest - 13, // 33: policy.subjectmapping.SubjectMappingService.DeleteSubjectSet:input_type -> policy.subjectmapping.DeleteSubjectSetRequest - 15, // 34: policy.subjectmapping.SubjectMappingService.ListSubjectSets:input_type -> policy.subjectmapping.ListSubjectSetsRequest - 18, // 35: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest - 23, // 36: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest - 21, // 37: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest - 25, // 38: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest - 27, // 39: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest - 29, // 40: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest - 8, // 41: policy.subjectmapping.SubjectMappingService.GetSubjectSet:output_type -> policy.subjectmapping.GetSubjectSetResponse - 10, // 42: policy.subjectmapping.SubjectMappingService.CreateSubjectSet:output_type -> policy.subjectmapping.CreateSubjectSetResponse - 12, // 43: policy.subjectmapping.SubjectMappingService.UpdateSubjectSet:output_type -> policy.subjectmapping.UpdateSubjectSetResponse - 14, // 44: policy.subjectmapping.SubjectMappingService.DeleteSubjectSet:output_type -> policy.subjectmapping.DeleteSubjectSetResponse - 16, // 45: policy.subjectmapping.SubjectMappingService.ListSubjectSets:output_type -> policy.subjectmapping.ListSubjectSetsResponse - 19, // 46: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse - 24, // 47: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse - 22, // 48: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse - 26, // 49: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse - 28, // 50: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse - 30, // 51: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse - 41, // [41:52] is the sub-list for method output_type - 30, // [30:41] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name + 3, // 3: policy.subjectmapping.SubjectSet.condition_groups:type_name -> policy.subjectmapping.ConditionGroup + 20, // 4: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata + 21, // 5: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value + 4, // 6: policy.subjectmapping.SubjectMapping.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 22, // 7: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action + 23, // 8: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct + 6, // 9: policy.subjectmapping.MatchSubjectMappingsRequest.subject:type_name -> policy.subjectmapping.Subject + 5, // 10: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 24, // 11: policy.subjectmapping.SubjectMappingCreateUpdate.metadata:type_name -> common.MetadataMutable + 4, // 12: policy.subjectmapping.SubjectMappingCreateUpdate.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 22, // 13: policy.subjectmapping.SubjectMappingCreateUpdate.actions:type_name -> authorization.Action + 5, // 14: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 5, // 15: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 9, // 16: policy.subjectmapping.CreateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingCreateUpdate + 5, // 17: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 9, // 18: policy.subjectmapping.UpdateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingCreateUpdate + 5, // 19: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 5, // 20: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 7, // 21: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 22: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 23: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 14, // 24: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 16, // 25: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 18, // 26: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 8, // 27: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 28: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 29: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 15, // 30: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 17, // 31: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 19, // 32: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 27, // [27:33] is the sub-list for method output_type + 21, // [21:27] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } @@ -2173,138 +1493,6 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectSetCreateUpdate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubjectSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetSubjectSetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSubjectSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSubjectSetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSubjectSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSubjectSetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSubjectSetRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSubjectSetResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSubjectSetsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListSubjectSetsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Subject); i { case 0: return &v.state @@ -2316,7 +1504,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MatchSubjectMappingsRequest); i { case 0: return &v.state @@ -2328,7 +1516,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MatchSubjectMappingsResponse); i { case 0: return &v.state @@ -2340,7 +1528,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubjectMappingCreateUpdate); i { case 0: return &v.state @@ -2352,7 +1540,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSubjectMappingRequest); i { case 0: return &v.state @@ -2364,7 +1552,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSubjectMappingResponse); i { case 0: return &v.state @@ -2376,7 +1564,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSubjectMappingsRequest); i { case 0: return &v.state @@ -2388,7 +1576,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSubjectMappingsResponse); i { case 0: return &v.state @@ -2400,7 +1588,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateSubjectMappingRequest); i { case 0: return &v.state @@ -2412,7 +1600,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateSubjectMappingResponse); i { case 0: return &v.state @@ -2424,7 +1612,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubjectMappingRequest); i { case 0: return &v.state @@ -2436,7 +1624,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubjectMappingResponse); i { case 0: return &v.state @@ -2448,7 +1636,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSubjectMappingRequest); i { case 0: return &v.state @@ -2460,7 +1648,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSubjectMappingResponse); i { case 0: return &v.state @@ -2479,7 +1667,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_policy_subjectmapping_subject_mapping_proto_rawDesc, NumEnums: 2, - NumMessages: 29, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go index bf88be79a9..9d46ad9239 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go @@ -31,230 +31,6 @@ var _ = runtime.String var _ = utilities.NewDoubleArray var _ = metadata.Join -func request_SubjectMappingService_GetSubjectSet_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSubjectSetRequest - 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.GetSubjectSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SubjectMappingService_GetSubjectSet_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSubjectSetRequest - 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.GetSubjectSet(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SubjectMappingService_CreateSubjectSet_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateSubjectSetRequest - 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.SubjectSet); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.CreateSubjectSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SubjectMappingService_CreateSubjectSet_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq CreateSubjectSetRequest - 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.SubjectSet); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.CreateSubjectSet(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SubjectMappingService_UpdateSubjectSet_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateSubjectSetRequest - 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.SubjectSet); 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.UpdateSubjectSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SubjectMappingService_UpdateSubjectSet_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq UpdateSubjectSetRequest - 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.SubjectSet); 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.UpdateSubjectSet(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SubjectMappingService_DeleteSubjectSet_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSubjectSetRequest - 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.DeleteSubjectSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SubjectMappingService_DeleteSubjectSet_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq DeleteSubjectSetRequest - 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.DeleteSubjectSet(ctx, &protoReq) - return msg, metadata, err - -} - -func request_SubjectMappingService_ListSubjectSets_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSubjectSetsRequest - var metadata runtime.ServerMetadata - - msg, err := client.ListSubjectSets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_SubjectMappingService_ListSubjectSets_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq ListSubjectSetsRequest - var metadata runtime.ServerMetadata - - msg, err := server.ListSubjectSets(ctx, &protoReq) - return msg, metadata, err - -} - func request_SubjectMappingService_MatchSubjectMappings_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq MatchSubjectMappingsRequest var metadata runtime.ServerMetadata @@ -519,131 +295,6 @@ func local_request_SubjectMappingService_DeleteSubjectMapping_0(ctx context.Cont // 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_SubjectMappingService_GetSubjectSet_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, "/policy.subjectmapping.SubjectMappingService/GetSubjectSet", runtime.WithHTTPPathPattern("/subject-sets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SubjectMappingService_GetSubjectSet_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_SubjectMappingService_GetSubjectSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SubjectMappingService_CreateSubjectSet_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, "/policy.subjectmapping.SubjectMappingService/CreateSubjectSet", runtime.WithHTTPPathPattern("/subject-sets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SubjectMappingService_CreateSubjectSet_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_SubjectMappingService_CreateSubjectSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SubjectMappingService_UpdateSubjectSet_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, "/policy.subjectmapping.SubjectMappingService/UpdateSubjectSet", runtime.WithHTTPPathPattern("/subject-sets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SubjectMappingService_UpdateSubjectSet_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_SubjectMappingService_UpdateSubjectSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_SubjectMappingService_DeleteSubjectSet_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, "/policy.subjectmapping.SubjectMappingService/DeleteSubjectSet", runtime.WithHTTPPathPattern("/subject-sets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SubjectMappingService_DeleteSubjectSet_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_SubjectMappingService_DeleteSubjectSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SubjectMappingService_ListSubjectSets_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, "/policy.subjectmapping.SubjectMappingService/ListSubjectSets", runtime.WithHTTPPathPattern("/subject-sets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_SubjectMappingService_ListSubjectSets_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_SubjectMappingService_ListSubjectSets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("POST", pattern_SubjectMappingService_MatchSubjectMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -835,116 +486,6 @@ func RegisterSubjectMappingServiceHandler(ctx context.Context, mux *runtime.Serv // "SubjectMappingServiceClient" to call the correct interceptors. func RegisterSubjectMappingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SubjectMappingServiceClient) error { - mux.Handle("GET", pattern_SubjectMappingService_GetSubjectSet_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, "/policy.subjectmapping.SubjectMappingService/GetSubjectSet", runtime.WithHTTPPathPattern("/subject-sets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SubjectMappingService_GetSubjectSet_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SubjectMappingService_GetSubjectSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SubjectMappingService_CreateSubjectSet_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, "/policy.subjectmapping.SubjectMappingService/CreateSubjectSet", runtime.WithHTTPPathPattern("/subject-sets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SubjectMappingService_CreateSubjectSet_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SubjectMappingService_CreateSubjectSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("POST", pattern_SubjectMappingService_UpdateSubjectSet_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, "/policy.subjectmapping.SubjectMappingService/UpdateSubjectSet", runtime.WithHTTPPathPattern("/subject-sets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SubjectMappingService_UpdateSubjectSet_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SubjectMappingService_UpdateSubjectSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("DELETE", pattern_SubjectMappingService_DeleteSubjectSet_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, "/policy.subjectmapping.SubjectMappingService/DeleteSubjectSet", runtime.WithHTTPPathPattern("/subject-sets/{id}")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SubjectMappingService_DeleteSubjectSet_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SubjectMappingService_DeleteSubjectSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_SubjectMappingService_ListSubjectSets_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, "/policy.subjectmapping.SubjectMappingService/ListSubjectSets", runtime.WithHTTPPathPattern("/subject-sets")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_SubjectMappingService_ListSubjectSets_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_SubjectMappingService_ListSubjectSets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("POST", pattern_SubjectMappingService_MatchSubjectMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1081,16 +622,6 @@ func RegisterSubjectMappingServiceHandlerClient(ctx context.Context, mux *runtim } var ( - pattern_SubjectMappingService_GetSubjectSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-sets", "id"}, "")) - - pattern_SubjectMappingService_CreateSubjectSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"subject-sets"}, "")) - - pattern_SubjectMappingService_UpdateSubjectSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-sets", "id"}, "")) - - pattern_SubjectMappingService_DeleteSubjectSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-sets", "id"}, "")) - - pattern_SubjectMappingService_ListSubjectSets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"subject-sets"}, "")) - pattern_SubjectMappingService_MatchSubjectMappings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"subject-mappings", "match"}, "")) pattern_SubjectMappingService_ListSubjectMappings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"subject-mappings"}, "")) @@ -1105,16 +636,6 @@ var ( ) var ( - forward_SubjectMappingService_GetSubjectSet_0 = runtime.ForwardResponseMessage - - forward_SubjectMappingService_CreateSubjectSet_0 = runtime.ForwardResponseMessage - - forward_SubjectMappingService_UpdateSubjectSet_0 = runtime.ForwardResponseMessage - - forward_SubjectMappingService_DeleteSubjectSet_0 = runtime.ForwardResponseMessage - - forward_SubjectMappingService_ListSubjectSets_0 = runtime.ForwardResponseMessage - forward_SubjectMappingService_MatchSubjectMappings_0 = runtime.ForwardResponseMessage forward_SubjectMappingService_ListSubjectMappings_0 = runtime.ForwardResponseMessage diff --git a/protocol/go/policy/subjectmapping/subject_mapping_grpc.pb.go b/protocol/go/policy/subjectmapping/subject_mapping_grpc.pb.go index 4cce671289..1ca8fe8886 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping_grpc.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping_grpc.pb.go @@ -19,11 +19,6 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - SubjectMappingService_GetSubjectSet_FullMethodName = "/policy.subjectmapping.SubjectMappingService/GetSubjectSet" - SubjectMappingService_CreateSubjectSet_FullMethodName = "/policy.subjectmapping.SubjectMappingService/CreateSubjectSet" - SubjectMappingService_UpdateSubjectSet_FullMethodName = "/policy.subjectmapping.SubjectMappingService/UpdateSubjectSet" - SubjectMappingService_DeleteSubjectSet_FullMethodName = "/policy.subjectmapping.SubjectMappingService/DeleteSubjectSet" - SubjectMappingService_ListSubjectSets_FullMethodName = "/policy.subjectmapping.SubjectMappingService/ListSubjectSets" SubjectMappingService_MatchSubjectMappings_FullMethodName = "/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings" SubjectMappingService_ListSubjectMappings_FullMethodName = "/policy.subjectmapping.SubjectMappingService/ListSubjectMappings" SubjectMappingService_GetSubjectMapping_FullMethodName = "/policy.subjectmapping.SubjectMappingService/GetSubjectMapping" @@ -36,11 +31,6 @@ const ( // // 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 { - GetSubjectSet(ctx context.Context, in *GetSubjectSetRequest, opts ...grpc.CallOption) (*GetSubjectSetResponse, error) - CreateSubjectSet(ctx context.Context, in *CreateSubjectSetRequest, opts ...grpc.CallOption) (*CreateSubjectSetResponse, error) - UpdateSubjectSet(ctx context.Context, in *UpdateSubjectSetRequest, opts ...grpc.CallOption) (*UpdateSubjectSetResponse, error) - DeleteSubjectSet(ctx context.Context, in *DeleteSubjectSetRequest, opts ...grpc.CallOption) (*DeleteSubjectSetResponse, error) - ListSubjectSets(ctx context.Context, in *ListSubjectSetsRequest, opts ...grpc.CallOption) (*ListSubjectSetsResponse, error) // Find matching Subject Mappings for a given Subject MatchSubjectMappings(ctx context.Context, in *MatchSubjectMappingsRequest, opts ...grpc.CallOption) (*MatchSubjectMappingsResponse, error) ListSubjectMappings(ctx context.Context, in *ListSubjectMappingsRequest, opts ...grpc.CallOption) (*ListSubjectMappingsResponse, error) @@ -58,51 +48,6 @@ func NewSubjectMappingServiceClient(cc grpc.ClientConnInterface) SubjectMappingS return &subjectMappingServiceClient{cc} } -func (c *subjectMappingServiceClient) GetSubjectSet(ctx context.Context, in *GetSubjectSetRequest, opts ...grpc.CallOption) (*GetSubjectSetResponse, error) { - out := new(GetSubjectSetResponse) - err := c.cc.Invoke(ctx, SubjectMappingService_GetSubjectSet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subjectMappingServiceClient) CreateSubjectSet(ctx context.Context, in *CreateSubjectSetRequest, opts ...grpc.CallOption) (*CreateSubjectSetResponse, error) { - out := new(CreateSubjectSetResponse) - err := c.cc.Invoke(ctx, SubjectMappingService_CreateSubjectSet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subjectMappingServiceClient) UpdateSubjectSet(ctx context.Context, in *UpdateSubjectSetRequest, opts ...grpc.CallOption) (*UpdateSubjectSetResponse, error) { - out := new(UpdateSubjectSetResponse) - err := c.cc.Invoke(ctx, SubjectMappingService_UpdateSubjectSet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subjectMappingServiceClient) DeleteSubjectSet(ctx context.Context, in *DeleteSubjectSetRequest, opts ...grpc.CallOption) (*DeleteSubjectSetResponse, error) { - out := new(DeleteSubjectSetResponse) - err := c.cc.Invoke(ctx, SubjectMappingService_DeleteSubjectSet_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *subjectMappingServiceClient) ListSubjectSets(ctx context.Context, in *ListSubjectSetsRequest, opts ...grpc.CallOption) (*ListSubjectSetsResponse, error) { - out := new(ListSubjectSetsResponse) - err := c.cc.Invoke(ctx, SubjectMappingService_ListSubjectSets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *subjectMappingServiceClient) MatchSubjectMappings(ctx context.Context, in *MatchSubjectMappingsRequest, opts ...grpc.CallOption) (*MatchSubjectMappingsResponse, error) { out := new(MatchSubjectMappingsResponse) err := c.cc.Invoke(ctx, SubjectMappingService_MatchSubjectMappings_FullMethodName, in, out, opts...) @@ -161,11 +106,6 @@ func (c *subjectMappingServiceClient) DeleteSubjectMapping(ctx context.Context, // All implementations must embed UnimplementedSubjectMappingServiceServer // for forward compatibility type SubjectMappingServiceServer interface { - GetSubjectSet(context.Context, *GetSubjectSetRequest) (*GetSubjectSetResponse, error) - CreateSubjectSet(context.Context, *CreateSubjectSetRequest) (*CreateSubjectSetResponse, error) - UpdateSubjectSet(context.Context, *UpdateSubjectSetRequest) (*UpdateSubjectSetResponse, error) - DeleteSubjectSet(context.Context, *DeleteSubjectSetRequest) (*DeleteSubjectSetResponse, error) - ListSubjectSets(context.Context, *ListSubjectSetsRequest) (*ListSubjectSetsResponse, error) // Find matching Subject Mappings for a given Subject MatchSubjectMappings(context.Context, *MatchSubjectMappingsRequest) (*MatchSubjectMappingsResponse, error) ListSubjectMappings(context.Context, *ListSubjectMappingsRequest) (*ListSubjectMappingsResponse, error) @@ -180,21 +120,6 @@ type SubjectMappingServiceServer interface { type UnimplementedSubjectMappingServiceServer struct { } -func (UnimplementedSubjectMappingServiceServer) GetSubjectSet(context.Context, *GetSubjectSetRequest) (*GetSubjectSetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSubjectSet not implemented") -} -func (UnimplementedSubjectMappingServiceServer) CreateSubjectSet(context.Context, *CreateSubjectSetRequest) (*CreateSubjectSetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method CreateSubjectSet not implemented") -} -func (UnimplementedSubjectMappingServiceServer) UpdateSubjectSet(context.Context, *UpdateSubjectSetRequest) (*UpdateSubjectSetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateSubjectSet not implemented") -} -func (UnimplementedSubjectMappingServiceServer) DeleteSubjectSet(context.Context, *DeleteSubjectSetRequest) (*DeleteSubjectSetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method DeleteSubjectSet not implemented") -} -func (UnimplementedSubjectMappingServiceServer) ListSubjectSets(context.Context, *ListSubjectSetsRequest) (*ListSubjectSetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListSubjectSets not implemented") -} func (UnimplementedSubjectMappingServiceServer) MatchSubjectMappings(context.Context, *MatchSubjectMappingsRequest) (*MatchSubjectMappingsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MatchSubjectMappings not implemented") } @@ -226,96 +151,6 @@ func RegisterSubjectMappingServiceServer(s grpc.ServiceRegistrar, srv SubjectMap s.RegisterService(&SubjectMappingService_ServiceDesc, srv) } -func _SubjectMappingService_GetSubjectSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSubjectSetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectMappingServiceServer).GetSubjectSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectMappingService_GetSubjectSet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectMappingServiceServer).GetSubjectSet(ctx, req.(*GetSubjectSetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SubjectMappingService_CreateSubjectSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateSubjectSetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectMappingServiceServer).CreateSubjectSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectMappingService_CreateSubjectSet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectMappingServiceServer).CreateSubjectSet(ctx, req.(*CreateSubjectSetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SubjectMappingService_UpdateSubjectSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateSubjectSetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectMappingServiceServer).UpdateSubjectSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectMappingService_UpdateSubjectSet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectMappingServiceServer).UpdateSubjectSet(ctx, req.(*UpdateSubjectSetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SubjectMappingService_DeleteSubjectSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(DeleteSubjectSetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectMappingServiceServer).DeleteSubjectSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectMappingService_DeleteSubjectSet_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectMappingServiceServer).DeleteSubjectSet(ctx, req.(*DeleteSubjectSetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _SubjectMappingService_ListSubjectSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListSubjectSetsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SubjectMappingServiceServer).ListSubjectSets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: SubjectMappingService_ListSubjectSets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SubjectMappingServiceServer).ListSubjectSets(ctx, req.(*ListSubjectSetsRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _SubjectMappingService_MatchSubjectMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MatchSubjectMappingsRequest) if err := dec(in); err != nil { @@ -431,26 +266,6 @@ var SubjectMappingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "policy.subjectmapping.SubjectMappingService", HandlerType: (*SubjectMappingServiceServer)(nil), Methods: []grpc.MethodDesc{ - { - MethodName: "GetSubjectSet", - Handler: _SubjectMappingService_GetSubjectSet_Handler, - }, - { - MethodName: "CreateSubjectSet", - Handler: _SubjectMappingService_CreateSubjectSet_Handler, - }, - { - MethodName: "UpdateSubjectSet", - Handler: _SubjectMappingService_UpdateSubjectSet_Handler, - }, - { - MethodName: "DeleteSubjectSet", - Handler: _SubjectMappingService_DeleteSubjectSet_Handler, - }, - { - MethodName: "ListSubjectSets", - Handler: _SubjectMappingService_ListSubjectSets_Handler, - }, { MethodName: "MatchSubjectMappings", Handler: _SubjectMappingService_MatchSubjectMappings_Handler, diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Condition.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Condition.java index d49bb14154..393f3117ea 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Condition.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Condition.java @@ -7,20 +7,20 @@ /** *
      **
    - *A Condition defines a rule of <subject attribute> <operator> <subject values>
    + *A Condition defines a rule of <subject external field name> <operator> <subject external values>
      *
    - *Example:  Match Subjects with an attribute "division" with a value of "Accounting" or "Marketing":
    + *Example:  Match Subjects with field "division" and a value of "Accounting" or "Marketing":
      *{
    - *"subject_attribute": "division",
    + *"subject_external_field": "division",
      *"operator": "IN",
    - *"subject_values" : ["Accounting", "Marketing"]
    + *"subject_external_values" : ["Accounting", "Marketing"]
      *}
      *
    - *Example: Match a subject by preferred username:
    + *Example: Match a subject by ensuring they are not part of the Fantastic Four:
      *{
    - *"subject_attribute": "preferredUsername",
    - *"operator": "IN",
    - *"subject_values" : ["alice@example.org"]
    + *"subject_external_field": "superhero_name",
    + *"operator": "NOT_IN",
    + *"subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"]
      *}
      * 
    * @@ -36,9 +36,9 @@ private Condition(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Condition() { - subjectAttribute_ = ""; + subjectExternalField_ = ""; operator_ = 0; - subjectValues_ = + subjectExternalValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); } @@ -62,47 +62,47 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.Condition.class, io.opentdf.platform.policy.subjectmapping.Condition.Builder.class); } - public static final int SUBJECT_ATTRIBUTE_FIELD_NUMBER = 1; + public static final int SUBJECT_EXTERNAL_FIELD_FIELD_NUMBER = 1; @SuppressWarnings("serial") - private volatile java.lang.Object subjectAttribute_ = ""; + private volatile java.lang.Object subjectExternalField_ = ""; /** *
    -   * Resource Attribute Key; NOT Attribute Definition Attribute name
    +   * externally known field name (such as from idP/LDAP)
        * 
    * - * string subject_attribute = 1 [json_name = "subjectAttribute"]; - * @return The subjectAttribute. + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The subjectExternalField. */ @java.lang.Override - public java.lang.String getSubjectAttribute() { - java.lang.Object ref = subjectAttribute_; + public java.lang.String getSubjectExternalField() { + java.lang.Object ref = subjectExternalField_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - subjectAttribute_ = s; + subjectExternalField_ = s; return s; } } /** *
    -   * Resource Attribute Key; NOT Attribute Definition Attribute name
    +   * externally known field name (such as from idP/LDAP)
        * 
    * - * string subject_attribute = 1 [json_name = "subjectAttribute"]; - * @return The bytes for subjectAttribute. + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The bytes for subjectExternalField. */ @java.lang.Override public com.google.protobuf.ByteString - getSubjectAttributeBytes() { - java.lang.Object ref = subjectAttribute_; + getSubjectExternalFieldBytes() { + java.lang.Object ref = subjectExternalField_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - subjectAttribute_ = b; + subjectExternalField_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -135,57 +135,57 @@ public java.lang.String getSubjectAttribute() { return result == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingOperatorEnum.UNRECOGNIZED : result; } - public static final int SUBJECT_VALUES_FIELD_NUMBER = 3; + public static final int SUBJECT_EXTERNAL_VALUES_FIELD_NUMBER = 3; @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList subjectValues_ = + private com.google.protobuf.LazyStringArrayList subjectExternalValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); /** *
    -   * The list of comparison values for a resource's <attribute> value
    +   * list of comparison values for the subject_external_field
        * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; - * @return A list containing the subjectValues. + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return A list containing the subjectExternalValues. */ public com.google.protobuf.ProtocolStringList - getSubjectValuesList() { - return subjectValues_; + getSubjectExternalValuesList() { + return subjectExternalValues_; } /** *
    -   * The list of comparison values for a resource's <attribute> value
    +   * list of comparison values for the subject_external_field
        * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; - * @return The count of subjectValues. + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return The count of subjectExternalValues. */ - public int getSubjectValuesCount() { - return subjectValues_.size(); + public int getSubjectExternalValuesCount() { + return subjectExternalValues_.size(); } /** *
    -   * The list of comparison values for a resource's <attribute> value
    +   * list of comparison values for the subject_external_field
        * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; * @param index The index of the element to return. - * @return The subjectValues at the given index. + * @return The subjectExternalValues at the given index. */ - public java.lang.String getSubjectValues(int index) { - return subjectValues_.get(index); + public java.lang.String getSubjectExternalValues(int index) { + return subjectExternalValues_.get(index); } /** *
    -   * The list of comparison values for a resource's <attribute> value
    +   * list of comparison values for the subject_external_field
        * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; * @param index The index of the value to return. - * @return The bytes of the subjectValues at the given index. + * @return The bytes of the subjectExternalValues at the given index. */ public com.google.protobuf.ByteString - getSubjectValuesBytes(int index) { - return subjectValues_.getByteString(index); + getSubjectExternalValuesBytes(int index) { + return subjectExternalValues_.getByteString(index); } private byte memoizedIsInitialized = -1; @@ -202,14 +202,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectAttribute_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subjectAttribute_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectExternalField_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, subjectExternalField_); } if (operator_ != io.opentdf.platform.policy.subjectmapping.SubjectMappingOperatorEnum.SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED.getNumber()) { output.writeEnum(2, operator_); } - for (int i = 0; i < subjectValues_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subjectValues_.getRaw(i)); + for (int i = 0; i < subjectExternalValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subjectExternalValues_.getRaw(i)); } getUnknownFields().writeTo(output); } @@ -220,8 +220,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectAttribute_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subjectAttribute_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectExternalField_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, subjectExternalField_); } if (operator_ != io.opentdf.platform.policy.subjectmapping.SubjectMappingOperatorEnum.SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream @@ -229,11 +229,11 @@ public int getSerializedSize() { } { int dataSize = 0; - for (int i = 0; i < subjectValues_.size(); i++) { - dataSize += computeStringSizeNoTag(subjectValues_.getRaw(i)); + for (int i = 0; i < subjectExternalValues_.size(); i++) { + dataSize += computeStringSizeNoTag(subjectExternalValues_.getRaw(i)); } size += dataSize; - size += 1 * getSubjectValuesList().size(); + size += 1 * getSubjectExternalValuesList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -250,11 +250,11 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.Condition other = (io.opentdf.platform.policy.subjectmapping.Condition) obj; - if (!getSubjectAttribute() - .equals(other.getSubjectAttribute())) return false; + if (!getSubjectExternalField() + .equals(other.getSubjectExternalField())) return false; if (operator_ != other.operator_) return false; - if (!getSubjectValuesList() - .equals(other.getSubjectValuesList())) return false; + if (!getSubjectExternalValuesList() + .equals(other.getSubjectExternalValuesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -266,13 +266,13 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SUBJECT_ATTRIBUTE_FIELD_NUMBER; - hash = (53 * hash) + getSubjectAttribute().hashCode(); + hash = (37 * hash) + SUBJECT_EXTERNAL_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getSubjectExternalField().hashCode(); hash = (37 * hash) + OPERATOR_FIELD_NUMBER; hash = (53 * hash) + operator_; - if (getSubjectValuesCount() > 0) { - hash = (37 * hash) + SUBJECT_VALUES_FIELD_NUMBER; - hash = (53 * hash) + getSubjectValuesList().hashCode(); + if (getSubjectExternalValuesCount() > 0) { + hash = (37 * hash) + SUBJECT_EXTERNAL_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getSubjectExternalValuesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -374,20 +374,20 @@ protected Builder newBuilderForType( /** *
        **
    -   *A Condition defines a rule of <subject attribute> <operator> <subject values>
    +   *A Condition defines a rule of <subject external field name> <operator> <subject external values>
        *
    -   *Example:  Match Subjects with an attribute "division" with a value of "Accounting" or "Marketing":
    +   *Example:  Match Subjects with field "division" and a value of "Accounting" or "Marketing":
        *{
    -   *"subject_attribute": "division",
    +   *"subject_external_field": "division",
        *"operator": "IN",
    -   *"subject_values" : ["Accounting", "Marketing"]
    +   *"subject_external_values" : ["Accounting", "Marketing"]
        *}
        *
    -   *Example: Match a subject by preferred username:
    +   *Example: Match a subject by ensuring they are not part of the Fantastic Four:
        *{
    -   *"subject_attribute": "preferredUsername",
    -   *"operator": "IN",
    -   *"subject_values" : ["alice@example.org"]
    +   *"subject_external_field": "superhero_name",
    +   *"operator": "NOT_IN",
    +   *"subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"]
        *}
        * 
    * @@ -424,9 +424,9 @@ private Builder( public Builder clear() { super.clear(); bitField0_ = 0; - subjectAttribute_ = ""; + subjectExternalField_ = ""; operator_ = 0; - subjectValues_ = + subjectExternalValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -462,14 +462,14 @@ public io.opentdf.platform.policy.subjectmapping.Condition buildPartial() { private void buildPartial0(io.opentdf.platform.policy.subjectmapping.Condition result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectAttribute_ = subjectAttribute_; + result.subjectExternalField_ = subjectExternalField_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.operator_ = operator_; } if (((from_bitField0_ & 0x00000004) != 0)) { - subjectValues_.makeImmutable(); - result.subjectValues_ = subjectValues_; + subjectExternalValues_.makeImmutable(); + result.subjectExternalValues_ = subjectExternalValues_; } } @@ -517,21 +517,21 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.Condition other) { if (other == io.opentdf.platform.policy.subjectmapping.Condition.getDefaultInstance()) return this; - if (!other.getSubjectAttribute().isEmpty()) { - subjectAttribute_ = other.subjectAttribute_; + if (!other.getSubjectExternalField().isEmpty()) { + subjectExternalField_ = other.subjectExternalField_; bitField0_ |= 0x00000001; onChanged(); } if (other.operator_ != 0) { setOperatorValue(other.getOperatorValue()); } - if (!other.subjectValues_.isEmpty()) { - if (subjectValues_.isEmpty()) { - subjectValues_ = other.subjectValues_; + if (!other.subjectExternalValues_.isEmpty()) { + if (subjectExternalValues_.isEmpty()) { + subjectExternalValues_ = other.subjectExternalValues_; bitField0_ |= 0x00000004; } else { - ensureSubjectValuesIsMutable(); - subjectValues_.addAll(other.subjectValues_); + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.addAll(other.subjectExternalValues_); } onChanged(); } @@ -562,7 +562,7 @@ public Builder mergeFrom( done = true; break; case 10: { - subjectAttribute_ = input.readStringRequireUtf8(); + subjectExternalField_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -573,8 +573,8 @@ public Builder mergeFrom( } // case 16 case 26: { java.lang.String s = input.readStringRequireUtf8(); - ensureSubjectValuesIsMutable(); - subjectValues_.add(s); + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.add(s); break; } // case 26 default: { @@ -594,22 +594,22 @@ public Builder mergeFrom( } private int bitField0_; - private java.lang.Object subjectAttribute_ = ""; + private java.lang.Object subjectExternalField_ = ""; /** *
    -     * Resource Attribute Key; NOT Attribute Definition Attribute name
    +     * externally known field name (such as from idP/LDAP)
          * 
    * - * string subject_attribute = 1 [json_name = "subjectAttribute"]; - * @return The subjectAttribute. + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The subjectExternalField. */ - public java.lang.String getSubjectAttribute() { - java.lang.Object ref = subjectAttribute_; + public java.lang.String getSubjectExternalField() { + java.lang.Object ref = subjectExternalField_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - subjectAttribute_ = s; + subjectExternalField_ = s; return s; } else { return (java.lang.String) ref; @@ -617,20 +617,20 @@ public java.lang.String getSubjectAttribute() { } /** *
    -     * Resource Attribute Key; NOT Attribute Definition Attribute name
    +     * externally known field name (such as from idP/LDAP)
          * 
    * - * string subject_attribute = 1 [json_name = "subjectAttribute"]; - * @return The bytes for subjectAttribute. + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The bytes for subjectExternalField. */ public com.google.protobuf.ByteString - getSubjectAttributeBytes() { - java.lang.Object ref = subjectAttribute_; + getSubjectExternalFieldBytes() { + java.lang.Object ref = subjectExternalField_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - subjectAttribute_ = b; + subjectExternalField_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -638,49 +638,49 @@ public java.lang.String getSubjectAttribute() { } /** *
    -     * Resource Attribute Key; NOT Attribute Definition Attribute name
    +     * externally known field name (such as from idP/LDAP)
          * 
    * - * string subject_attribute = 1 [json_name = "subjectAttribute"]; - * @param value The subjectAttribute to set. + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @param value The subjectExternalField to set. * @return This builder for chaining. */ - public Builder setSubjectAttribute( + public Builder setSubjectExternalField( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - subjectAttribute_ = value; + subjectExternalField_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
    -     * Resource Attribute Key; NOT Attribute Definition Attribute name
    +     * externally known field name (such as from idP/LDAP)
          * 
    * - * string subject_attribute = 1 [json_name = "subjectAttribute"]; + * string subject_external_field = 1 [json_name = "subjectExternalField"]; * @return This builder for chaining. */ - public Builder clearSubjectAttribute() { - subjectAttribute_ = getDefaultInstance().getSubjectAttribute(); + public Builder clearSubjectExternalField() { + subjectExternalField_ = getDefaultInstance().getSubjectExternalField(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
    -     * Resource Attribute Key; NOT Attribute Definition Attribute name
    +     * externally known field name (such as from idP/LDAP)
          * 
    * - * string subject_attribute = 1 [json_name = "subjectAttribute"]; - * @param value The bytes for subjectAttribute to set. + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @param value The bytes for subjectExternalField to set. * @return This builder for chaining. */ - public Builder setSubjectAttributeBytes( + public Builder setSubjectExternalFieldBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - subjectAttribute_ = value; + subjectExternalField_ = value; bitField0_ |= 0x00000001; onChanged(); return this; @@ -759,128 +759,128 @@ public Builder clearOperator() { return this; } - private com.google.protobuf.LazyStringArrayList subjectValues_ = + private com.google.protobuf.LazyStringArrayList subjectExternalValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureSubjectValuesIsMutable() { - if (!subjectValues_.isModifiable()) { - subjectValues_ = new com.google.protobuf.LazyStringArrayList(subjectValues_); + private void ensureSubjectExternalValuesIsMutable() { + if (!subjectExternalValues_.isModifiable()) { + subjectExternalValues_ = new com.google.protobuf.LazyStringArrayList(subjectExternalValues_); } bitField0_ |= 0x00000004; } /** *
    -     * The list of comparison values for a resource's <attribute> value
    +     * list of comparison values for the subject_external_field
          * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; - * @return A list containing the subjectValues. + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return A list containing the subjectExternalValues. */ public com.google.protobuf.ProtocolStringList - getSubjectValuesList() { - subjectValues_.makeImmutable(); - return subjectValues_; + getSubjectExternalValuesList() { + subjectExternalValues_.makeImmutable(); + return subjectExternalValues_; } /** *
    -     * The list of comparison values for a resource's <attribute> value
    +     * list of comparison values for the subject_external_field
          * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; - * @return The count of subjectValues. + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return The count of subjectExternalValues. */ - public int getSubjectValuesCount() { - return subjectValues_.size(); + public int getSubjectExternalValuesCount() { + return subjectExternalValues_.size(); } /** *
    -     * The list of comparison values for a resource's <attribute> value
    +     * list of comparison values for the subject_external_field
          * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; * @param index The index of the element to return. - * @return The subjectValues at the given index. + * @return The subjectExternalValues at the given index. */ - public java.lang.String getSubjectValues(int index) { - return subjectValues_.get(index); + public java.lang.String getSubjectExternalValues(int index) { + return subjectExternalValues_.get(index); } /** *
    -     * The list of comparison values for a resource's <attribute> value
    +     * list of comparison values for the subject_external_field
          * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; * @param index The index of the value to return. - * @return The bytes of the subjectValues at the given index. + * @return The bytes of the subjectExternalValues at the given index. */ public com.google.protobuf.ByteString - getSubjectValuesBytes(int index) { - return subjectValues_.getByteString(index); + getSubjectExternalValuesBytes(int index) { + return subjectExternalValues_.getByteString(index); } /** *
    -     * The list of comparison values for a resource's <attribute> value
    +     * list of comparison values for the subject_external_field
          * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; * @param index The index to set the value at. - * @param value The subjectValues to set. + * @param value The subjectExternalValues to set. * @return This builder for chaining. */ - public Builder setSubjectValues( + public Builder setSubjectExternalValues( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureSubjectValuesIsMutable(); - subjectValues_.set(index, value); + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.set(index, value); bitField0_ |= 0x00000004; onChanged(); return this; } /** *
    -     * The list of comparison values for a resource's <attribute> value
    +     * list of comparison values for the subject_external_field
          * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; - * @param value The subjectValues to add. + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param value The subjectExternalValues to add. * @return This builder for chaining. */ - public Builder addSubjectValues( + public Builder addSubjectExternalValues( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureSubjectValuesIsMutable(); - subjectValues_.add(value); + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; } /** *
    -     * The list of comparison values for a resource's <attribute> value
    +     * list of comparison values for the subject_external_field
          * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; - * @param values The subjectValues to add. + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param values The subjectExternalValues to add. * @return This builder for chaining. */ - public Builder addAllSubjectValues( + public Builder addAllSubjectExternalValues( java.lang.Iterable values) { - ensureSubjectValuesIsMutable(); + ensureSubjectExternalValuesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectValues_); + values, subjectExternalValues_); bitField0_ |= 0x00000004; onChanged(); return this; } /** *
    -     * The list of comparison values for a resource's <attribute> value
    +     * list of comparison values for the subject_external_field
          * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; * @return This builder for chaining. */ - public Builder clearSubjectValues() { - subjectValues_ = + public Builder clearSubjectExternalValues() { + subjectExternalValues_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000004);; onChanged(); @@ -888,19 +888,19 @@ public Builder clearSubjectValues() { } /** *
    -     * The list of comparison values for a resource's <attribute> value
    +     * list of comparison values for the subject_external_field
          * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; - * @param value The bytes of the subjectValues to add. + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @param value The bytes of the subjectExternalValues to add. * @return This builder for chaining. */ - public Builder addSubjectValuesBytes( + public Builder addSubjectExternalValuesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureSubjectValuesIsMutable(); - subjectValues_.add(value); + ensureSubjectExternalValuesIsMutable(); + subjectExternalValues_.add(value); bitField0_ |= 0x00000004; onChanged(); return this; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionOrBuilder.java index bcf2de3290..231e757400 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionOrBuilder.java @@ -10,23 +10,23 @@ public interface ConditionOrBuilder extends /** *
    -   * Resource Attribute Key; NOT Attribute Definition Attribute name
    +   * externally known field name (such as from idP/LDAP)
        * 
    * - * string subject_attribute = 1 [json_name = "subjectAttribute"]; - * @return The subjectAttribute. + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The subjectExternalField. */ - java.lang.String getSubjectAttribute(); + java.lang.String getSubjectExternalField(); /** *
    -   * Resource Attribute Key; NOT Attribute Definition Attribute name
    +   * externally known field name (such as from idP/LDAP)
        * 
    * - * string subject_attribute = 1 [json_name = "subjectAttribute"]; - * @return The bytes for subjectAttribute. + * string subject_external_field = 1 [json_name = "subjectExternalField"]; + * @return The bytes for subjectExternalField. */ com.google.protobuf.ByteString - getSubjectAttributeBytes(); + getSubjectExternalFieldBytes(); /** *
    @@ -49,42 +49,42 @@ public interface ConditionOrBuilder extends
     
       /**
        * 
    -   * The list of comparison values for a resource's <attribute> value
    +   * list of comparison values for the subject_external_field
        * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; - * @return A list containing the subjectValues. + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return A list containing the subjectExternalValues. */ java.util.List - getSubjectValuesList(); + getSubjectExternalValuesList(); /** *
    -   * The list of comparison values for a resource's <attribute> value
    +   * list of comparison values for the subject_external_field
        * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; - * @return The count of subjectValues. + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; + * @return The count of subjectExternalValues. */ - int getSubjectValuesCount(); + int getSubjectExternalValuesCount(); /** *
    -   * The list of comparison values for a resource's <attribute> value
    +   * list of comparison values for the subject_external_field
        * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; * @param index The index of the element to return. - * @return The subjectValues at the given index. + * @return The subjectExternalValues at the given index. */ - java.lang.String getSubjectValues(int index); + java.lang.String getSubjectExternalValues(int index); /** *
    -   * The list of comparison values for a resource's <attribute> value
    +   * list of comparison values for the subject_external_field
        * 
    * - * repeated string subject_values = 3 [json_name = "subjectValues"]; + * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; * @param index The index of the value to return. - * @return The bytes of the subjectValues at the given index. + * @return The bytes of the subjectExternalValues at the given index. */ com.google.protobuf.ByteString - getSubjectValuesBytes(int index); + getSubjectExternalValuesBytes(int index); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetRequest.java deleted file mode 100644 index e3fcd65624..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetRequest.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.CreateSubjectSetRequest} - */ -public final class CreateSubjectSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectSetRequest) - CreateSubjectSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateSubjectSetRequest.newBuilder() to construct. - private CreateSubjectSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateSubjectSetRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateSubjectSetRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate subjectSet_; - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return Whether the subjectSet field is set. - */ - @java.lang.Override - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return The subjectSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate getSubjectSet() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance() : subjectSet_; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder getSubjectSetOrBuilder() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance() : subjectSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest) obj; - - if (hasSubjectSet() != other.hasSubjectSet()) return false; - if (hasSubjectSet()) { - if (!getSubjectSet() - .equals(other.getSubjectSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectSet()) { - hash = (37 * hash) + SUBJECT_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.CreateSubjectSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectSetRequest) - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest build() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectSet_ = subjectSetBuilder_ == null - ? subjectSet_ - : subjectSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest.getDefaultInstance()) return this; - if (other.hasSubjectSet()) { - mergeSubjectSet(other.getSubjectSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate subjectSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder> subjectSetBuilder_; - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return Whether the subjectSet field is set. - */ - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return The subjectSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate getSubjectSet() { - if (subjectSetBuilder_ == null) { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance() : subjectSet_; - } else { - return subjectSetBuilder_.getMessage(); - } - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public Builder setSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate value) { - if (subjectSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectSet_ = value; - } else { - subjectSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public Builder setSubjectSet( - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder builderForValue) { - if (subjectSetBuilder_ == null) { - subjectSet_ = builderForValue.build(); - } else { - subjectSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public Builder mergeSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate value) { - if (subjectSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectSet_ != null && - subjectSet_ != io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance()) { - getSubjectSetBuilder().mergeFrom(value); - } else { - subjectSet_ = value; - } - } else { - subjectSetBuilder_.mergeFrom(value); - } - if (subjectSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public Builder clearSubjectSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder getSubjectSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder getSubjectSetOrBuilder() { - if (subjectSetBuilder_ != null) { - return subjectSetBuilder_.getMessageOrBuilder(); - } else { - return subjectSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance() : subjectSet_; - } - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder> - getSubjectSetFieldBuilder() { - if (subjectSetBuilder_ == null) { - subjectSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder>( - getSubjectSet(), - getParentForChildren(), - isClean()); - subjectSet_ = null; - } - return subjectSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectSetRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectSetRequest) - private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateSubjectSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetRequestOrBuilder.java deleted file mode 100644 index 53409dbf58..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetRequestOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface CreateSubjectSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return Whether the subjectSet field is set. - */ - boolean hasSubjectSet(); - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return The subjectSet. - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate getSubjectSet(); - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 1 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder getSubjectSetOrBuilder(); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetResponse.java deleted file mode 100644 index a31eac6c67..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.CreateSubjectSetResponse} - */ -public final class CreateSubjectSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectSetResponse) - CreateSubjectSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use CreateSubjectSetResponse.newBuilder() to construct. - private CreateSubjectSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private CreateSubjectSetResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new CreateSubjectSetResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectSet subjectSet_; - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - @java.lang.Override - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse) obj; - - if (hasSubjectSet() != other.hasSubjectSet()) return false; - if (hasSubjectSet()) { - if (!getSubjectSet() - .equals(other.getSubjectSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectSet()) { - hash = (37 * hash) + SUBJECT_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.CreateSubjectSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectSetResponse) - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectSetResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse build() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectSet_ = subjectSetBuilder_ == null - ? subjectSet_ - : subjectSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectSet()) { - mergeSubjectSet(other.getSubjectSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.subjectmapping.SubjectSet subjectSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> subjectSetBuilder_; - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet() { - if (subjectSetBuilder_ == null) { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } else { - return subjectSetBuilder_.getMessage(); - } - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder setSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectSet_ = value; - } else { - subjectSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder setSubjectSet( - io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetBuilder_ == null) { - subjectSet_ = builderForValue.build(); - } else { - subjectSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder mergeSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectSet_ != null && - subjectSet_ != io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()) { - getSubjectSetBuilder().mergeFrom(value); - } else { - subjectSet_ = value; - } - } else { - subjectSetBuilder_.mergeFrom(value); - } - if (subjectSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder clearSubjectSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder() { - if (subjectSetBuilder_ != null) { - return subjectSetBuilder_.getMessageOrBuilder(); - } else { - return subjectSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> - getSubjectSetFieldBuilder() { - if (subjectSetBuilder_ == null) { - subjectSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( - getSubjectSet(), - getParentForChildren(), - isClean()); - subjectSet_ = null; - } - return subjectSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.CreateSubjectSetResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectSetResponse) - private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateSubjectSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetResponseOrBuilder.java deleted file mode 100644 index a9340dcc22..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectSetResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface CreateSubjectSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - boolean hasSubjectSet(); - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet(); - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder(); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetRequest.java deleted file mode 100644 index 1e3ca81f46..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectSetRequest} - */ -public final class DeleteSubjectSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectSetRequest) - DeleteSubjectSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteSubjectSetRequest.newBuilder() to construct. - private DeleteSubjectSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteSubjectSetRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteSubjectSetRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectSetRequest) - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest build() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectSetRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectSetRequest) - private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteSubjectSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetRequestOrBuilder.java deleted file mode 100644 index 9089d7464b..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface DeleteSubjectSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetResponse.java deleted file mode 100644 index 7fe2d17915..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectSetResponse} - */ -public final class DeleteSubjectSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectSetResponse) - DeleteSubjectSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use DeleteSubjectSetResponse.newBuilder() to construct. - private DeleteSubjectSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private DeleteSubjectSetResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new DeleteSubjectSetResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectSet subjectSet_; - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - @java.lang.Override - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse) obj; - - if (hasSubjectSet() != other.hasSubjectSet()) return false; - if (hasSubjectSet()) { - if (!getSubjectSet() - .equals(other.getSubjectSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectSet()) { - hash = (37 * hash) + SUBJECT_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.DeleteSubjectSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectSetResponse) - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectSetResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse build() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectSet_ = subjectSetBuilder_ == null - ? subjectSet_ - : subjectSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectSet()) { - mergeSubjectSet(other.getSubjectSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.subjectmapping.SubjectSet subjectSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> subjectSetBuilder_; - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet() { - if (subjectSetBuilder_ == null) { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } else { - return subjectSetBuilder_.getMessage(); - } - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder setSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectSet_ = value; - } else { - subjectSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder setSubjectSet( - io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetBuilder_ == null) { - subjectSet_ = builderForValue.build(); - } else { - subjectSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder mergeSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectSet_ != null && - subjectSet_ != io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()) { - getSubjectSetBuilder().mergeFrom(value); - } else { - subjectSet_ = value; - } - } else { - subjectSetBuilder_.mergeFrom(value); - } - if (subjectSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder clearSubjectSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder() { - if (subjectSetBuilder_ != null) { - return subjectSetBuilder_.getMessageOrBuilder(); - } else { - return subjectSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> - getSubjectSetFieldBuilder() { - if (subjectSetBuilder_ == null) { - subjectSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( - getSubjectSet(), - getParentForChildren(), - isClean()); - subjectSet_ = null; - } - return subjectSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.DeleteSubjectSetResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectSetResponse) - private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteSubjectSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetResponseOrBuilder.java deleted file mode 100644 index 30bf21f093..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectSetResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface DeleteSubjectSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - boolean hasSubjectSet(); - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet(); - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder(); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetRequest.java deleted file mode 100644 index cf66183c19..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetRequest.java +++ /dev/null @@ -1,542 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.GetSubjectSetRequest} - */ -public final class GetSubjectSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectSetRequest) - GetSubjectSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetSubjectSetRequest.newBuilder() to construct. - private GetSubjectSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetSubjectSetRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetSubjectSetRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest.Builder.class); - } - - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest other = (io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.GetSubjectSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectSetRequest) - io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest build() { - io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest result = new io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectSetRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectSetRequest) - private static final io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSubjectSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetRequestOrBuilder.java deleted file mode 100644 index bf206a8fd1..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetRequestOrBuilder.java +++ /dev/null @@ -1,22 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface GetSubjectSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetResponse.java deleted file mode 100644 index 3b29d0fc1a..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.GetSubjectSetResponse} - */ -public final class GetSubjectSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectSetResponse) - GetSubjectSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use GetSubjectSetResponse.newBuilder() to construct. - private GetSubjectSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private GetSubjectSetResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new GetSubjectSetResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectSet subjectSet_; - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - @java.lang.Override - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse other = (io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse) obj; - - if (hasSubjectSet() != other.hasSubjectSet()) return false; - if (hasSubjectSet()) { - if (!getSubjectSet() - .equals(other.getSubjectSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectSet()) { - hash = (37 * hash) + SUBJECT_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.GetSubjectSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectSetResponse) - io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectSetResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse build() { - io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse result = new io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectSet_ = subjectSetBuilder_ == null - ? subjectSet_ - : subjectSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectSet()) { - mergeSubjectSet(other.getSubjectSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.subjectmapping.SubjectSet subjectSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> subjectSetBuilder_; - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet() { - if (subjectSetBuilder_ == null) { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } else { - return subjectSetBuilder_.getMessage(); - } - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder setSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectSet_ = value; - } else { - subjectSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder setSubjectSet( - io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetBuilder_ == null) { - subjectSet_ = builderForValue.build(); - } else { - subjectSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder mergeSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectSet_ != null && - subjectSet_ != io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()) { - getSubjectSetBuilder().mergeFrom(value); - } else { - subjectSet_ = value; - } - } else { - subjectSetBuilder_.mergeFrom(value); - } - if (subjectSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder clearSubjectSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder() { - if (subjectSetBuilder_ != null) { - return subjectSetBuilder_.getMessageOrBuilder(); - } else { - return subjectSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> - getSubjectSetFieldBuilder() { - if (subjectSetBuilder_ == null) { - subjectSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( - getSubjectSet(), - getParentForChildren(), - isClean()); - subjectSet_ = null; - } - return subjectSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.GetSubjectSetResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectSetResponse) - private static final io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSubjectSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetResponseOrBuilder.java deleted file mode 100644 index 2688c68bcc..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectSetResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface GetSubjectSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - boolean hasSubjectSet(); - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet(); - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder(); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsRequest.java deleted file mode 100644 index 660d695727..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsRequest.java +++ /dev/null @@ -1,399 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.ListSubjectSetsRequest} - */ -public final class ListSubjectSetsRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectSetsRequest) - ListSubjectSetsRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListSubjectSetsRequest.newBuilder() to construct. - private ListSubjectSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListSubjectSetsRequest() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListSubjectSetsRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest.Builder.class); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest other = (io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest) obj; - - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.ListSubjectSetsRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectSetsRequest) - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest build() { - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest result = new io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest(this); - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest.getDefaultInstance()) return this; - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectSetsRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectSetsRequest) - private static final io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListSubjectSetsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsRequestOrBuilder.java deleted file mode 100644 index b581d4a0b2..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsRequestOrBuilder.java +++ /dev/null @@ -1,10 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface ListSubjectSetsRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectSetsRequest) - com.google.protobuf.MessageOrBuilder { -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsResponse.java deleted file mode 100644 index 57612062a6..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsResponse.java +++ /dev/null @@ -1,760 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.ListSubjectSetsResponse} - */ -public final class ListSubjectSetsResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectSetsResponse) - ListSubjectSetsResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use ListSubjectSetsResponse.newBuilder() to construct. - private ListSubjectSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ListSubjectSetsResponse() { - subjectSets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ListSubjectSetsResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse.Builder.class); - } - - public static final int SUBJECT_SETS_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private java.util.List subjectSets_; - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - @java.lang.Override - public java.util.List getSubjectSetsList() { - return subjectSets_; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - @java.lang.Override - public java.util.List - getSubjectSetsOrBuilderList() { - return subjectSets_; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - @java.lang.Override - public int getSubjectSetsCount() { - return subjectSets_.size(); - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { - return subjectSets_.get(index); - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index) { - return subjectSets_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < subjectSets_.size(); i++) { - output.writeMessage(1, subjectSets_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < subjectSets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, subjectSets_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse other = (io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse) obj; - - if (!getSubjectSetsList() - .equals(other.getSubjectSetsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getSubjectSetsCount() > 0) { - hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSetsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.ListSubjectSetsResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectSetsResponse) - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse.newBuilder() - private Builder() { - - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); - } else { - subjectSets_ = null; - subjectSetsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectSetsResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse build() { - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse result = new io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse result) { - if (subjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.subjectSets_ = subjectSets_; - } else { - result.subjectSets_ = subjectSetsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse result) { - int from_bitField0_ = bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse.getDefaultInstance()) return this; - if (subjectSetsBuilder_ == null) { - if (!other.subjectSets_.isEmpty()) { - if (subjectSets_.isEmpty()) { - subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSubjectSetsIsMutable(); - subjectSets_.addAll(other.subjectSets_); - } - onChanged(); - } - } else { - if (!other.subjectSets_.isEmpty()) { - if (subjectSetsBuilder_.isEmpty()) { - subjectSetsBuilder_.dispose(); - subjectSetsBuilder_ = null; - subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000001); - subjectSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectSetsFieldBuilder() : null; - } else { - subjectSetsBuilder_.addAllMessages(other.subjectSets_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.opentdf.platform.policy.subjectmapping.SubjectSet m = - input.readMessage( - io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), - extensionRegistry); - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(m); - } else { - subjectSetsBuilder_.addMessage(m); - } - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.util.List subjectSets_ = - java.util.Collections.emptyList(); - private void ensureSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - subjectSets_ = new java.util.ArrayList(subjectSets_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> subjectSetsBuilder_; - - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public java.util.List getSubjectSetsList() { - if (subjectSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectSets_); - } else { - return subjectSetsBuilder_.getMessageList(); - } - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public int getSubjectSetsCount() { - if (subjectSetsBuilder_ == null) { - return subjectSets_.size(); - } else { - return subjectSetsBuilder_.getCount(); - } - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); - } else { - return subjectSetsBuilder_.getMessage(index); - } - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, value); - onChanged(); - } else { - subjectSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.add(value); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, value); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public Builder addSubjectSets( - io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, builderForValue.build()); - onChanged(); - } else { - subjectSetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public Builder addAllSubjectSets( - java.lang.Iterable values) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectSets_); - onChanged(); - } else { - subjectSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public Builder clearSubjectSets() { - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - subjectSetsBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public Builder removeSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.remove(index); - onChanged(); - } else { - subjectSetsBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetsBuilder( - int index) { - return getSubjectSetsFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); } else { - return subjectSetsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public java.util.List - getSubjectSetsOrBuilderList() { - if (subjectSetsBuilder_ != null) { - return subjectSetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subjectSets_); - } - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder() { - return getSubjectSetsFieldBuilder().addBuilder( - io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder( - int index) { - return getSubjectSetsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); - } - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - public java.util.List - getSubjectSetsBuilderList() { - return getSubjectSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> - getSubjectSetsFieldBuilder() { - if (subjectSetsBuilder_ == null) { - subjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( - subjectSets_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - subjectSets_ = null; - } - return subjectSetsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.ListSubjectSetsResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectSetsResponse) - private static final io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListSubjectSetsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsResponseOrBuilder.java deleted file mode 100644 index 89d5f50659..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectSetsResponseOrBuilder.java +++ /dev/null @@ -1,34 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface ListSubjectSetsResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectSetsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - java.util.List - getSubjectSetsList(); - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index); - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - int getSubjectSetsCount(); - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - java.util.List - getSubjectSetsOrBuilderList(); - /** - * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( - int index); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMapping.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMapping.java index 92c7d4aa97..82eadc33fa 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMapping.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMapping.java @@ -15,7 +15,7 @@ *"id": "someid", *"attribute_value": {example_one_attribute_value...}, *"subject_sets": [{subject_set_1},{subject_set_2}] - *"actions": ["TRANSMIT", "DECRYPT"] + *"actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] *} *
    * @@ -99,10 +99,6 @@ public java.lang.String getId() { public static final int METADATA_FIELD_NUMBER = 2; private io.opentdf.platform.common.Metadata metadata_; /** - *
    -   *TODO should this be a list of values?
    -   * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; * @return Whether the metadata field is set. */ @@ -111,10 +107,6 @@ public boolean hasMetadata() { return ((bitField0_ & 0x00000001) != 0); } /** - *
    -   *TODO should this be a list of values?
    -   * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; * @return The metadata. */ @@ -123,10 +115,6 @@ public io.opentdf.platform.common.Metadata getMetadata() { return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; } /** - *
    -   *TODO should this be a list of values?
    -   * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; */ @java.lang.Override @@ -519,7 +507,7 @@ protected Builder newBuilderForType( *"id": "someid", *"attribute_value": {example_one_attribute_value...}, *"subject_sets": [{subject_set_1},{subject_set_2}] - *"actions": ["TRANSMIT", "DECRYPT"] + *"actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] *} * * @@ -935,10 +923,6 @@ public Builder setIdBytes( private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; /** - *
    -     *TODO should this be a list of values?
    -     * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; * @return Whether the metadata field is set. */ @@ -946,10 +930,6 @@ public boolean hasMetadata() { return ((bitField0_ & 0x00000002) != 0); } /** - *
    -     *TODO should this be a list of values?
    -     * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; * @return The metadata. */ @@ -961,10 +941,6 @@ public io.opentdf.platform.common.Metadata getMetadata() { } } /** - *
    -     *TODO should this be a list of values?
    -     * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; */ public Builder setMetadata(io.opentdf.platform.common.Metadata value) { @@ -981,10 +957,6 @@ public Builder setMetadata(io.opentdf.platform.common.Metadata value) { return this; } /** - *
    -     *TODO should this be a list of values?
    -     * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; */ public Builder setMetadata( @@ -999,10 +971,6 @@ public Builder setMetadata( return this; } /** - *
    -     *TODO should this be a list of values?
    -     * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; */ public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { @@ -1024,10 +992,6 @@ public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { return this; } /** - *
    -     *TODO should this be a list of values?
    -     * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; */ public Builder clearMetadata() { @@ -1041,10 +1005,6 @@ public Builder clearMetadata() { return this; } /** - *
    -     *TODO should this be a list of values?
    -     * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; */ public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { @@ -1053,10 +1013,6 @@ public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { return getMetadataFieldBuilder().getBuilder(); } /** - *
    -     *TODO should this be a list of values?
    -     * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; */ public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { @@ -1068,10 +1024,6 @@ public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { } } /** - *
    -     *TODO should this be a list of values?
    -     * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdate.java index b6ed0d6143..312e81bb2b 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdate.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdate.java @@ -18,8 +18,7 @@ private SubjectMappingCreateUpdate(com.google.protobuf.GeneratedMessageV3.Builde } private SubjectMappingCreateUpdate() { attributeValueId_ = ""; - subjectSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + subjectSets_ = java.util.Collections.emptyList(); actions_ = java.util.Collections.emptyList(); } @@ -117,57 +116,65 @@ public java.lang.String getAttributeValueId() { } } - public static final int SUBJECT_SET_IDS_FIELD_NUMBER = 3; + public static final int SUBJECT_SETS_FIELD_NUMBER = 3; @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList subjectSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + private java.util.List subjectSets_; /** *
    -   * the subjects sets in this mapping
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
        * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @return A list containing the subjectSetIds. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public com.google.protobuf.ProtocolStringList - getSubjectSetIdsList() { - return subjectSetIds_; + @java.lang.Override + public java.util.List getSubjectSetsList() { + return subjectSets_; } /** *
    -   * the subjects sets in this mapping
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
        * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @return The count of subjectSetIds. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public int getSubjectSetIdsCount() { - return subjectSetIds_.size(); + @java.lang.Override + public java.util.List + getSubjectSetsOrBuilderList() { + return subjectSets_; } /** *
    -   * the subjects sets in this mapping
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
        * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param index The index of the element to return. - * @return The subjectSetIds at the given index. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public java.lang.String getSubjectSetIds(int index) { - return subjectSetIds_.get(index); + @java.lang.Override + public int getSubjectSetsCount() { + return subjectSets_.size(); } /** *
    -   * the subjects sets in this mapping
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
        * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param index The index of the value to return. - * @return The bytes of the subjectSetIds at the given index. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public com.google.protobuf.ByteString - getSubjectSetIdsBytes(int index) { - return subjectSetIds_.getByteString(index); + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { + return subjectSets_.get(index); + } + /** + *
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index) { + return subjectSets_.get(index); } public static final int ACTIONS_FIELD_NUMBER = 4; @@ -251,8 +258,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeValueId_); } - for (int i = 0; i < subjectSetIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, subjectSetIds_.getRaw(i)); + for (int i = 0; i < subjectSets_.size(); i++) { + output.writeMessage(3, subjectSets_.get(i)); } for (int i = 0; i < actions_.size(); i++) { output.writeMessage(4, actions_.get(i)); @@ -273,13 +280,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attributeValueId_); } - { - int dataSize = 0; - for (int i = 0; i < subjectSetIds_.size(); i++) { - dataSize += computeStringSizeNoTag(subjectSetIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getSubjectSetIdsList().size(); + for (int i = 0; i < subjectSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, subjectSets_.get(i)); } for (int i = 0; i < actions_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -307,8 +310,8 @@ public boolean equals(final java.lang.Object obj) { } if (!getAttributeValueId() .equals(other.getAttributeValueId())) return false; - if (!getSubjectSetIdsList() - .equals(other.getSubjectSetIdsList())) return false; + if (!getSubjectSetsList() + .equals(other.getSubjectSetsList())) return false; if (!getActionsList() .equals(other.getActionsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -328,9 +331,9 @@ public int hashCode() { } hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; hash = (53 * hash) + getAttributeValueId().hashCode(); - if (getSubjectSetIdsCount() > 0) { - hash = (37 * hash) + SUBJECT_SET_IDS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSetIdsList().hashCode(); + if (getSubjectSetsCount() > 0) { + hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectSetsList().hashCode(); } if (getActionsCount() > 0) { hash = (37 * hash) + ACTIONS_FIELD_NUMBER; @@ -467,6 +470,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getMetadataFieldBuilder(); + getSubjectSetsFieldBuilder(); getActionsFieldBuilder(); } } @@ -480,8 +484,13 @@ public Builder clear() { metadataBuilder_ = null; } attributeValueId_ = ""; - subjectSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + } else { + subjectSets_ = null; + subjectSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); if (actionsBuilder_ == null) { actions_ = java.util.Collections.emptyList(); } else { @@ -522,6 +531,15 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate buil } private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate result) { + if (subjectSetsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.subjectSets_ = subjectSets_; + } else { + result.subjectSets_ = subjectSetsBuilder_.build(); + } if (actionsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { actions_ = java.util.Collections.unmodifiableList(actions_); @@ -545,10 +563,6 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMapp if (((from_bitField0_ & 0x00000002) != 0)) { result.attributeValueId_ = attributeValueId_; } - if (((from_bitField0_ & 0x00000004) != 0)) { - subjectSetIds_.makeImmutable(); - result.subjectSetIds_ = subjectSetIds_; - } result.bitField0_ |= to_bitField0_; } @@ -604,15 +618,31 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappin bitField0_ |= 0x00000002; onChanged(); } - if (!other.subjectSetIds_.isEmpty()) { - if (subjectSetIds_.isEmpty()) { - subjectSetIds_ = other.subjectSetIds_; - bitField0_ |= 0x00000004; - } else { - ensureSubjectSetIdsIsMutable(); - subjectSetIds_.addAll(other.subjectSetIds_); + if (subjectSetsBuilder_ == null) { + if (!other.subjectSets_.isEmpty()) { + if (subjectSets_.isEmpty()) { + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSubjectSetsIsMutable(); + subjectSets_.addAll(other.subjectSets_); + } + onChanged(); + } + } else { + if (!other.subjectSets_.isEmpty()) { + if (subjectSetsBuilder_.isEmpty()) { + subjectSetsBuilder_.dispose(); + subjectSetsBuilder_ = null; + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000004); + subjectSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectSetsFieldBuilder() : null; + } else { + subjectSetsBuilder_.addAllMessages(other.subjectSets_); + } } - onChanged(); } if (actionsBuilder_ == null) { if (!other.actions_.isEmpty()) { @@ -679,9 +709,16 @@ public Builder mergeFrom( break; } // case 18 case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureSubjectSetIdsIsMutable(); - subjectSetIds_.add(s); + io.opentdf.platform.policy.subjectmapping.SubjectSet m = + input.readMessage( + io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), + extensionRegistry); + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(m); + } else { + subjectSetsBuilder_.addMessage(m); + } break; } // case 26 case 34: { @@ -927,152 +964,317 @@ public Builder setAttributeValueIdBytes( return this; } - private com.google.protobuf.LazyStringArrayList subjectSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureSubjectSetIdsIsMutable() { - if (!subjectSetIds_.isModifiable()) { - subjectSetIds_ = new com.google.protobuf.LazyStringArrayList(subjectSetIds_); + private java.util.List subjectSets_ = + java.util.Collections.emptyList(); + private void ensureSubjectSetsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + subjectSets_ = new java.util.ArrayList(subjectSets_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> subjectSetsBuilder_; + + /** + *
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + public java.util.List getSubjectSetsList() { + if (subjectSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectSets_); + } else { + return subjectSetsBuilder_.getMessageList(); } - bitField0_ |= 0x00000004; } /** *
    -     * the subjects sets in this mapping
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
          * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @return A list containing the subjectSetIds. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public com.google.protobuf.ProtocolStringList - getSubjectSetIdsList() { - subjectSetIds_.makeImmutable(); - return subjectSetIds_; + public int getSubjectSetsCount() { + if (subjectSetsBuilder_ == null) { + return subjectSets_.size(); + } else { + return subjectSetsBuilder_.getCount(); + } } /** *
    -     * the subjects sets in this mapping
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
          * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @return The count of subjectSetIds. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public int getSubjectSetIdsCount() { - return subjectSetIds_.size(); + public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); + } else { + return subjectSetsBuilder_.getMessage(index); + } } /** *
    -     * the subjects sets in this mapping
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
          * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param index The index of the element to return. - * @return The subjectSetIds at the given index. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public java.lang.String getSubjectSetIds(int index) { - return subjectSetIds_.get(index); + public Builder setSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, value); + onChanged(); + } else { + subjectSetsBuilder_.setMessage(index, value); + } + return this; } /** *
    -     * the subjects sets in this mapping
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
          * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param index The index of the value to return. - * @return The bytes of the subjectSetIds at the given index. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public com.google.protobuf.ByteString - getSubjectSetIdsBytes(int index) { - return subjectSetIds_.getByteString(index); + public Builder setSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; } /** *
    -     * the subjects sets in this mapping
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
          * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param index The index to set the value at. - * @param value The subjectSetIds to set. - * @return This builder for chaining. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public Builder setSubjectSetIds( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureSubjectSetIdsIsMutable(); - subjectSetIds_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); + public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.add(value); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(value); + } return this; } /** *
    -     * the subjects sets in this mapping
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
          * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param value The subjectSetIds to add. - * @return This builder for chaining. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public Builder addSubjectSetIds( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureSubjectSetIdsIsMutable(); - subjectSetIds_.add(value); - bitField0_ |= 0x00000004; - onChanged(); + public Builder addSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (subjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, value); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(index, value); + } return this; } /** *
    -     * the subjects sets in this mapping
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
          * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param values The subjectSetIds to add. - * @return This builder for chaining. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public Builder addAllSubjectSetIds( - java.lang.Iterable values) { - ensureSubjectSetIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectSetIds_); - bitField0_ |= 0x00000004; - onChanged(); + public Builder addSubjectSets( + io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(builderForValue.build()); + } return this; } /** *
    -     * the subjects sets in this mapping
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
          * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @return This builder for chaining. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public Builder clearSubjectSetIds() { - subjectSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004);; - onChanged(); + public Builder addSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectSetsBuilder_.addMessage(index, builderForValue.build()); + } return this; } /** *
    -     * the subjects sets in this mapping
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
          * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param value The bytes of the subjectSetIds to add. - * @return This builder for chaining. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - public Builder addSubjectSetIdsBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - ensureSubjectSetIdsIsMutable(); - subjectSetIds_.add(value); - bitField0_ |= 0x00000004; - onChanged(); + public Builder addAllSubjectSets( + java.lang.Iterable values) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectSets_); + onChanged(); + } else { + subjectSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + public Builder clearSubjectSets() { + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + subjectSetsBuilder_.clear(); + } return this; } + /** + *
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + public Builder removeSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.remove(index); + onChanged(); + } else { + subjectSetsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().getBuilder(index); + } + /** + *
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); } else { + return subjectSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + public java.util.List + getSubjectSetsOrBuilderList() { + if (subjectSetsBuilder_ != null) { + return subjectSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectSets_); + } + } + /** + *
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder() { + return getSubjectSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + } + /** + *
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + } + /** + *
    +     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + public java.util.List + getSubjectSetsBuilderList() { + return getSubjectSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> + getSubjectSetsFieldBuilder() { + if (subjectSetsBuilder_ == null) { + subjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( + subjectSets_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + subjectSets_ = null; + } + return subjectSetsBuilder_; + } private java.util.List actions_ = java.util.Collections.emptyList(); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdateOrBuilder.java index 5370741418..7d68a7d2be 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdateOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdateOrBuilder.java @@ -45,44 +45,47 @@ public interface SubjectMappingCreateUpdateOrBuilder extends /** *
    -   * the subjects sets in this mapping
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
        * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @return A list containing the subjectSetIds. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - java.util.List - getSubjectSetIdsList(); + java.util.List + getSubjectSetsList(); /** *
    -   * the subjects sets in this mapping
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
        * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @return The count of subjectSetIds. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - int getSubjectSetIdsCount(); + io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index); /** *
    -   * the subjects sets in this mapping
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
        * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param index The index of the element to return. - * @return The subjectSetIds at the given index. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - java.lang.String getSubjectSetIds(int index); + int getSubjectSetsCount(); /** *
    -   * the subjects sets in this mapping
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
        * 
    * - * repeated string subject_set_ids = 3 [json_name = "subjectSetIds"]; - * @param index The index of the value to return. - * @return The bytes of the subjectSetIds at the given index. + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; */ - com.google.protobuf.ByteString - getSubjectSetIdsBytes(int index); + java.util.List + getSubjectSetsOrBuilderList(); + /** + *
    +   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index); /** *
    diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingOrBuilder.java
    index 54cd333080..fd0f7533f3 100644
    --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingOrBuilder.java
    +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingOrBuilder.java
    @@ -21,28 +21,16 @@ public interface SubjectMappingOrBuilder extends
           getIdBytes();
     
       /**
    -   * 
    -   *TODO should this be a list of values?
    -   * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; * @return Whether the metadata field is set. */ boolean hasMetadata(); /** - *
    -   *TODO should this be a list of values?
    -   * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; * @return The metadata. */ io.opentdf.platform.common.Metadata getMetadata(); /** - *
    -   *TODO should this be a list of values?
    -   * 
    - * * .common.Metadata metadata = 2 [json_name = "metadata"]; */ io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java index 5b9a4dec84..36ac8f3d04 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingProto.java @@ -35,61 +35,6 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_SubjectMapping_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_SubjectSetCreateUpdate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_SubjectSetCreateUpdate_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_GetSubjectSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_GetSubjectSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_GetSubjectSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_GetSubjectSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_CreateSubjectSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_CreateSubjectSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_CreateSubjectSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_CreateSubjectSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_UpdateSubjectSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_UpdateSubjectSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_UpdateSubjectSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_UpdateSubjectSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_DeleteSubjectSetRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_DeleteSubjectSetRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_DeleteSubjectSetResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_DeleteSubjectSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_ListSubjectSetsRequest_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_ListSubjectSetsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_ListSubjectSetsResponse_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_ListSubjectSetsResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_Subject_descriptor; static final @@ -175,147 +120,103 @@ public static void registerAllExtensions( "lidate.proto\032\023common/common.proto\032\034googl" + "e/api/annotations.proto\032\034google/protobuf" + "/struct.proto\032\"policy/attributes/attribu" + - "tes.proto\"\273\001\n\tCondition\022+\n\021subject_attri" + - "bute\030\001 \001(\tR\020subjectAttribute\022Z\n\010operator" + - "\030\002 \001(\01621.policy.subjectmapping.SubjectMa" + - "ppingOperatorEnumB\013\272H\010\202\001\002\020\001\310\001\001R\010operator" + - "\022%\n\016subject_values\030\003 \003(\tR\rsubjectValues\"" + - "\275\001\n\016ConditionGroup\022J\n\nconditions\030\001 \003(\0132 " + - ".policy.subjectmapping.ConditionB\010\272H\005\222\001\002" + - "\010\001R\nconditions\022_\n\014boolean_type\030\002 \001(\0162/.p" + - "olicy.subjectmapping.ConditionBooleanTyp" + - "eEnumB\013\272H\010\202\001\002\020\001\310\001\001R\013booleanType\"\246\001\n\nSubj" + - "ectSet\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010metadata\030\002 \001(\013" + - "2\020.common.MetadataR\010metadata\022Z\n\020conditio" + - "n_groups\030\003 \003(\0132%.policy.subjectmapping.C" + - "onditionGroupB\010\272H\005\222\001\002\010\001R\017conditionGroups" + - "\"\210\002\n\016SubjectMapping\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010m" + - "etadata\030\002 \001(\0132\020.common.MetadataR\010metadat" + - "a\022A\n\017attribute_value\030\003 \001(\0132\030.policy.attr" + - "ibutes.ValueR\016attributeValue\022D\n\014subject_" + - "sets\030\004 \003(\0132!.policy.subjectmapping.Subje" + - "ctSetR\013subjectSets\022/\n\007actions\030\005 \003(\0132\025.au" + - "thorization.ActionR\007actions\"\237\001\n\026SubjectS" + - "etCreateUpdate\0223\n\010metadata\030\001 \001(\0132\027.commo" + - "n.MetadataMutableR\010metadata\022P\n\020condition" + - "_groups\030\002 \003(\0132%.policy.subjectmapping.Co" + - "nditionGroupR\017conditionGroups\".\n\024GetSubj" + - "ectSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"[\n" + - "\025GetSubjectSetResponse\022B\n\013subject_set\030\001 " + - "\001(\0132!.policy.subjectmapping.SubjectSetR\n" + - "subjectSet\"q\n\027CreateSubjectSetRequest\022V\n" + - "\013subject_set\030\001 \001(\0132-.policy.subjectmappi" + - "ng.SubjectSetCreateUpdateB\006\272H\003\310\001\001R\nsubje" + - "ctSet\"^\n\030CreateSubjectSetResponse\022B\n\013sub" + - "ject_set\030\001 \001(\0132!.policy.subjectmapping.S" + - "ubjectSetR\nsubjectSet\"\211\001\n\027UpdateSubjectS" + - "etRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022V\n\013sub" + - "ject_set\030\002 \001(\0132-.policy.subjectmapping.S" + - "ubjectSetCreateUpdateB\006\272H\003\310\001\001R\nsubjectSe" + - "t\"^\n\030UpdateSubjectSetResponse\022B\n\013subject" + - "_set\030\001 \001(\0132!.policy.subjectmapping.Subje" + - "ctSetR\nsubjectSet\"1\n\027DeleteSubjectSetReq" + - "uest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"^\n\030DeleteSu" + - "bjectSetResponse\022B\n\013subject_set\030\001 \001(\0132!." + - "policy.subjectmapping.SubjectSetR\nsubjec" + - "tSet\"\030\n\026ListSubjectSetsRequest\"_\n\027ListSu" + - "bjectSetsResponse\022D\n\014subject_sets\030\001 \003(\0132" + - "!.policy.subjectmapping.SubjectSetR\013subj" + - "ectSets\"B\n\007Subject\0227\n\nattributes\030\001 \001(\0132\027" + - ".google.protobuf.StructR\nattributes\"W\n\033M" + - "atchSubjectMappingsRequest\0228\n\007subject\030\001 " + - "\001(\0132\036.policy.subjectmapping.SubjectR\007sub" + - "ject\"p\n\034MatchSubjectMappingsResponse\022P\n\020" + - "subject_mappings\030\001 \003(\0132%.policy.subjectm" + - "apping.SubjectMappingR\017subjectMappings\"\330" + - "\001\n\032SubjectMappingCreateUpdate\0223\n\010metadat" + - "a\030\001 \001(\0132\027.common.MetadataMutableR\010metada" + - "ta\022,\n\022attribute_value_id\030\002 \001(\tR\020attribut" + - "eValueId\022&\n\017subject_set_ids\030\003 \003(\tR\rsubje" + - "ctSetIds\022/\n\007actions\030\004 \003(\0132\025.authorizatio" + - "n.ActionR\007actions\"2\n\030GetSubjectMappingRe" + - "quest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"k\n\031GetSubj" + + "tes.proto\"\325\001\n\tCondition\0224\n\026subject_exter" + + "nal_field\030\001 \001(\tR\024subjectExternalField\022Z\n" + + "\010operator\030\002 \001(\01621.policy.subjectmapping." + + "SubjectMappingOperatorEnumB\013\272H\010\202\001\002\020\001\310\001\001R" + + "\010operator\0226\n\027subject_external_values\030\003 \003" + + "(\tR\025subjectExternalValues\"\275\001\n\016ConditionG" + + "roup\022J\n\nconditions\030\001 \003(\0132 .policy.subjec" + + "tmapping.ConditionB\010\272H\005\222\001\002\010\001R\nconditions" + + "\022_\n\014boolean_type\030\002 \001(\0162/.policy.subjectm" + + "apping.ConditionBooleanTypeEnumB\013\272H\010\202\001\002\020" + + "\001\310\001\001R\013booleanType\"h\n\nSubjectSet\022Z\n\020condi" + + "tion_groups\030\001 \003(\0132%.policy.subjectmappin" + + "g.ConditionGroupB\010\272H\005\222\001\002\010\001R\017conditionGro" + + "ups\"\210\002\n\016SubjectMapping\022\016\n\002id\030\001 \001(\tR\002id\022," + + "\n\010metadata\030\002 \001(\0132\020.common.MetadataR\010meta" + + "data\022A\n\017attribute_value\030\003 \001(\0132\030.policy.a" + + "ttributes.ValueR\016attributeValue\022D\n\014subje" + + "ct_sets\030\004 \003(\0132!.policy.subjectmapping.Su" + + "bjectSetR\013subjectSets\022/\n\007actions\030\005 \003(\0132\025" + + ".authorization.ActionR\007actions\"B\n\007Subjec" + + "t\0227\n\nattributes\030\001 \001(\0132\027.google.protobuf." + + "StructR\nattributes\"W\n\033MatchSubjectMappin" + + "gsRequest\0228\n\007subject\030\001 \001(\0132\036.policy.subj" + + "ectmapping.SubjectR\007subject\"p\n\034MatchSubj" + + "ectMappingsResponse\022P\n\020subject_mappings\030" + + "\001 \003(\0132%.policy.subjectmapping.SubjectMap" + + "pingR\017subjectMappings\"\366\001\n\032SubjectMapping" + + "CreateUpdate\0223\n\010metadata\030\001 \001(\0132\027.common." + + "MetadataMutableR\010metadata\022,\n\022attribute_v" + + "alue_id\030\002 \001(\tR\020attributeValueId\022D\n\014subje" + + "ct_sets\030\003 \003(\0132!.policy.subjectmapping.Su" + + "bjectSetR\013subjectSets\022/\n\007actions\030\004 \003(\0132\025" + + ".authorization.ActionR\007actions\"2\n\030GetSub" + + "jectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002" + + "id\"k\n\031GetSubjectMappingResponse\022N\n\017subje" + + "ct_mapping\030\001 \001(\0132%.policy.subjectmapping" + + ".SubjectMappingR\016subjectMapping\"\034\n\032ListS" + + "ubjectMappingsRequest\"o\n\033ListSubjectMapp" + + "ingsResponse\022P\n\020subject_mappings\030\001 \003(\0132%" + + ".policy.subjectmapping.SubjectMappingR\017s" + + "ubjectMappings\"\201\001\n\033CreateSubjectMappingR" + + "equest\022b\n\017subject_mapping\030\001 \001(\01321.policy" + + ".subjectmapping.SubjectMappingCreateUpda" + + "teB\006\272H\003\310\001\001R\016subjectMapping\"n\n\034CreateSubj" + "ectMappingResponse\022N\n\017subject_mapping\030\001 " + "\001(\0132%.policy.subjectmapping.SubjectMappi" + - "ngR\016subjectMapping\"\034\n\032ListSubjectMapping" + - "sRequest\"o\n\033ListSubjectMappingsResponse\022" + - "P\n\020subject_mappings\030\001 \003(\0132%.policy.subje" + - "ctmapping.SubjectMappingR\017subjectMapping" + - "s\"\201\001\n\033CreateSubjectMappingRequest\022b\n\017sub" + - "ject_mapping\030\001 \001(\01321.policy.subjectmappi" + - "ng.SubjectMappingCreateUpdateB\006\272H\003\310\001\001R\016s" + - "ubjectMapping\"n\n\034CreateSubjectMappingRes" + - "ponse\022N\n\017subject_mapping\030\001 \001(\0132%.policy." + - "subjectmapping.SubjectMappingR\016subjectMa" + - "pping\"\231\001\n\033UpdateSubjectMappingRequest\022\026\n" + - "\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022b\n\017subject_mapping" + - "\030\002 \001(\01321.policy.subjectmapping.SubjectMa" + - "ppingCreateUpdateB\006\272H\003\310\001\001R\016subjectMappin" + - "g\"n\n\034UpdateSubjectMappingResponse\022N\n\017sub" + - "ject_mapping\030\001 \001(\0132%.policy.subjectmappi" + - "ng.SubjectMappingR\016subjectMapping\"5\n\033Del" + - "eteSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H" + - "\003\310\001\001R\002id\"n\n\034DeleteSubjectMappingResponse" + - "\022N\n\017subject_mapping\030\001 \001(\0132%.policy.subje" + - "ctmapping.SubjectMappingR\016subjectMapping" + - "*\233\001\n\032SubjectMappingOperatorEnum\022-\n)SUBJE" + - "CT_MAPPING_OPERATOR_ENUM_UNSPECIFIED\020\000\022$" + - "\n SUBJECT_MAPPING_OPERATOR_ENUM_IN\020\001\022(\n$" + - "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN\020\002*\220" + - "\001\n\030ConditionBooleanTypeEnum\022+\n\'CONDITION" + - "_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022#\n\037COND" + - "ITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036CONDITI" + - "ON_BOOLEAN_TYPE_ENUM_OR\020\0022\327\r\n\025SubjectMap" + - "pingService\022\206\001\n\rGetSubjectSet\022+.policy.s" + - "ubjectmapping.GetSubjectSetRequest\032,.pol" + - "icy.subjectmapping.GetSubjectSetResponse" + - "\"\032\202\323\344\223\002\024\022\022/subject-sets/{id}\022\227\001\n\020CreateS" + - "ubjectSet\022..policy.subjectmapping.Create" + - "SubjectSetRequest\032/.policy.subjectmappin" + - "g.CreateSubjectSetResponse\"\"\202\323\344\223\002\034\"\r/sub" + - "ject-sets:\013subject_set\022\234\001\n\020UpdateSubject" + - "Set\022..policy.subjectmapping.UpdateSubjec" + - "tSetRequest\032/.policy.subjectmapping.Upda" + - "teSubjectSetResponse\"\'\202\323\344\223\002!\"\022/subject-s" + - "ets/{id}:\013subject_set\022\217\001\n\020DeleteSubjectS" + - "et\022..policy.subjectmapping.DeleteSubject" + - "SetRequest\032/.policy.subjectmapping.Delet" + - "eSubjectSetResponse\"\032\202\323\344\223\002\024*\022/subject-se" + - "ts/{id}\022\207\001\n\017ListSubjectSets\022-.policy.sub" + - "jectmapping.ListSubjectSetsRequest\032..pol" + - "icy.subjectmapping.ListSubjectSetsRespon" + - "se\"\025\202\323\344\223\002\017\022\r/subject-sets\022\251\001\n\024MatchSubje" + - "ctMappings\0222.policy.subjectmapping.Match" + - "SubjectMappingsRequest\0323.policy.subjectm" + - "apping.MatchSubjectMappingsResponse\"(\202\323\344" + - "\223\002\"\"\027/subject-mappings/match:\007subject\022\227\001" + - "\n\023ListSubjectMappings\0221.policy.subjectma" + - "pping.ListSubjectMappingsRequest\0322.polic" + - "y.subjectmapping.ListSubjectMappingsResp" + - "onse\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetS" + - "ubjectMapping\022/.policy.subjectmapping.Ge" + - "tSubjectMappingRequest\0320.policy.subjectm" + - "apping.GetSubjectMappingResponse\"\036\202\323\344\223\002\030" + - "\022\026/subject-mappings/{id}\022\253\001\n\024CreateSubje" + - "ctMapping\0222.policy.subjectmapping.Create" + - "SubjectMappingRequest\0323.policy.subjectma" + - "pping.CreateSubjectMappingResponse\"*\202\323\344\223" + - "\002$\"\021/subject-mappings:\017subject_mapping\022\260" + - "\001\n\024UpdateSubjectMapping\0222.policy.subject" + - "mapping.UpdateSubjectMappingRequest\0323.po" + - "licy.subjectmapping.UpdateSubjectMapping" + - "Response\"/\202\323\344\223\002)\"\026/subject-mappings/{id}" + - ":\017subject_mapping\022\237\001\n\024DeleteSubjectMappi" + - "ng\0222.policy.subjectmapping.DeleteSubject" + - "MappingRequest\0323.policy.subjectmapping.D" + - "eleteSubjectMappingResponse\"\036\202\323\344\223\002\030*\026/su" + - "bject-mappings/{id}B\364\001\n)io.opentdf.platf" + - "orm.policy.subjectmappingB\023SubjectMappin" + - "gProtoP\001Z=github.com/opentdf/platform/pr" + - "otocol/go/policy/subjectmapping\242\002\003PSX\252\002\025" + - "Policy.Subjectmapping\312\002\025Policy\\Subjectma" + - "pping\342\002!Policy\\Subjectmapping\\GPBMetadat" + - "a\352\002\026Policy::Subjectmappingb\006proto3" + "ngR\016subjectMapping\"\231\001\n\033UpdateSubjectMapp" + + "ingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022b\n\017su" + + "bject_mapping\030\002 \001(\01321.policy.subjectmapp" + + "ing.SubjectMappingCreateUpdateB\006\272H\003\310\001\001R\016" + + "subjectMapping\"n\n\034UpdateSubjectMappingRe" + + "sponse\022N\n\017subject_mapping\030\001 \001(\0132%.policy" + + ".subjectmapping.SubjectMappingR\016subjectM" + + "apping\"5\n\033DeleteSubjectMappingRequest\022\026\n" + + "\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectMa" + + "ppingResponse\022N\n\017subject_mapping\030\001 \001(\0132%" + + ".policy.subjectmapping.SubjectMappingR\016s" + + "ubjectMapping*\233\001\n\032SubjectMappingOperator" + + "Enum\022-\n)SUBJECT_MAPPING_OPERATOR_ENUM_UN" + + "SPECIFIED\020\000\022$\n SUBJECT_MAPPING_OPERATOR_" + + "ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_EN" + + "UM_NOT_IN\020\002*\220\001\n\030ConditionBooleanTypeEnum" + + "\022+\n\'CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIF" + + "IED\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND" + + "\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\371" + + "\007\n\025SubjectMappingService\022\251\001\n\024MatchSubjec" + + "tMappings\0222.policy.subjectmapping.MatchS" + + "ubjectMappingsRequest\0323.policy.subjectma" + + "pping.MatchSubjectMappingsResponse\"(\202\323\344\223" + + "\002\"\"\027/subject-mappings/match:\007subject\022\227\001\n" + + "\023ListSubjectMappings\0221.policy.subjectmap" + + "ping.ListSubjectMappingsRequest\0322.policy" + + ".subjectmapping.ListSubjectMappingsRespo" + + "nse\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSu" + + "bjectMapping\022/.policy.subjectmapping.Get" + + "SubjectMappingRequest\0320.policy.subjectma" + + "pping.GetSubjectMappingResponse\"\036\202\323\344\223\002\030\022" + + "\026/subject-mappings/{id}\022\253\001\n\024CreateSubjec" + + "tMapping\0222.policy.subjectmapping.CreateS" + + "ubjectMappingRequest\0323.policy.subjectmap" + + "ping.CreateSubjectMappingResponse\"*\202\323\344\223\002" + + "$\"\021/subject-mappings:\017subject_mapping\022\260\001" + + "\n\024UpdateSubjectMapping\0222.policy.subjectm" + + "apping.UpdateSubjectMappingRequest\0323.pol" + + "icy.subjectmapping.UpdateSubjectMappingR" + + "esponse\"/\202\323\344\223\002)\"\026/subject-mappings/{id}:" + + "\017subject_mapping\022\237\001\n\024DeleteSubjectMappin" + + "g\0222.policy.subjectmapping.DeleteSubjectM" + + "appingRequest\0323.policy.subjectmapping.De" + + "leteSubjectMappingResponse\"\036\202\323\344\223\002\030*\026/sub" + + "ject-mappings/{id}B\364\001\n)io.opentdf.platfo" + + "rm.policy.subjectmappingB\023SubjectMapping" + + "ProtoP\001Z=github.com/opentdf/platform/pro" + + "tocol/go/policy/subjectmapping\242\002\003PSX\252\002\025P" + + "olicy.Subjectmapping\312\002\025Policy\\Subjectmap" + + "ping\342\002!Policy\\Subjectmapping\\GPBMetadata" + + "\352\002\026Policy::Subjectmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -332,7 +233,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_Condition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_Condition_descriptor, - new java.lang.String[] { "SubjectAttribute", "Operator", "SubjectValues", }); + new java.lang.String[] { "SubjectExternalField", "Operator", "SubjectExternalValues", }); internal_static_policy_subjectmapping_ConditionGroup_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_policy_subjectmapping_ConditionGroup_fieldAccessorTable = new @@ -344,159 +245,93 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_SubjectSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectSet_descriptor, - new java.lang.String[] { "Id", "Metadata", "ConditionGroups", }); + new java.lang.String[] { "ConditionGroups", }); internal_static_policy_subjectmapping_SubjectMapping_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_policy_subjectmapping_SubjectMapping_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectMapping_descriptor, new java.lang.String[] { "Id", "Metadata", "AttributeValue", "SubjectSets", "Actions", }); - internal_static_policy_subjectmapping_SubjectSetCreateUpdate_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_policy_subjectmapping_SubjectSetCreateUpdate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_SubjectSetCreateUpdate_descriptor, - new java.lang.String[] { "Metadata", "ConditionGroups", }); - internal_static_policy_subjectmapping_GetSubjectSetRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_policy_subjectmapping_GetSubjectSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_GetSubjectSetRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_subjectmapping_GetSubjectSetResponse_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_policy_subjectmapping_GetSubjectSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_GetSubjectSetResponse_descriptor, - new java.lang.String[] { "SubjectSet", }); - internal_static_policy_subjectmapping_CreateSubjectSetRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_policy_subjectmapping_CreateSubjectSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_CreateSubjectSetRequest_descriptor, - new java.lang.String[] { "SubjectSet", }); - internal_static_policy_subjectmapping_CreateSubjectSetResponse_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_policy_subjectmapping_CreateSubjectSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_CreateSubjectSetResponse_descriptor, - new java.lang.String[] { "SubjectSet", }); - internal_static_policy_subjectmapping_UpdateSubjectSetRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_policy_subjectmapping_UpdateSubjectSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_UpdateSubjectSetRequest_descriptor, - new java.lang.String[] { "Id", "SubjectSet", }); - internal_static_policy_subjectmapping_UpdateSubjectSetResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_policy_subjectmapping_UpdateSubjectSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_UpdateSubjectSetResponse_descriptor, - new java.lang.String[] { "SubjectSet", }); - internal_static_policy_subjectmapping_DeleteSubjectSetRequest_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_policy_subjectmapping_DeleteSubjectSetRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_DeleteSubjectSetRequest_descriptor, - new java.lang.String[] { "Id", }); - internal_static_policy_subjectmapping_DeleteSubjectSetResponse_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_policy_subjectmapping_DeleteSubjectSetResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_DeleteSubjectSetResponse_descriptor, - new java.lang.String[] { "SubjectSet", }); - internal_static_policy_subjectmapping_ListSubjectSetsRequest_descriptor = - getDescriptor().getMessageTypes().get(13); - internal_static_policy_subjectmapping_ListSubjectSetsRequest_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_ListSubjectSetsRequest_descriptor, - new java.lang.String[] { }); - internal_static_policy_subjectmapping_ListSubjectSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(14); - internal_static_policy_subjectmapping_ListSubjectSetsResponse_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_ListSubjectSetsResponse_descriptor, - new java.lang.String[] { "SubjectSets", }); internal_static_policy_subjectmapping_Subject_descriptor = - getDescriptor().getMessageTypes().get(15); + getDescriptor().getMessageTypes().get(4); internal_static_policy_subjectmapping_Subject_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_Subject_descriptor, new java.lang.String[] { "Attributes", }); internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + getDescriptor().getMessageTypes().get(5); internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor, new java.lang.String[] { "Subject", }); internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor = - getDescriptor().getMessageTypes().get(17); + getDescriptor().getMessageTypes().get(6); internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor, new java.lang.String[] { "SubjectMappings", }); internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_descriptor = - getDescriptor().getMessageTypes().get(18); + getDescriptor().getMessageTypes().get(7); internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_descriptor, - new java.lang.String[] { "Metadata", "AttributeValueId", "SubjectSetIds", "Actions", }); + new java.lang.String[] { "Metadata", "AttributeValueId", "SubjectSets", "Actions", }); internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(19); + getDescriptor().getMessageTypes().get(8); internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor, new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(9); internal_static_policy_subjectmapping_GetSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_GetSubjectMappingResponse_descriptor, new java.lang.String[] { "SubjectMapping", }); internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(10); internal_static_policy_subjectmapping_ListSubjectMappingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_ListSubjectMappingsRequest_descriptor, new java.lang.String[] { }); internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(11); internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor, new java.lang.String[] { "SubjectMappings", }); internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(12); internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor, new java.lang.String[] { "SubjectMapping", }); internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(13); internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor, new java.lang.String[] { "SubjectMapping", }); internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(14); internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor, new java.lang.String[] { "Id", "SubjectMapping", }); internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(15); internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor, new java.lang.String[] { "SubjectMapping", }); internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(16); internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor, new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(17); internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor, diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java index 61c9c2761f..7002cf8758 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingServiceGrpc.java @@ -15,161 +15,6 @@ private SubjectMappingServiceGrpc() {} public static final java.lang.String SERVICE_NAME = "policy.subjectmapping.SubjectMappingService"; // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor getGetSubjectSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSubjectSet", - requestType = io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getGetSubjectSetMethod() { - io.grpc.MethodDescriptor getGetSubjectSetMethod; - if ((getGetSubjectSetMethod = SubjectMappingServiceGrpc.getGetSubjectSetMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getGetSubjectSetMethod = SubjectMappingServiceGrpc.getGetSubjectSetMethod) == null) { - SubjectMappingServiceGrpc.getGetSubjectSetMethod = getGetSubjectSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubjectSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("GetSubjectSet")) - .build(); - } - } - } - return getGetSubjectSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getCreateSubjectSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateSubjectSet", - requestType = io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getCreateSubjectSetMethod() { - io.grpc.MethodDescriptor getCreateSubjectSetMethod; - if ((getCreateSubjectSetMethod = SubjectMappingServiceGrpc.getCreateSubjectSetMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getCreateSubjectSetMethod = SubjectMappingServiceGrpc.getCreateSubjectSetMethod) == null) { - SubjectMappingServiceGrpc.getCreateSubjectSetMethod = getCreateSubjectSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSubjectSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("CreateSubjectSet")) - .build(); - } - } - } - return getCreateSubjectSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getUpdateSubjectSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateSubjectSet", - requestType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getUpdateSubjectSetMethod() { - io.grpc.MethodDescriptor getUpdateSubjectSetMethod; - if ((getUpdateSubjectSetMethod = SubjectMappingServiceGrpc.getUpdateSubjectSetMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getUpdateSubjectSetMethod = SubjectMappingServiceGrpc.getUpdateSubjectSetMethod) == null) { - SubjectMappingServiceGrpc.getUpdateSubjectSetMethod = getUpdateSubjectSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSubjectSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("UpdateSubjectSet")) - .build(); - } - } - } - return getUpdateSubjectSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getDeleteSubjectSetMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteSubjectSet", - requestType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getDeleteSubjectSetMethod() { - io.grpc.MethodDescriptor getDeleteSubjectSetMethod; - if ((getDeleteSubjectSetMethod = SubjectMappingServiceGrpc.getDeleteSubjectSetMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getDeleteSubjectSetMethod = SubjectMappingServiceGrpc.getDeleteSubjectSetMethod) == null) { - SubjectMappingServiceGrpc.getDeleteSubjectSetMethod = getDeleteSubjectSetMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubjectSet")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("DeleteSubjectSet")) - .build(); - } - } - } - return getDeleteSubjectSetMethod; - } - - private static volatile io.grpc.MethodDescriptor getListSubjectSetsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListSubjectSets", - requestType = io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest.class, - responseType = io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor getListSubjectSetsMethod() { - io.grpc.MethodDescriptor getListSubjectSetsMethod; - if ((getListSubjectSetsMethod = SubjectMappingServiceGrpc.getListSubjectSetsMethod) == null) { - synchronized (SubjectMappingServiceGrpc.class) { - if ((getListSubjectSetsMethod = SubjectMappingServiceGrpc.getListSubjectSetsMethod) == null) { - SubjectMappingServiceGrpc.getListSubjectSetsMethod = getListSubjectSetsMethod = - io.grpc.MethodDescriptor.newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSubjectSets")) - .setSampledToLocalTracing(true) - .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest.getDefaultInstance())) - .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( - io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse.getDefaultInstance())) - .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("ListSubjectSets")) - .build(); - } - } - } - return getListSubjectSetsMethod; - } - private static volatile io.grpc.MethodDescriptor getMatchSubjectMappingsMethod; @@ -404,41 +249,6 @@ public SubjectMappingServiceFutureStub newStub(io.grpc.Channel channel, io.grpc. */ public interface AsyncService { - /** - */ - default void getSubjectSet(io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubjectSetMethod(), responseObserver); - } - - /** - */ - default void createSubjectSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSubjectSetMethod(), responseObserver); - } - - /** - */ - default void updateSubjectSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSubjectSetMethod(), responseObserver); - } - - /** - */ - default void deleteSubjectSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubjectSetMethod(), responseObserver); - } - - /** - */ - default void listSubjectSets(io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSubjectSetsMethod(), responseObserver); - } - /** *
          * Find matching Subject Mappings for a given Subject
    @@ -512,46 +322,6 @@ protected SubjectMappingServiceStub build(
           return new SubjectMappingServiceStub(channel, callOptions);
         }
     
    -    /**
    -     */
    -    public void getSubjectSet(io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest request,
    -        io.grpc.stub.StreamObserver responseObserver) {
    -      io.grpc.stub.ClientCalls.asyncUnaryCall(
    -          getChannel().newCall(getGetSubjectSetMethod(), getCallOptions()), request, responseObserver);
    -    }
    -
    -    /**
    -     */
    -    public void createSubjectSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest request,
    -        io.grpc.stub.StreamObserver responseObserver) {
    -      io.grpc.stub.ClientCalls.asyncUnaryCall(
    -          getChannel().newCall(getCreateSubjectSetMethod(), getCallOptions()), request, responseObserver);
    -    }
    -
    -    /**
    -     */
    -    public void updateSubjectSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest request,
    -        io.grpc.stub.StreamObserver responseObserver) {
    -      io.grpc.stub.ClientCalls.asyncUnaryCall(
    -          getChannel().newCall(getUpdateSubjectSetMethod(), getCallOptions()), request, responseObserver);
    -    }
    -
    -    /**
    -     */
    -    public void deleteSubjectSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest request,
    -        io.grpc.stub.StreamObserver responseObserver) {
    -      io.grpc.stub.ClientCalls.asyncUnaryCall(
    -          getChannel().newCall(getDeleteSubjectSetMethod(), getCallOptions()), request, responseObserver);
    -    }
    -
    -    /**
    -     */
    -    public void listSubjectSets(io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest request,
    -        io.grpc.stub.StreamObserver responseObserver) {
    -      io.grpc.stub.ClientCalls.asyncUnaryCall(
    -          getChannel().newCall(getListSubjectSetsMethod(), getCallOptions()), request, responseObserver);
    -    }
    -
         /**
          * 
          * Find matching Subject Mappings for a given Subject
    @@ -620,41 +390,6 @@ protected SubjectMappingServiceBlockingStub build(
           return new SubjectMappingServiceBlockingStub(channel, callOptions);
         }
     
    -    /**
    -     */
    -    public io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse getSubjectSet(io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest request) {
    -      return io.grpc.stub.ClientCalls.blockingUnaryCall(
    -          getChannel(), getGetSubjectSetMethod(), getCallOptions(), request);
    -    }
    -
    -    /**
    -     */
    -    public io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse createSubjectSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest request) {
    -      return io.grpc.stub.ClientCalls.blockingUnaryCall(
    -          getChannel(), getCreateSubjectSetMethod(), getCallOptions(), request);
    -    }
    -
    -    /**
    -     */
    -    public io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse updateSubjectSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest request) {
    -      return io.grpc.stub.ClientCalls.blockingUnaryCall(
    -          getChannel(), getUpdateSubjectSetMethod(), getCallOptions(), request);
    -    }
    -
    -    /**
    -     */
    -    public io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse deleteSubjectSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest request) {
    -      return io.grpc.stub.ClientCalls.blockingUnaryCall(
    -          getChannel(), getDeleteSubjectSetMethod(), getCallOptions(), request);
    -    }
    -
    -    /**
    -     */
    -    public io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse listSubjectSets(io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest request) {
    -      return io.grpc.stub.ClientCalls.blockingUnaryCall(
    -          getChannel(), getListSubjectSetsMethod(), getCallOptions(), request);
    -    }
    -
         /**
          * 
          * Find matching Subject Mappings for a given Subject
    @@ -717,46 +452,6 @@ protected SubjectMappingServiceFutureStub build(
           return new SubjectMappingServiceFutureStub(channel, callOptions);
         }
     
    -    /**
    -     */
    -    public com.google.common.util.concurrent.ListenableFuture getSubjectSet(
    -        io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest request) {
    -      return io.grpc.stub.ClientCalls.futureUnaryCall(
    -          getChannel().newCall(getGetSubjectSetMethod(), getCallOptions()), request);
    -    }
    -
    -    /**
    -     */
    -    public com.google.common.util.concurrent.ListenableFuture createSubjectSet(
    -        io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest request) {
    -      return io.grpc.stub.ClientCalls.futureUnaryCall(
    -          getChannel().newCall(getCreateSubjectSetMethod(), getCallOptions()), request);
    -    }
    -
    -    /**
    -     */
    -    public com.google.common.util.concurrent.ListenableFuture updateSubjectSet(
    -        io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest request) {
    -      return io.grpc.stub.ClientCalls.futureUnaryCall(
    -          getChannel().newCall(getUpdateSubjectSetMethod(), getCallOptions()), request);
    -    }
    -
    -    /**
    -     */
    -    public com.google.common.util.concurrent.ListenableFuture deleteSubjectSet(
    -        io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest request) {
    -      return io.grpc.stub.ClientCalls.futureUnaryCall(
    -          getChannel().newCall(getDeleteSubjectSetMethod(), getCallOptions()), request);
    -    }
    -
    -    /**
    -     */
    -    public com.google.common.util.concurrent.ListenableFuture listSubjectSets(
    -        io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest request) {
    -      return io.grpc.stub.ClientCalls.futureUnaryCall(
    -          getChannel().newCall(getListSubjectSetsMethod(), getCallOptions()), request);
    -    }
    -
         /**
          * 
          * Find matching Subject Mappings for a given Subject
    @@ -809,17 +504,12 @@ public com.google.common.util.concurrent.ListenableFuture implements
           io.grpc.stub.ServerCalls.UnaryMethod,
    @@ -838,26 +528,6 @@ private static final class MethodHandlers implements
         @java.lang.SuppressWarnings("unchecked")
         public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
           switch (methodId) {
    -        case METHODID_GET_SUBJECT_SET:
    -          serviceImpl.getSubjectSet((io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest) request,
    -              (io.grpc.stub.StreamObserver) responseObserver);
    -          break;
    -        case METHODID_CREATE_SUBJECT_SET:
    -          serviceImpl.createSubjectSet((io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest) request,
    -              (io.grpc.stub.StreamObserver) responseObserver);
    -          break;
    -        case METHODID_UPDATE_SUBJECT_SET:
    -          serviceImpl.updateSubjectSet((io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest) request,
    -              (io.grpc.stub.StreamObserver) responseObserver);
    -          break;
    -        case METHODID_DELETE_SUBJECT_SET:
    -          serviceImpl.deleteSubjectSet((io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest) request,
    -              (io.grpc.stub.StreamObserver) responseObserver);
    -          break;
    -        case METHODID_LIST_SUBJECT_SETS:
    -          serviceImpl.listSubjectSets((io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest) request,
    -              (io.grpc.stub.StreamObserver) responseObserver);
    -          break;
             case METHODID_MATCH_SUBJECT_MAPPINGS:
               serviceImpl.matchSubjectMappings((io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest) request,
                   (io.grpc.stub.StreamObserver) responseObserver);
    @@ -900,41 +570,6 @@ public io.grpc.stub.StreamObserver invoke(
     
       public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
         return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
    -        .addMethod(
    -          getGetSubjectSetMethod(),
    -          io.grpc.stub.ServerCalls.asyncUnaryCall(
    -            new MethodHandlers<
    -              io.opentdf.platform.policy.subjectmapping.GetSubjectSetRequest,
    -              io.opentdf.platform.policy.subjectmapping.GetSubjectSetResponse>(
    -                service, METHODID_GET_SUBJECT_SET)))
    -        .addMethod(
    -          getCreateSubjectSetMethod(),
    -          io.grpc.stub.ServerCalls.asyncUnaryCall(
    -            new MethodHandlers<
    -              io.opentdf.platform.policy.subjectmapping.CreateSubjectSetRequest,
    -              io.opentdf.platform.policy.subjectmapping.CreateSubjectSetResponse>(
    -                service, METHODID_CREATE_SUBJECT_SET)))
    -        .addMethod(
    -          getUpdateSubjectSetMethod(),
    -          io.grpc.stub.ServerCalls.asyncUnaryCall(
    -            new MethodHandlers<
    -              io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest,
    -              io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse>(
    -                service, METHODID_UPDATE_SUBJECT_SET)))
    -        .addMethod(
    -          getDeleteSubjectSetMethod(),
    -          io.grpc.stub.ServerCalls.asyncUnaryCall(
    -            new MethodHandlers<
    -              io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetRequest,
    -              io.opentdf.platform.policy.subjectmapping.DeleteSubjectSetResponse>(
    -                service, METHODID_DELETE_SUBJECT_SET)))
    -        .addMethod(
    -          getListSubjectSetsMethod(),
    -          io.grpc.stub.ServerCalls.asyncUnaryCall(
    -            new MethodHandlers<
    -              io.opentdf.platform.policy.subjectmapping.ListSubjectSetsRequest,
    -              io.opentdf.platform.policy.subjectmapping.ListSubjectSetsResponse>(
    -                service, METHODID_LIST_SUBJECT_SETS)))
             .addMethod(
               getMatchSubjectMappingsMethod(),
               io.grpc.stub.ServerCalls.asyncUnaryCall(
    @@ -1025,11 +660,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
             if (result == null) {
               serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
                   .setSchemaDescriptor(new SubjectMappingServiceFileDescriptorSupplier())
    -              .addMethod(getGetSubjectSetMethod())
    -              .addMethod(getCreateSubjectSetMethod())
    -              .addMethod(getUpdateSubjectSetMethod())
    -              .addMethod(getDeleteSubjectSetMethod())
    -              .addMethod(getListSubjectSetsMethod())
                   .addMethod(getMatchSubjectMappingsMethod())
                   .addMethod(getListSubjectMappingsMethod())
                   .addMethod(getGetSubjectMappingMethod())
    diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSet.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSet.java
    index af9585403b..26020aed18 100644
    --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSet.java
    +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSet.java
    @@ -22,7 +22,6 @@ private SubjectSet(com.google.protobuf.GeneratedMessageV3.Builder builder) {
         super(builder);
       }
       private SubjectSet() {
    -    id_ = "";
         conditionGroups_ = java.util.Collections.emptyList();
       }
     
    @@ -46,73 +45,7 @@ protected java.lang.Object newInstance(
                 io.opentdf.platform.policy.subjectmapping.SubjectSet.class, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder.class);
       }
     
    -  private int bitField0_;
    -  public static final int ID_FIELD_NUMBER = 1;
    -  @SuppressWarnings("serial")
    -  private volatile java.lang.Object id_ = "";
    -  /**
    -   * string id = 1 [json_name = "id"];
    -   * @return The id.
    -   */
    -  @java.lang.Override
    -  public java.lang.String getId() {
    -    java.lang.Object ref = id_;
    -    if (ref instanceof java.lang.String) {
    -      return (java.lang.String) ref;
    -    } else {
    -      com.google.protobuf.ByteString bs = 
    -          (com.google.protobuf.ByteString) ref;
    -      java.lang.String s = bs.toStringUtf8();
    -      id_ = s;
    -      return s;
    -    }
    -  }
    -  /**
    -   * string id = 1 [json_name = "id"];
    -   * @return The bytes for id.
    -   */
    -  @java.lang.Override
    -  public com.google.protobuf.ByteString
    -      getIdBytes() {
    -    java.lang.Object ref = id_;
    -    if (ref instanceof java.lang.String) {
    -      com.google.protobuf.ByteString b = 
    -          com.google.protobuf.ByteString.copyFromUtf8(
    -              (java.lang.String) ref);
    -      id_ = b;
    -      return b;
    -    } else {
    -      return (com.google.protobuf.ByteString) ref;
    -    }
    -  }
    -
    -  public static final int METADATA_FIELD_NUMBER = 2;
    -  private io.opentdf.platform.common.Metadata metadata_;
    -  /**
    -   * .common.Metadata metadata = 2 [json_name = "metadata"];
    -   * @return Whether the metadata field is set.
    -   */
    -  @java.lang.Override
    -  public boolean hasMetadata() {
    -    return ((bitField0_ & 0x00000001) != 0);
    -  }
    -  /**
    -   * .common.Metadata metadata = 2 [json_name = "metadata"];
    -   * @return The metadata.
    -   */
    -  @java.lang.Override
    -  public io.opentdf.platform.common.Metadata getMetadata() {
    -    return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_;
    -  }
    -  /**
    -   * .common.Metadata metadata = 2 [json_name = "metadata"];
    -   */
    -  @java.lang.Override
    -  public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() {
    -    return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_;
    -  }
    -
    -  public static final int CONDITION_GROUPS_FIELD_NUMBER = 3;
    +  public static final int CONDITION_GROUPS_FIELD_NUMBER = 1;
       @SuppressWarnings("serial")
       private java.util.List conditionGroups_;
       /**
    @@ -120,7 +53,7 @@ public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() {
        * The conditions groups describing the matching rules for subjects in the set
        * 
    * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List getConditionGroupsList() { @@ -131,7 +64,7 @@ public java.util.List * The conditions groups describing the matching rules for subjects in the set *
    * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List @@ -143,7 +76,7 @@ public java.util.List * The conditions groups describing the matching rules for subjects in the set *
    * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ @java.lang.Override public int getConditionGroupsCount() { @@ -154,7 +87,7 @@ public int getConditionGroupsCount() { * The conditions groups describing the matching rules for subjects in the set *
    * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGroups(int index) { @@ -165,7 +98,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGrou * The conditions groups describing the matching rules for subjects in the set *
    * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getConditionGroupsOrBuilder( @@ -187,14 +120,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getMetadata()); - } for (int i = 0; i < conditionGroups_.size(); i++) { - output.writeMessage(3, conditionGroups_.get(i)); + output.writeMessage(1, conditionGroups_.get(i)); } getUnknownFields().writeTo(output); } @@ -205,16 +132,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMetadata()); - } for (int i = 0; i < conditionGroups_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, conditionGroups_.get(i)); + .computeMessageSize(1, conditionGroups_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -231,13 +151,6 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.SubjectSet other = (io.opentdf.platform.policy.subjectmapping.SubjectSet) obj; - if (!getId() - .equals(other.getId())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } if (!getConditionGroupsList() .equals(other.getConditionGroupsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -251,12 +164,6 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } if (getConditionGroupsCount() > 0) { hash = (37 * hash) + CONDITION_GROUPS_FIELD_NUMBER; hash = (53 * hash) + getConditionGroupsList().hashCode(); @@ -385,38 +292,25 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.SubjectSet.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - getConditionGroupsFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - id_ = ""; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } if (conditionGroupsBuilder_ == null) { conditionGroups_ = java.util.Collections.emptyList(); } else { conditionGroups_ = null; conditionGroupsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -451,9 +345,9 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet buildPartial() { private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectSet result) { if (conditionGroupsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000001) != 0)) { conditionGroups_ = java.util.Collections.unmodifiableList(conditionGroups_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); } result.conditionGroups_ = conditionGroups_; } else { @@ -463,17 +357,6 @@ private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmappin private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectSet result) { int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -520,19 +403,11 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectSet other) { if (other == io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } if (conditionGroupsBuilder_ == null) { if (!other.conditionGroups_.isEmpty()) { if (conditionGroups_.isEmpty()) { conditionGroups_ = other.conditionGroups_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); } else { ensureConditionGroupsIsMutable(); conditionGroups_.addAll(other.conditionGroups_); @@ -545,7 +420,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectSet ot conditionGroupsBuilder_.dispose(); conditionGroupsBuilder_ = null; conditionGroups_ = other.conditionGroups_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); conditionGroupsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getConditionGroupsFieldBuilder() : null; @@ -581,18 +456,6 @@ public Builder mergeFrom( done = true; break; case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { io.opentdf.platform.policy.subjectmapping.ConditionGroup m = input.readMessage( io.opentdf.platform.policy.subjectmapping.ConditionGroup.parser(), @@ -604,7 +467,7 @@ public Builder mergeFrom( conditionGroupsBuilder_.addMessage(m); } break; - } // case 26 + } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -622,205 +485,12 @@ public Builder mergeFrom( } private int bitField0_; - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.common.Metadata metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> metadataBuilder_; - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.Metadata getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.Metadata.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; - } - } - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.Metadata, io.opentdf.platform.common.Metadata.Builder, io.opentdf.platform.common.MetadataOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - private java.util.List conditionGroups_ = java.util.Collections.emptyList(); private void ensureConditionGroupsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000001) != 0)) { conditionGroups_ = new java.util.ArrayList(conditionGroups_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000001; } } @@ -832,7 +502,7 @@ private void ensureConditionGroupsIsMutable() { * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public java.util.List getConditionGroupsList() { if (conditionGroupsBuilder_ == null) { @@ -846,7 +516,7 @@ public java.util.List * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public int getConditionGroupsCount() { if (conditionGroupsBuilder_ == null) { @@ -860,7 +530,7 @@ public int getConditionGroupsCount() { * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGroups(int index) { if (conditionGroupsBuilder_ == null) { @@ -874,7 +544,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGrou * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public Builder setConditionGroups( int index, io.opentdf.platform.policy.subjectmapping.ConditionGroup value) { @@ -895,7 +565,7 @@ public Builder setConditionGroups( * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public Builder setConditionGroups( int index, io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder builderForValue) { @@ -913,7 +583,7 @@ public Builder setConditionGroups( * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public Builder addConditionGroups(io.opentdf.platform.policy.subjectmapping.ConditionGroup value) { if (conditionGroupsBuilder_ == null) { @@ -933,7 +603,7 @@ public Builder addConditionGroups(io.opentdf.platform.policy.subjectmapping.Cond * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public Builder addConditionGroups( int index, io.opentdf.platform.policy.subjectmapping.ConditionGroup value) { @@ -954,7 +624,7 @@ public Builder addConditionGroups( * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public Builder addConditionGroups( io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder builderForValue) { @@ -972,7 +642,7 @@ public Builder addConditionGroups( * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public Builder addConditionGroups( int index, io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder builderForValue) { @@ -990,7 +660,7 @@ public Builder addConditionGroups( * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public Builder addAllConditionGroups( java.lang.Iterable values) { @@ -1009,12 +679,12 @@ public Builder addAllConditionGroups( * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public Builder clearConditionGroups() { if (conditionGroupsBuilder_ == null) { conditionGroups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { conditionGroupsBuilder_.clear(); @@ -1026,7 +696,7 @@ public Builder clearConditionGroups() { * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public Builder removeConditionGroups(int index) { if (conditionGroupsBuilder_ == null) { @@ -1043,7 +713,7 @@ public Builder removeConditionGroups(int index) { * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder getConditionGroupsBuilder( int index) { @@ -1054,7 +724,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder getCondi * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getConditionGroupsOrBuilder( int index) { @@ -1068,7 +738,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getCond * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public java.util.List getConditionGroupsOrBuilderList() { @@ -1083,7 +753,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getCond * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder addConditionGroupsBuilder() { return getConditionGroupsFieldBuilder().addBuilder( @@ -1094,7 +764,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder addCondi * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder addConditionGroupsBuilder( int index) { @@ -1106,7 +776,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder addCondi * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ public java.util.List getConditionGroupsBuilderList() { @@ -1119,7 +789,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder addCondi conditionGroupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.ConditionGroup, io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder, io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder>( conditionGroups_, - ((bitField0_ & 0x00000004) != 0), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); conditionGroups_ = null; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetCreateUpdate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetCreateUpdate.java deleted file mode 100644 index a86cf27e4a..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetCreateUpdate.java +++ /dev/null @@ -1,954 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.SubjectSetCreateUpdate} - */ -public final class SubjectSetCreateUpdate extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectSetCreateUpdate) - SubjectSetCreateUpdateOrBuilder { -private static final long serialVersionUID = 0L; - // Use SubjectSetCreateUpdate.newBuilder() to construct. - private SubjectSetCreateUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubjectSetCreateUpdate() { - conditionGroups_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubjectSetCreateUpdate(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectSetCreateUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectSetCreateUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder.class); - } - - private int bitField0_; - public static final int METADATA_FIELD_NUMBER = 1; - private io.opentdf.platform.common.MetadataMutable metadata_; - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - * @return The metadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getMetadata() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - - public static final int CONDITION_GROUPS_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private java.util.List conditionGroups_; - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - @java.lang.Override - public java.util.List getConditionGroupsList() { - return conditionGroups_; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - @java.lang.Override - public java.util.List - getConditionGroupsOrBuilderList() { - return conditionGroups_; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - @java.lang.Override - public int getConditionGroupsCount() { - return conditionGroups_.size(); - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGroups(int index) { - return conditionGroups_.get(index); - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getConditionGroupsOrBuilder( - int index) { - return conditionGroups_.get(index); - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getMetadata()); - } - for (int i = 0; i < conditionGroups_.size(); i++) { - output.writeMessage(2, conditionGroups_.get(i)); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMetadata()); - } - for (int i = 0; i < conditionGroups_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, conditionGroups_.get(i)); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate other = (io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate) obj; - - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getConditionGroupsList() - .equals(other.getConditionGroupsList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } - if (getConditionGroupsCount() > 0) { - hash = (37 * hash) + CONDITION_GROUPS_FIELD_NUMBER; - hash = (53 * hash) + getConditionGroupsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.SubjectSetCreateUpdate} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectSetCreateUpdate) - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectSetCreateUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectSetCreateUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - getConditionGroupsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - if (conditionGroupsBuilder_ == null) { - conditionGroups_ = java.util.Collections.emptyList(); - } else { - conditionGroups_ = null; - conditionGroupsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectSetCreateUpdate_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate build() { - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate buildPartial() { - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate result = new io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate result) { - if (conditionGroupsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { - conditionGroups_ = java.util.Collections.unmodifiableList(conditionGroups_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.conditionGroups_ = conditionGroups_; - } else { - result.conditionGroups_ = conditionGroupsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate other) { - if (other == io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance()) return this; - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (conditionGroupsBuilder_ == null) { - if (!other.conditionGroups_.isEmpty()) { - if (conditionGroups_.isEmpty()) { - conditionGroups_ = other.conditionGroups_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureConditionGroupsIsMutable(); - conditionGroups_.addAll(other.conditionGroups_); - } - onChanged(); - } - } else { - if (!other.conditionGroups_.isEmpty()) { - if (conditionGroupsBuilder_.isEmpty()) { - conditionGroupsBuilder_.dispose(); - conditionGroupsBuilder_ = null; - conditionGroups_ = other.conditionGroups_; - bitField0_ = (bitField0_ & ~0x00000002); - conditionGroupsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getConditionGroupsFieldBuilder() : null; - } else { - conditionGroupsBuilder_.addAllMessages(other.conditionGroups_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - io.opentdf.platform.policy.subjectmapping.ConditionGroup m = - input.readMessage( - io.opentdf.platform.policy.subjectmapping.ConditionGroup.parser(), - extensionRegistry); - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.add(m); - } else { - conditionGroupsBuilder_.addMessage(m); - } - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.common.MetadataMutable metadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - * @return The metadata. - */ - public io.opentdf.platform.common.MetadataMutable getMetadata() { - if (metadataBuilder_ == null) { - return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } else { - return metadataBuilder_.getMessage(); - } - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - */ - public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - metadata_ = value; - } else { - metadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - */ - public Builder setMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (metadataBuilder_ == null) { - metadata_ = builderForValue.build(); - } else { - metadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { - if (metadataBuilder_ != null) { - return metadataBuilder_.getMessageOrBuilder(); - } else { - return metadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; - } - } - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getMetadataFieldBuilder() { - if (metadataBuilder_ == null) { - metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getMetadata(), - getParentForChildren(), - isClean()); - metadata_ = null; - } - return metadataBuilder_; - } - - private java.util.List conditionGroups_ = - java.util.Collections.emptyList(); - private void ensureConditionGroupsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - conditionGroups_ = new java.util.ArrayList(conditionGroups_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.ConditionGroup, io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder, io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder> conditionGroupsBuilder_; - - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public java.util.List getConditionGroupsList() { - if (conditionGroupsBuilder_ == null) { - return java.util.Collections.unmodifiableList(conditionGroups_); - } else { - return conditionGroupsBuilder_.getMessageList(); - } - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public int getConditionGroupsCount() { - if (conditionGroupsBuilder_ == null) { - return conditionGroups_.size(); - } else { - return conditionGroupsBuilder_.getCount(); - } - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGroups(int index) { - if (conditionGroupsBuilder_ == null) { - return conditionGroups_.get(index); - } else { - return conditionGroupsBuilder_.getMessage(index); - } - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public Builder setConditionGroups( - int index, io.opentdf.platform.policy.subjectmapping.ConditionGroup value) { - if (conditionGroupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionGroupsIsMutable(); - conditionGroups_.set(index, value); - onChanged(); - } else { - conditionGroupsBuilder_.setMessage(index, value); - } - return this; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public Builder setConditionGroups( - int index, io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder builderForValue) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.set(index, builderForValue.build()); - onChanged(); - } else { - conditionGroupsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public Builder addConditionGroups(io.opentdf.platform.policy.subjectmapping.ConditionGroup value) { - if (conditionGroupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionGroupsIsMutable(); - conditionGroups_.add(value); - onChanged(); - } else { - conditionGroupsBuilder_.addMessage(value); - } - return this; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public Builder addConditionGroups( - int index, io.opentdf.platform.policy.subjectmapping.ConditionGroup value) { - if (conditionGroupsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureConditionGroupsIsMutable(); - conditionGroups_.add(index, value); - onChanged(); - } else { - conditionGroupsBuilder_.addMessage(index, value); - } - return this; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public Builder addConditionGroups( - io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder builderForValue) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.add(builderForValue.build()); - onChanged(); - } else { - conditionGroupsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public Builder addConditionGroups( - int index, io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder builderForValue) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.add(index, builderForValue.build()); - onChanged(); - } else { - conditionGroupsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public Builder addAllConditionGroups( - java.lang.Iterable values) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, conditionGroups_); - onChanged(); - } else { - conditionGroupsBuilder_.addAllMessages(values); - } - return this; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public Builder clearConditionGroups() { - if (conditionGroupsBuilder_ == null) { - conditionGroups_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - conditionGroupsBuilder_.clear(); - } - return this; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public Builder removeConditionGroups(int index) { - if (conditionGroupsBuilder_ == null) { - ensureConditionGroupsIsMutable(); - conditionGroups_.remove(index); - onChanged(); - } else { - conditionGroupsBuilder_.remove(index); - } - return this; - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder getConditionGroupsBuilder( - int index) { - return getConditionGroupsFieldBuilder().getBuilder(index); - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getConditionGroupsOrBuilder( - int index) { - if (conditionGroupsBuilder_ == null) { - return conditionGroups_.get(index); } else { - return conditionGroupsBuilder_.getMessageOrBuilder(index); - } - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public java.util.List - getConditionGroupsOrBuilderList() { - if (conditionGroupsBuilder_ != null) { - return conditionGroupsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(conditionGroups_); - } - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder addConditionGroupsBuilder() { - return getConditionGroupsFieldBuilder().addBuilder( - io.opentdf.platform.policy.subjectmapping.ConditionGroup.getDefaultInstance()); - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder addConditionGroupsBuilder( - int index) { - return getConditionGroupsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.subjectmapping.ConditionGroup.getDefaultInstance()); - } - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - public java.util.List - getConditionGroupsBuilderList() { - return getConditionGroupsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.ConditionGroup, io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder, io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder> - getConditionGroupsFieldBuilder() { - if (conditionGroupsBuilder_ == null) { - conditionGroupsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.ConditionGroup, io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder, io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder>( - conditionGroups_, - ((bitField0_ & 0x00000002) != 0), - getParentForChildren(), - isClean()); - conditionGroups_ = null; - } - return conditionGroupsBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.SubjectSetCreateUpdate) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectSetCreateUpdate) - private static final io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate(); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubjectSetCreateUpdate parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetCreateUpdateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetCreateUpdateOrBuilder.java deleted file mode 100644 index 8bc1fd82c4..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetCreateUpdateOrBuilder.java +++ /dev/null @@ -1,49 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface SubjectSetCreateUpdateOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectSetCreateUpdate) - com.google.protobuf.MessageOrBuilder { - - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.MetadataMutable getMetadata(); - /** - * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); - - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - java.util.List - getConditionGroupsList(); - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGroups(int index); - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - int getConditionGroupsCount(); - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - java.util.List - getConditionGroupsOrBuilderList(); - /** - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 2 [json_name = "conditionGroups"]; - */ - io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getConditionGroupsOrBuilder( - int index); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetOrBuilder.java index 2310dc47ac..a8ef73a1cd 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectSetOrBuilder.java @@ -8,39 +8,12 @@ public interface SubjectSetOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectSet) com.google.protobuf.MessageOrBuilder { - /** - * string id = 1 [json_name = "id"]; - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.Metadata getMetadata(); - /** - * .common.Metadata metadata = 2 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); - /** *
        * The conditions groups describing the matching rules for subjects in the set
        * 
    * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ java.util.List getConditionGroupsList(); @@ -49,7 +22,7 @@ public interface SubjectSetOrBuilder extends * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGroups(int index); /** @@ -57,7 +30,7 @@ public interface SubjectSetOrBuilder extends * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ int getConditionGroupsCount(); /** @@ -65,7 +38,7 @@ public interface SubjectSetOrBuilder extends * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ java.util.List getConditionGroupsOrBuilderList(); @@ -74,7 +47,7 @@ public interface SubjectSetOrBuilder extends * The conditions groups describing the matching rules for subjects in the set * * - * repeated .policy.subjectmapping.ConditionGroup condition_groups = 3 [json_name = "conditionGroups", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } */ io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getConditionGroupsOrBuilder( int index); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetRequest.java deleted file mode 100644 index 468a110742..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetRequest.java +++ /dev/null @@ -1,735 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectSetRequest} - */ -public final class UpdateSubjectSetRequest extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectSetRequest) - UpdateSubjectSetRequestOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateSubjectSetRequest.newBuilder() to construct. - private UpdateSubjectSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateSubjectSetRequest() { - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateSubjectSetRequest(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest.Builder.class); - } - - private int bitField0_; - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBJECT_SET_FIELD_NUMBER = 2; - private io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate subjectSet_; - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return Whether the subjectSet field is set. - */ - @java.lang.Override - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return The subjectSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate getSubjectSet() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance() : subjectSet_; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder getSubjectSetOrBuilder() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance() : subjectSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getSubjectSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSubjectSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest) obj; - - if (!getId() - .equals(other.getId())) return false; - if (hasSubjectSet() != other.hasSubjectSet()) return false; - if (hasSubjectSet()) { - if (!getSubjectSet() - .equals(other.getSubjectSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - if (hasSubjectSet()) { - hash = (37 * hash) + SUBJECT_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectSetRequest} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectSetRequest) - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - id_ = ""; - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetRequest_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest build() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest buildPartial() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.subjectSet_ = subjectSetBuilder_ == null - ? subjectSet_ - : subjectSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest other) { - if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasSubjectSet()) { - mergeSubjectSet(other.getSubjectSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - id_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getSubjectSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private java.lang.Object id_ = ""; - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - public com.google.protobuf.ByteString - getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return This builder for chaining. - */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate subjectSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder> subjectSetBuilder_; - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return Whether the subjectSet field is set. - */ - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return The subjectSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate getSubjectSet() { - if (subjectSetBuilder_ == null) { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance() : subjectSet_; - } else { - return subjectSetBuilder_.getMessage(); - } - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public Builder setSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate value) { - if (subjectSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectSet_ = value; - } else { - subjectSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public Builder setSubjectSet( - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder builderForValue) { - if (subjectSetBuilder_ == null) { - subjectSet_ = builderForValue.build(); - } else { - subjectSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public Builder mergeSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate value) { - if (subjectSetBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - subjectSet_ != null && - subjectSet_ != io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance()) { - getSubjectSetBuilder().mergeFrom(value); - } else { - subjectSet_ = value; - } - } else { - subjectSetBuilder_.mergeFrom(value); - } - if (subjectSet_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public Builder clearSubjectSet() { - bitField0_ = (bitField0_ & ~0x00000002); - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder getSubjectSetBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getSubjectSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder getSubjectSetOrBuilder() { - if (subjectSetBuilder_ != null) { - return subjectSetBuilder_.getMessageOrBuilder(); - } else { - return subjectSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.getDefaultInstance() : subjectSet_; - } - } - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder> - getSubjectSetFieldBuilder() { - if (subjectSetBuilder_ == null) { - subjectSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder>( - getSubjectSet(), - getParentForChildren(), - isClean()); - subjectSet_ = null; - } - return subjectSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectSetRequest) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectSetRequest) - private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest(); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateSubjectSetRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetRequestOrBuilder.java deleted file mode 100644 index ec4ec352fd..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetRequestOrBuilder.java +++ /dev/null @@ -1,37 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface UpdateSubjectSetRequestOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectSetRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The id. - */ - java.lang.String getId(); - /** - * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } - * @return The bytes for id. - */ - com.google.protobuf.ByteString - getIdBytes(); - - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return Whether the subjectSet field is set. - */ - boolean hasSubjectSet(); - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - * @return The subjectSet. - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdate getSubjectSet(); - /** - * .policy.subjectmapping.SubjectSetCreateUpdate subject_set = 2 [json_name = "subjectSet", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetCreateUpdateOrBuilder getSubjectSetOrBuilder(); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetResponse.java deleted file mode 100644 index a8a68eb608..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetResponse.java +++ /dev/null @@ -1,599 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -/** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectSetResponse} - */ -public final class UpdateSubjectSetResponse extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectSetResponse) - UpdateSubjectSetResponseOrBuilder { -private static final long serialVersionUID = 0L; - // Use UpdateSubjectSetResponse.newBuilder() to construct. - private UpdateSubjectSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private UpdateSubjectSetResponse() { - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new UpdateSubjectSetResponse(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse.Builder.class); - } - - private int bitField0_; - public static final int SUBJECT_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectSet subjectSet_; - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - @java.lang.Override - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder() { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - - private byte memoizedIsInitialized = -1; - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectSet()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectSet()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse) obj; - - if (hasSubjectSet() != other.hasSubjectSet()) return false; - if (hasSubjectSet()) { - if (!getSubjectSet() - .equals(other.getSubjectSet())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectSet()) { - hash = (37 * hash) + SUBJECT_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSet().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input, extensionRegistry); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE - ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * Protobuf type {@code policy.subjectmapping.UpdateSubjectSetResponse} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectSetResponse) - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectSetFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectSetResponse_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse build() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse buildPartial() { - io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse(this); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectSet_ = subjectSetBuilder_ == null - ? subjectSet_ - : subjectSetBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.setField(field, value); - } - @java.lang.Override - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - @java.lang.Override - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return super.addRepeatedField(field, value); - } - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse other) { - if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectSet()) { - mergeSubjectSet(other.getSubjectSet()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - input.readMessage( - getSubjectSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - default: { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - private int bitField0_; - - private io.opentdf.platform.policy.subjectmapping.SubjectSet subjectSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> subjectSetBuilder_; - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - public boolean hasSubjectSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet() { - if (subjectSetBuilder_ == null) { - return subjectSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } else { - return subjectSetBuilder_.getMessage(); - } - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder setSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectSet_ = value; - } else { - subjectSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder setSubjectSet( - io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetBuilder_ == null) { - subjectSet_ = builderForValue.build(); - } else { - subjectSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder mergeSubjectSet(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectSet_ != null && - subjectSet_ != io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()) { - getSubjectSetBuilder().mergeFrom(value); - } else { - subjectSet_ = value; - } - } else { - subjectSetBuilder_.mergeFrom(value); - } - if (subjectSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public Builder clearSubjectSet() { - bitField0_ = (bitField0_ & ~0x00000001); - subjectSet_ = null; - if (subjectSetBuilder_ != null) { - subjectSetBuilder_.dispose(); - subjectSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder() { - if (subjectSetBuilder_ != null) { - return subjectSetBuilder_.getMessageOrBuilder(); - } else { - return subjectSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance() : subjectSet_; - } - } - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> - getSubjectSetFieldBuilder() { - if (subjectSetBuilder_ == null) { - subjectSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( - getSubjectSet(), - getParentForChildren(), - isClean()); - subjectSet_ = null; - } - return subjectSetBuilder_; - } - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.UpdateSubjectSetResponse) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectSetResponse) - private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse(); - } - - public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateSubjectSetResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.UpdateSubjectSetResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetResponseOrBuilder.java deleted file mode 100644 index a17d038861..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectSetResponseOrBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: policy/subjectmapping/subject_mapping.proto - -// Protobuf Java Version: 3.25.3 -package io.opentdf.platform.policy.subjectmapping; - -public interface UpdateSubjectSetResponseOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectSetResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return Whether the subjectSet field is set. - */ - boolean hasSubjectSet(); - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - * @return The subjectSet. - */ - io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSet(); - /** - * .policy.subjectmapping.SubjectSet subject_set = 1 [json_name = "subjectSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetOrBuilder(); -} From 29ff2985036f57c63f238ea5369fcf234c1180d7 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Fri, 1 Mar 2024 11:20:31 -0500 Subject: [PATCH 8/9] clarify migration up logs, add new tables, fixtures, and provisioning --- cmd/migrate.go | 4 +- integration/subject_mappings_test.go | 38 ++++- internal/db/db.go | 42 +++--- internal/fixtures/fixtures.go | 84 +++++++++-- internal/fixtures/fixtures.yaml | 131 +++++++++++++++--- ...40228000000_add_subject_condition_sets.sql | 12 +- services/authorization/authorization.go | 28 ++-- services/policy/db/subject_mappings.go | 4 +- .../policy/subjectmapping/subject_mapping.go | 23 --- 9 files changed, 278 insertions(+), 88 deletions(-) diff --git a/cmd/migrate.go b/cmd/migrate.go index 44f198ee1d..b0f95003ff 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -40,11 +40,11 @@ var ( panic(fmt.Errorf("could not load config: %w", err)) } - res, err := dbClient.RunMigrations(cmd.Context()) + count, err := dbClient.RunMigrations(cmd.Context()) if err != nil { panic(fmt.Errorf("migration up failed: %w", err)) } - fmt.Print("migration up applied: ", slog.Any("res", res)) + fmt.Print("migration up applied: ", slog.Any("versions up", count)) }, } ) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index 06d2ee199b..ebd497004f 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -44,8 +44,22 @@ func (s *SubjectMappingsSuite) Test_CreateSubjectMapping() { mapping := &subjectmapping.SubjectMappingCreateUpdate{ AttributeValueId: attrValue.Id, Metadata: metadata, - SubjectSetIds: []string{"subject_attribute--test"}, - Actions: []*authorization.Action{}, + SubjectSets: []*subjectmapping.SubjectSet{ + { + ConditionGroups: []*subjectmapping.ConditionGroup{ + { + Conditions: []*subjectmapping.Condition{ + { + SubjectExternalField: "Department", + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, + SubjectExternalValues: []string{"Marketing", "Sales"}, + }, + }, + }, + }, + }, + }, + Actions: []*authorization.Action{}, } createdMapping, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, mapping) assert.Nil(s.T(), err) @@ -57,9 +71,23 @@ func (s *SubjectMappingsSuite) Test_GetSubjectMapping() { attrValue := s.f.GetAttributeValueKey("example.com/attr/attr1/value/value1") mapping := &subjectmapping.SubjectMappingCreateUpdate{ AttributeValueId: attrValue.Id, - SubjectSetIds: []string{"subject_attribute--test"}, - Actions: []*authorization.Action{}, - Metadata: &common.MetadataMutable{}, + SubjectSets: []*subjectmapping.SubjectSet{ + { + ConditionGroups: []*subjectmapping.ConditionGroup{ + { + Conditions: []*subjectmapping.Condition{ + { + SubjectExternalField: "usernames", + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, + SubjectExternalValues: []string{"hello@world.com", "tonystark@avengers.gov"}, + }, + }, + }, + }, + }, + }, + Actions: []*authorization.Action{}, + Metadata: &common.MetadataMutable{}, } createdMapping, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, mapping) assert.Nil(s.T(), err) diff --git a/internal/db/db.go b/internal/db/db.go index 672a336172..8f9cdc075e 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -13,27 +13,31 @@ import ( ) var ( - TableAttributes = "attribute_definitions" - TableAttributeValues = "attribute_values" - TableNamespaces = "attribute_namespaces" - TableAttrFqn = "attribute_fqns" - TableKeyAccessServerRegistry = "key_access_servers" - TableAttributeKeyAccessGrants = "attribute_definition_key_access_grants" - TableAttributeValueKeyAccessGrants = "attribute_value_key_access_grants" - TableResourceMappings = "resource_mappings" - TableSubjectMappings = "subject_mappings" + TableAttributes = "attribute_definitions" + TableAttributeValues = "attribute_values" + TableNamespaces = "attribute_namespaces" + TableAttrFqn = "attribute_fqns" + TableKeyAccessServerRegistry = "key_access_servers" + TableAttributeKeyAccessGrants = "attribute_definition_key_access_grants" + TableAttributeValueKeyAccessGrants = "attribute_value_key_access_grants" + TableResourceMappings = "resource_mappings" + TableSubjectMappings = "subject_mappings" + TableSubjectMappingConditionSetPivot = "subject_mapping_condition_set_pivot" + TableSubjectConditionSet = "subject_condition_set" ) var Tables struct { - Attributes Table - AttributeValues Table - Namespaces Table - AttrFqn Table - KeyAccessServerRegistry Table - AttributeKeyAccessGrants Table - AttributeValueKeyAccessGrants Table - ResourceMappings Table - SubjectMappings Table + Attributes Table + AttributeValues Table + Namespaces Table + AttrFqn Table + KeyAccessServerRegistry Table + AttributeKeyAccessGrants Table + AttributeValueKeyAccessGrants Table + ResourceMappings Table + SubjectMappings Table + SubjectMappingConditionSetPivot Table + SubjectConditionSet Table } type Table struct { @@ -109,6 +113,8 @@ func NewClient(config Config) (*Client, error) { Tables.AttributeValueKeyAccessGrants = NewTable(TableAttributeValueKeyAccessGrants, config.Schema) Tables.ResourceMappings = NewTable(TableResourceMappings, config.Schema) Tables.SubjectMappings = NewTable(TableSubjectMappings, config.Schema) + Tables.SubjectMappingConditionSetPivot = NewTable(TableSubjectMappingConditionSetPivot, config.Schema) + Tables.SubjectConditionSet = NewTable(TableSubjectConditionSet, config.Schema) return &Client{ Pgx: pool, diff --git a/internal/fixtures/fixtures.go b/internal/fixtures/fixtures.go index 8ee1a0a406..f2eb9ce07c 100644 --- a/internal/fixtures/fixtures.go +++ b/internal/fixtures/fixtures.go @@ -53,11 +53,33 @@ type FixtureDataAttributeValueKeyAccessServer struct { } 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"` + Id string `yaml:"id"` + AttributeValueId string `yaml:"attribute_value_id"` + Actions []string `yaml:"actions"` + SubjectConditionSetPivotIds []string `yaml:"subject_condition_set_pivot_ids"` +} + +type FixtureSubjectMappingConditionSetPivot struct { + Id string `yaml:"id"` + SubjectMappingId string `yaml:"subject_mapping_id"` + SubjectConditionSetId string `yaml:"subject_condition_set_id"` +} + +type SubjectConditionSet struct { + Id string `yaml:"id"` + Name string `yaml:"name"` + Condition struct { + SubjectSets []struct { + ConditionGroups []struct { + BooleanOperator string `yaml:"boolean_operator" json:"boolean_operator"` + Conditions []struct { + SubjectExternalField string `yaml:"subject_external_field" json:"subject_external_field"` + Operator string `yaml:"operator" json:"operator"` + SubjectExternalValues []string `yaml:"subject_external_values" json:"subject_external_values"` + } `yaml:"conditions" json:"conditions"` + } `yaml:"condition_groups" json:"condition_groups"` + } `yaml:"subject_sets" json:"subject_sets"` + } `yaml:"condition" json:"condition"` } type FixtureDataResourceMapping struct { @@ -94,6 +116,14 @@ type FixtureData struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]FixtureDataSubjectMapping `yaml:"data"` } `yaml:"subject_mappings"` + SubjectMappingConditionSetPivot struct { + Metadata FixtureMetadata `yaml:"metadata"` + Data map[string]FixtureSubjectMappingConditionSetPivot `yaml:"data"` + } `yaml:"subject_mapping_condition_set_pivot"` + SubjectConditionSet struct { + Metadata FixtureMetadata `yaml:"metadata"` + Data map[string]SubjectConditionSet `yaml:"data"` + } `yaml:"subject_condition_set"` ResourceMappings struct { Metadata FixtureMetadata `yaml:"metadata"` Data map[string]FixtureDataResourceMapping `yaml:"data"` @@ -191,6 +221,10 @@ func (f *Fixtures) Provision() { aV := f.provisionAttributeValues() slog.Info("📦 provisioning subject mapping data") sM := f.provisionSubjectMappings() + slog.Info("📦 provisioning subject condition set data") + sc := f.provisionSubjectConditionSet() + slog.Info("📦 provisioning subject mapping condition set pivot data") + smPivot := f.provisionSubjectMappingConditionSetPivot() slog.Info("📦 provisioning resource mapping data") rM := f.provisionResourceMappings() slog.Info("📦 provisioning kas registry data") @@ -205,6 +239,8 @@ func (f *Fixtures) Provision() { slog.Int64("attributes", a), slog.Int64("attribute_values", aV), slog.Int64("subject_mappings", sM), + slog.Int64("subject_mapping_condition_set_pivot", smPivot), + slog.Int64("subject_condition_set", sc), slog.Int64("resource_mappings", rM), slog.Int64("kas_registry", kas), slog.Int64("attribute_key_access_server", akas), @@ -271,14 +307,46 @@ func (f *Fixtures) provisionSubjectMappings() int64 { 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), + f.db.StringArrayWrap(d.Actions), + f.db.UUIDArrayWrap(d.SubjectConditionSetPivotIds), }) } return f.provision(fixtureData.SubjectMappings.Metadata.TableName, fixtureData.SubjectMappings.Metadata.Columns, values) } +func (f *Fixtures) provisionSubjectMappingConditionSetPivot() int64 { + values := make([][]string, 0, len(fixtureData.SubjectMappingConditionSetPivot.Data)) + for _, d := range fixtureData.SubjectMappingConditionSetPivot.Data { + values = append(values, []string{ + f.db.StringWrap(d.Id), + f.db.StringWrap(d.SubjectMappingId), + f.db.StringWrap(d.SubjectConditionSetId), + }) + } + return f.provision(fixtureData.SubjectMappingConditionSetPivot.Metadata.TableName, fixtureData.SubjectMappingConditionSetPivot.Metadata.Columns, values) +} + +func (f *Fixtures) provisionSubjectConditionSet() int64 { + values := make([][]string, 0, len(fixtureData.SubjectConditionSet.Data)) + for _, d := range fixtureData.SubjectConditionSet.Data { + var conditionJSON []byte + conditionJSON, err := json.Marshal(d.Condition) + if err != nil { + slog.Error("⛔️ 📦 issue with subject condition set JSON - check fixtures.yaml for issues") + panic("issue with subject condition set JSON") + } + + fmt.Println("HERE CONDITION JSON", string(conditionJSON)) + + values = append(values, []string{ + f.db.StringWrap(d.Id), + f.db.StringWrap(d.Name), + f.db.StringWrap(string(conditionJSON)), + }) + } + return f.provision(fixtureData.SubjectConditionSet.Metadata.TableName, fixtureData.SubjectConditionSet.Metadata.Columns, values) +} + func (f *Fixtures) provisionResourceMappings() int64 { values := make([][]string, 0, len(fixtureData.ResourceMappings.Data)) for _, d := range fixtureData.ResourceMappings.Data { diff --git a/internal/fixtures/fixtures.yaml b/internal/fixtures/fixtures.yaml index 6676997ef5..3b94b12d28 100644 --- a/internal/fixtures/fixtures.yaml +++ b/internal/fixtures/fixtures.yaml @@ -172,9 +172,7 @@ attribute_value_key_access_servers: key_access_server_id: e36640a6-61c5-4d4c-a45b-0e0a26d1c45f ## -# Subject Mappings -# -# Operator Enum: UNSPECIFIED, IN, NOT_IN +# Subject Mappings < pivot > Subject Condition Sets ## subject_mappings: metadata: @@ -182,28 +180,127 @@ subject_mappings: columns: - id - attribute_value_id - - operator - - subject_attribute - - subject_attribute_values + - actions + - subject_condition_set_pivot_ids data: subject_mapping_subject_attribute1: id: 812fab35-9aa4-4e73-bf22-c96638d58ea4 attribute_value_id: 74babca6-016f-4f3e-a99b-4e46ea8d0fd8 - operator: IN - subject_attribute: subject_attribute1 - subject_attribute_values: - - value1 - - value2 + actions: + - DECRYPT + subject_condition_set_pivot_ids: + # subject_mapping_subject_attribute1__pivot__subject_condition_set1 + - da97fc49-dc96-499a-8f8c-c14f8a7954b9 subject_mapping_subject_attribute2: id: e6a3f940-e24f-4383-8763-718a1a304948 attribute_value_id: 2fe8dea1-3555-498c-afe9-99724f35f3d3 - operator: NOT_IN - subject_attribute: subject_attribute2 - subject_attribute_values: - - value1 - - value2 - - value3 + actions: + - TRANSMIT + - DECRYPT + subject_condition_set_pivot_ids: + # subject_mapping_subject_attribute2__pivot__subject_condition_set2: + - c114c393-bde5-4015-9c7f-a9679a83ae91 + # subject_mapping_subject_attribute2__pivot__subject_condition_set3: + - b5653d5f-c694-474d-88bf-ec0978afff5b + +subject_mapping_condition_set_pivot: + metadata: + table_name: subject_mapping_condition_set_pivot + columns: + - id + - subject_mapping_id + - subject_condition_set_id + data: + subject_mapping_subject_attribute1__pivot__subject_condition_set1: + id: da97fc49-dc96-499a-8f8c-c14f8a7954b9 + subject_mapping_id: 812fab35-9aa4-4e73-bf22-c96638d58ea4 + subject_condition_set_id: b3903282-06f9-41a4-924a-7b8eb43dffe0 + subject_mapping_subject_attribute2__pivot__subject_condition_set2: + id: c114c393-bde5-4015-9c7f-a9679a83ae91 + subject_mapping_id: e6a3f940-e24f-4383-8763-718a1a304948 + subject_condition_set_id: 798aacd2-abaf-4623-975e-3bb8ca43e318 + subject_mapping_subject_attribute2__pivot__subject_condition_set3: + id: b5653d5f-c694-474d-88bf-ec0978afff5b + subject_mapping_id: e6a3f940-e24f-4383-8763-718a1a304948 + subject_condition_set_id: eaf866c0-327f-4826-846a-5041c3c22f06 + +subject_condition_set: + metadata: + table_name: subject_condition_set + columns: + - id + - name + - condition + data: + subject_condition_set1: + id: b3903282-06f9-41a4-924a-7b8eb43dffe0 + name: avenger_hammer_wielders + # marshaled into json from protos + condition: + subject_sets: + - condition_groups: + - boolean_operator: AND + conditions: + - subject_external_field: superhero_name + operator: IN + subject_external_values: + - thor + - captain_america + - subject_external_field: superhero_group + operator: IN + subject_external_values: + - avengers + subject_condition_set2: + id: 798aacd2-abaf-4623-975e-3bb8ca43e318 + name: sales_and_marketing_executives + # marshaled into json from protos + condition: + subject_sets: + - condition_groups: + - boolean_operator: AND + conditions: + - subject_external_field: department + operator: IN + subject_external_values: + - marketing + - sales + - subject_external_field: role + operator: IN + subject_external_values: + - senior_vice_president + - vice_president + - director + subject_condition_set3: + id: eaf866c0-327f-4826-846a-5041c3c22f06 + name: engineering_non_managers_who_like_soccer_or_not_ice_cream + # marshaled into json from protos + condition: + subject_sets: + - condition_groups: + - boolean_operator: OR + conditions: + - subject_external_field: fave_sport + operator: IN + subject_external_values: + - futbol + - soccer + - subject_external_field: face_dessert + operator: NOT_IN + subject_external_values: + - ice_cream + - boolean_operator: AND + conditions: + - subject_external_field: department + operator: IN + subject_external_values: + - engineering + - subject_external_field: role + operator: NOT_IN + subject_external_values: + - manager + - director + - vice_president ## # Resource Mappings diff --git a/migrations/20240228000000_add_subject_condition_sets.sql b/migrations/20240228000000_add_subject_condition_sets.sql index 5c367c2e6e..92d1ddaad2 100644 --- a/migrations/20240228000000_add_subject_condition_sets.sql +++ b/migrations/20240228000000_add_subject_condition_sets.sql @@ -4,19 +4,25 @@ CREATE TABLE IF NOT EXISTS subject_condition_set ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), name VARCHAR UNIQUE, + metadata JSONB, condition JSONB NOT NULL ); CREATE TABLE IF NOT EXISTS subject_mapping_condition_set_pivot ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), subject_mapping_id UUID REFERENCES subject_mappings(id) ON DELETE CASCADE, - subject_condition_set_id UUID + subject_condition_set_id UUID, + UNIQUE (subject_mapping_id, subject_condition_set_id) ); ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_pivot_ids UUID[], ADD COLUMN actions VARCHAR[]; WITH subject_mappings_migration_data AS ( SELECT + JSON_BUILD_OBJECT( + 'created_at', metadata::json->'created_at', + 'updated_at', metadata::json->'updated_at' + ) AS metadata, JSON_BUILD_OBJECT( 'subject_sets', JSON_BUILD_ARRAY( @@ -48,8 +54,8 @@ pivot_insert AS ( ), -- populate the condition set table insert_subject_condition_set AS ( - INSERT INTO subject_condition_set(condition, id) - SELECT condition_json, subject_condition_set_id + INSERT INTO subject_condition_set(metadata, condition, id) + SELECT metadata, condition_json, subject_condition_set_id FROM subject_mappings_migration_data JOIN pivot_insert ON subject_mappings_migration_data.sm_id = pivot_insert.subject_mapping_id ) -- populate the subject_mappings column with the new pivot id diff --git a/services/authorization/authorization.go b/services/authorization/authorization.go index 2a275ae2a8..e6ff4e4531 100644 --- a/services/authorization/authorization.go +++ b/services/authorization/authorization.go @@ -83,18 +83,26 @@ func (as AuthorizationService) GetDecisions(ctx context.Context, req *authorizat func (as AuthorizationService) GetEntitlements(ctx context.Context, req *authorization.GetEntitlementsRequest) (*authorization.GetEntitlementsResponse, error) { slog.Debug("getting entitlements") // get subject mappings - smc := subjectmapping.NewSubjectMappingServiceClient(as.cc) - ins := subjectmapping.GetSubjectSetRequest{ - Id: "abc", - } - out, err := smc.GetSubjectSet(ctx, &ins) - if err != nil { - slog.ErrorContext(ctx, err.Error()) - return nil, err + // smc := subjectmapping.NewSubjectMappingServiceClient(as.cc) + subjectSets := []*subjectmapping.SubjectSet{ + { + ConditionGroups: []*subjectmapping.ConditionGroup{ + { + Conditions: []*subjectmapping.Condition{ + { + SubjectExternalField: "Department", + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, + SubjectExternalValues: []string{"Marketing", "Sales"}, + }, + }, + }, + }, + }, } - slog.InfoContext(ctx, out.String()) + + slog.InfoContext(ctx, "retrieved from subject mappings service", slog.Any("subjectSets: ", subjectSets)) // OPA - in, err := entitlements.OpaInput(req.Entities[0], out.SubjectSet) + in, err := entitlements.OpaInput(req.Entities[0], subjectSets[0]) if err != nil { return nil, err } diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 36310df53f..94aecdb056 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -2,9 +2,10 @@ package db import ( "context" - "github.com/opentdf/platform/protocol/go/authorization" "strings" + "github.com/opentdf/platform/protocol/go/authorization" + sq "github.com/Masterminds/squirrel" "github.com/jackc/pgx/v5" "github.com/opentdf/platform/internal/db" @@ -92,7 +93,6 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err s.Actions = append(s.Actions, &authorization.Action{}) // add subjectAttributeValues s.SubjectSets = append(s.SubjectSets, &subjectmapping.SubjectSet{ - Id: subjectAttribute, ConditionGroups: make([]*subjectmapping.ConditionGroup, 0), }) diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index d749be582b..952eb161ea 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -104,26 +104,3 @@ func (s SubjectMappingService) DeleteSubjectMapping(ctx context.Context, return rsp, nil } - -func (s SubjectMappingService) GetSubjectSet(ctx context.Context, req *sm.GetSubjectSetRequest) (*sm.GetSubjectSetResponse, error) { - // TODO replace mock below with database connection, add fixture - slog.DebugContext(ctx, "GetSubjectSet", "id", req.Id) - ssr := sm.GetSubjectSetResponse{ - SubjectSet: &sm.SubjectSet{ - Id: req.Id, - ConditionGroups: make([]*sm.ConditionGroup, 0), - }, - } - var cg = sm.ConditionGroup{ - BooleanType: sm.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_AND, - Conditions: []*sm.Condition{ - { - SubjectAttribute: "https://example.com/attr/attr1/value/value1", - Operator: sm.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, - SubjectValues: []string{"ec11"}, - }, - }, - } - ssr.SubjectSet.ConditionGroups = append(ssr.SubjectSet.ConditionGroups, &cg) - return &ssr, nil -} From f4040798fc4bc4ad9bac422020fddfc752cd8033 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Fri, 1 Mar 2024 11:54:35 -0500 Subject: [PATCH 9/9] use slog instead of fmt reporting on migration down --- internal/db/db_migration.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/db/db_migration.go b/internal/db/db_migration.go index 841cf5b44a..d05cf13c5c 100644 --- a/internal/db/db_migration.go +++ b/internal/db/db_migration.go @@ -100,7 +100,7 @@ func (c *Client) MigrationDown(ctx context.Context) error { if e != nil { return errors.Join(fmt.Errorf("failed to get current version"), e) } - fmt.Printf("Current DB version: %d. Migrating one down to %d.\n", v, v-1) + slog.Info("DB Info: ", slog.Any("current version", v), slog.Any("post-migration version", v-1)) res, err := provider.Down(context.Background()) if err != nil {