From e7a7300f8c86d2ed65e3e895c6f4d2b5fd693455 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Fri, 1 Mar 2024 12:56:12 -0500 Subject: [PATCH 01/39] remove unused function tableName from db package --- internal/db/db.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/internal/db/db.go b/internal/db/db.go index 8f9cdc075e..b971d35137 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -194,7 +194,3 @@ func (c Client) Exec(ctx context.Context, sql string, args []interface{}, err er func NewStatementBuilder() sq.StatementBuilderType { return sq.StatementBuilder.PlaceholderFormat(sq.Dollar) } - -func tableName(table string) string { - return table -} From 810a9baead384058d9f04e0e3844ac8e8595e4a0 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Fri, 1 Mar 2024 13:51:34 -0500 Subject: [PATCH 02/39] new protos and gen code/docs --- docs/grpc/index.html | 571 ++++- .../subject_mapping.swagger.json | 320 ++- .../subjectmapping/subject_mapping.pb.go | 2003 +++++++++++++---- .../subjectmapping/subject_mapping.pb.gw.go | 479 ++++ .../subjectmapping/subject_mapping_grpc.pb.go | 197 +- .../policy/subjectmapping/Condition.java | 40 +- .../policy/subjectmapping/ConditionGroup.java | 4 +- .../subjectmapping/ConditionOrBuilder.java | 12 +- .../CreateSubjectConditionSetRequest.java | 599 +++++ ...teSubjectConditionSetRequestOrBuilder.java | 25 + .../CreateSubjectConditionSetResponse.java | 599 +++++ ...eSubjectConditionSetResponseOrBuilder.java | 25 + .../CreateSubjectMappingRequest.java | 60 +- .../CreateSubjectMappingRequestOrBuilder.java | 10 +- .../DeleteSubjectConditionSetRequest.java | 542 +++++ ...teSubjectConditionSetRequestOrBuilder.java | 22 + .../DeleteSubjectConditionSetResponse.java | 599 +++++ ...eSubjectConditionSetResponseOrBuilder.java | 25 + .../GetSubjectConditionSetRequest.java | 542 +++++ ...etSubjectConditionSetRequestOrBuilder.java | 22 + .../GetSubjectConditionSetResponse.java | 1046 +++++++++ ...tSubjectConditionSetResponseOrBuilder.java | 69 + .../ListSubjectConditionSetsRequest.java | 399 ++++ ...tSubjectConditionSetsRequestOrBuilder.java | 10 + .../ListSubjectConditionSetsResponse.java | 760 +++++++ ...SubjectConditionSetsResponseOrBuilder.java | 34 + .../subjectmapping/SubjectConditionSet.java | 1358 +++++++++++ ...te.java => SubjectConditionSetCreate.java} | 759 ++----- .../SubjectConditionSetCreateOrBuilder.java | 89 + .../SubjectConditionSetOrBuilder.java | 101 + .../SubjectConditionSetUpdate.java | 1046 +++++++++ .../SubjectConditionSetUpdateOrBuilder.java | 69 + .../policy/subjectmapping/SubjectMapping.java | 412 ++-- .../subjectmapping/SubjectMappingCreate.java | 1894 ++++++++++++++++ .../SubjectMappingCreateOrBuilder.java | 174 ++ .../SubjectMappingCreateUpdateOrBuilder.java | 133 -- .../SubjectMappingOrBuilder.java | 40 +- .../subjectmapping/SubjectMappingProto.java | 443 +++- .../SubjectMappingServiceGrpc.java | 370 +++ .../subjectmapping/SubjectMappingUpdate.java | 1287 +++++++++++ .../SubjectMappingUpdateOrBuilder.java | 110 + .../policy/subjectmapping/SubjectSet.java | 52 +- .../subjectmapping/SubjectSetOrBuilder.java | 10 +- .../UpdateSubjectConditionSetRequest.java | 735 ++++++ ...teSubjectConditionSetRequestOrBuilder.java | 37 + .../UpdateSubjectConditionSetResponse.java | 599 +++++ ...eSubjectConditionSetResponseOrBuilder.java | 25 + .../UpdateSubjectMappingRequest.java | 60 +- .../UpdateSubjectMappingRequestOrBuilder.java | 10 +- .../subjectmapping/subject_mapping.proto | 161 +- 50 files changed, 17301 insertions(+), 1687 deletions(-) create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSet.java rename sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/{SubjectMappingCreateUpdate.java => SubjectConditionSetCreate.java} (59%) create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdateOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java diff --git a/docs/grpc/index.html b/docs/grpc/index.html index d9366df039..e31c0ba902 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -695,6 +695,14 @@

Table of Contents

MConditionGroup +
  • + MCreateSubjectConditionSetRequest +
  • + +
  • + MCreateSubjectConditionSetResponse +
  • +
  • MCreateSubjectMappingRequest
  • @@ -703,6 +711,14 @@

    Table of Contents

    MCreateSubjectMappingResponse +
  • + MDeleteSubjectConditionSetRequest +
  • + +
  • + MDeleteSubjectConditionSetResponse +
  • +
  • MDeleteSubjectMappingRequest
  • @@ -711,6 +727,14 @@

    Table of Contents

    MDeleteSubjectMappingResponse +
  • + MGetSubjectConditionSetRequest +
  • + +
  • + MGetSubjectConditionSetResponse +
  • +
  • MGetSubjectMappingRequest
  • @@ -719,6 +743,14 @@

    Table of Contents

    MGetSubjectMappingResponse +
  • + MListSubjectConditionSetsRequest +
  • + +
  • + MListSubjectConditionSetsResponse +
  • +
  • MListSubjectMappingsRequest
  • @@ -739,18 +771,42 @@

    Table of Contents

    MSubject +
  • + MSubjectConditionSet +
  • + +
  • + MSubjectConditionSetCreate +
  • + +
  • + MSubjectConditionSetUpdate +
  • +
  • MSubjectMapping
  • - MSubjectMappingCreateUpdate + MSubjectMappingCreate +
  • + +
  • + MSubjectMappingUpdate
  • MSubjectSet
  • +
  • + MUpdateSubjectConditionSetRequest +
  • + +
  • + MUpdateSubjectConditionSetResponse +
  • +
  • MUpdateSubjectMappingRequest
  • @@ -5159,14 +5215,14 @@

    Condition

    operator SubjectMappingOperatorEnum -

    the operator

    +

    the evaluation operator of relation

    subject_external_values string repeated -

    list of comparison values for the subject_external_field

    +

    list of comparison values for the subject_external_field, evaluated by the operator

    @@ -5177,7 +5233,7 @@

    Condition

    ConditionGroup

    -

    A Group of conditions with either OR or AND evaluation across the contained conditions

    +

    A collection of Conditions evaluated by the boolean_type provided

    @@ -5207,6 +5263,54 @@

    ConditionGroup

    +

    CreateSubjectConditionSetRequest

    +

    + + +
    + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    subject_condition_setSubjectConditionSetCreate

    + + + + + +

    CreateSubjectConditionSetResponse

    +

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    subject_condition_setSubjectConditionSet

    + + + + +

    CreateSubjectMappingRequest

    @@ -5219,7 +5323,7 @@

    CreateSubjectMappingR subject_mapping - SubjectMappingCreateUpdate + SubjectMappingCreate

    @@ -5255,6 +5359,54 @@

    CreateSubjectMapping +

    DeleteSubjectConditionSetRequest

    +

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    idstring

    + + + + + +

    DeleteSubjectConditionSetResponse

    +

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    subject_condition_setSubjectConditionSet

    + + + + +

    DeleteSubjectMappingRequest

    @@ -5303,6 +5455,61 @@

    DeleteSubjectMapping +

    GetSubjectConditionSetRequest

    +

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    idstring

    + + + + + +

    GetSubjectConditionSetResponse

    +

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    subject_condition_setSubjectConditionSet

    associated_subject_mappingsSubjectMappingrepeated

    contextualized Subject Mappings associated with this SubjectConditionSet

    + + + + +

    GetSubjectMappingRequest

    @@ -5351,6 +5558,37 @@

    GetSubjectMappingRespon +

    ListSubjectConditionSetsRequest

    +

    + + + + + +

    ListSubjectConditionSetsResponse

    +

    + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    subject_condition_setsSubjectConditionSetrepeated

    + + + + +

    ListSubjectMappingsRequest

    @@ -5454,8 +5692,122 @@

    Subject

    +

    SubjectConditionSet

    +

    A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet

    are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple

    Subject Mappings / Attribute Values and is an independent unit.

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    idstring

    namestring

    an optional name for ease of reference

    metadatacommon.Metadata

    subject_setsSubjectSetrepeated

    multiple Subject Sets are evaluated with AND logic

    + + + + + +

    SubjectConditionSetCreate

    +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    metadatacommon.MetadataMutable

    namestring

    an optional name for ease of reference

    subject_setsSubjectSetrepeated

    multiple Subject Sets are evaluated with AND logic

    + + + + + +

    SubjectConditionSetUpdate

    +

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    updated_metadatacommon.MetadataMutable

    updated_subject_setsSubjectSetrepeated

    Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions

    + + + + +

    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": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_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_condition_sets": [{subject_set_1},{subject_set_2}]

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

    }

    @@ -5482,14 +5834,14 @@

    SubjectMapping

    - + - - + + - + @@ -5506,7 +5858,7 @@

    SubjectMapping

    -

    SubjectMappingCreateUpdate

    +

    SubjectMappingCreate

    @@ -5531,10 +5883,17 @@

    SubjectMappingCreateUp

    - - + + - + + + + + + + + @@ -5551,8 +5910,46 @@

    SubjectMappingCreateUp +

    SubjectMappingUpdate

    +

    + + +
    attribute_value policy.attributes.Value

    Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"

    the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"

    subject_setsSubjectSetsubject_condition_setsSubjectConditionSet repeated

    the subjects included in this mapping

    the reusable SubjectConditionSets mapped to the given Attribute Value

    subject_setsSubjectSetexisting_subject_condition_set_idsstring repeated

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

    Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)

    new_subject_condition_setsSubjectConditionSetrepeated

    Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)

    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    updated_metadatacommon.MetadataMutable

    updated_subject_condition_set_idsstringrepeated

    Replaces entire list of existing SubjectConditionSet ids

    udpated_actionsauthorization.Actionrepeated

    Replaces entire list of actions permitted by subjects

    + + + + +

    SubjectSet

    -

    A Set of subjects described by matching criteria via a list of condition groups.

    A Subject Set can be used by multiple Subject Mappings

    +

    A collection of Condition Groups

    @@ -5565,7 +5962,62 @@

    SubjectSet

    - + + + + +
    condition_groups ConditionGroup repeated

    The conditions groups describing the matching rules for subjects in the set

    multiple Condition Groups are evaluated with AND logic

    + + + + + +

    UpdateSubjectConditionSetRequest

    +

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    idstring

    subject_condition_setSubjectConditionSetUpdate

    + + + + + +

    UpdateSubjectConditionSetResponse

    +

    + + + + + + + + + + + + + @@ -5594,7 +6046,7 @@

    UpdateSubjectMappingR

    - + @@ -5744,6 +6196,41 @@

    SubjectMappingService

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    subject_condition_setSubjectConditionSet

    subject_mappingSubjectMappingCreateUpdateSubjectMappingUpdate

    ListSubjectConditionSetsListSubjectConditionSetsRequestListSubjectConditionSetsResponse

    GetSubjectConditionSetGetSubjectConditionSetRequestGetSubjectConditionSetResponse

    CreateSubjectConditionSetCreateSubjectConditionSetRequestCreateSubjectConditionSetResponse

    UpdateSubjectConditionSetUpdateSubjectConditionSetRequestUpdateSubjectConditionSetResponse

    DeleteSubjectConditionSetDeleteSubjectConditionSetRequestDeleteSubjectConditionSetResponse

    @@ -5822,6 +6309,56 @@

    Methods with HTTP bindings

    + + + + ListSubjectConditionSets + GET + /subject-condition-sets + + + + + + + + GetSubjectConditionSet + GET + /subject-condition-sets/{id} + + + + + + + + CreateSubjectConditionSet + POST + /subject-condition-sets + subject_condition_set + + + + + + + UpdateSubjectConditionSet + PATCH + /subject-condition-sets/{id} + subject_condition_set + + + + + + + DeleteSubjectConditionSet + DELETE + /subject-condition-sets/{id} + + + + diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index c352c21621..510be539b5 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -16,6 +16,152 @@ "application/json" ], "paths": { + "/subject-condition-sets": { + "get": { + "operationId": "SubjectMappingService_ListSubjectConditionSets", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/subjectmappingListSubjectConditionSetsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "tags": [ + "SubjectMappingService" + ] + }, + "post": { + "operationId": "SubjectMappingService_CreateSubjectConditionSet", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/subjectmappingCreateSubjectConditionSetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "subjectConditionSet", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/subjectmappingSubjectConditionSetCreate" + } + } + ], + "tags": [ + "SubjectMappingService" + ] + } + }, + "/subject-condition-sets/{id}": { + "get": { + "operationId": "SubjectMappingService_GetSubjectConditionSet", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/subjectmappingGetSubjectConditionSetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "SubjectMappingService" + ] + }, + "delete": { + "operationId": "SubjectMappingService_DeleteSubjectConditionSet", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/subjectmappingDeleteSubjectConditionSetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + } + ], + "tags": [ + "SubjectMappingService" + ] + }, + "patch": { + "operationId": "SubjectMappingService_UpdateSubjectConditionSet", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/subjectmappingUpdateSubjectConditionSetResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "subjectConditionSet", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/subjectmappingSubjectConditionSetUpdate" + } + } + ], + "tags": [ + "SubjectMappingService" + ] + } + }, "/subject-mappings": { "get": { "operationId": "SubjectMappingService_ListSubjectMappings", @@ -59,7 +205,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/subjectmappingSubjectMappingCreateUpdate" + "$ref": "#/definitions/subjectmappingSubjectMappingCreate" } } ], @@ -186,7 +332,7 @@ "in": "body", "required": true, "schema": { - "$ref": "#/definitions/subjectmappingSubjectMappingCreateUpdate" + "$ref": "#/definitions/subjectmappingSubjectMappingUpdate" } } ], @@ -381,14 +527,14 @@ }, "operator": { "$ref": "#/definitions/subjectmappingSubjectMappingOperatorEnum", - "title": "the operator" + "title": "the evaluation operator of relation" }, "subjectExternalValues": { "type": "array", "items": { "type": "string" }, - "title": "list of comparison values for the subject_external_field" + "title": "list of comparison values for the subject_external_field, evaluated by the operator" } }, "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}", @@ -419,7 +565,15 @@ "title": "the boolean evaluation type across the conditions" } }, - "title": "A Group of conditions with either OR or AND evaluation across the contained conditions" + "title": "A collection of Conditions evaluated by the boolean_type provided" + }, + "subjectmappingCreateSubjectConditionSetResponse": { + "type": "object", + "properties": { + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSet" + } + } }, "subjectmappingCreateSubjectMappingResponse": { "type": "object", @@ -429,6 +583,14 @@ } } }, + "subjectmappingDeleteSubjectConditionSetResponse": { + "type": "object", + "properties": { + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSet" + } + } + }, "subjectmappingDeleteSubjectMappingResponse": { "type": "object", "properties": { @@ -437,6 +599,22 @@ } } }, + "subjectmappingGetSubjectConditionSetResponse": { + "type": "object", + "properties": { + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSet" + }, + "associatedSubjectMappings": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/subjectmappingSubjectMapping" + }, + "title": "contextualized Subject Mappings associated with this SubjectConditionSet" + } + } + }, "subjectmappingGetSubjectMappingResponse": { "type": "object", "properties": { @@ -445,6 +623,18 @@ } } }, + "subjectmappingListSubjectConditionSetsResponse": { + "type": "object", + "properties": { + "subjectConditionSets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/subjectmappingSubjectConditionSet" + } + } + } + }, "subjectmappingListSubjectMappingsResponse": { "type": "object", "properties": { @@ -478,6 +668,66 @@ }, "description": "A Representation of a subject as attribute-\u003evalue pairs. This would mirror user attributes retrieved\nfrom an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc." }, + "subjectmappingSubjectConditionSet": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string", + "title": "an optional name for ease of reference" + }, + "metadata": { + "$ref": "#/definitions/commonMetadata" + }, + "subjectSets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/subjectmappingSubjectSet" + }, + "title": "multiple Subject Sets are evaluated with AND logic" + } + }, + "description": "A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet\nare evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple\nSubject Mappings / Attribute Values and is an independent unit." + }, + "subjectmappingSubjectConditionSetCreate": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/commonMetadataMutable" + }, + "name": { + "type": "string", + "title": "an optional name for ease of reference" + }, + "subjectSets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/subjectmappingSubjectSet" + }, + "title": "multiple Subject Sets are evaluated with AND logic" + } + } + }, + "subjectmappingSubjectConditionSetUpdate": { + "type": "object", + "properties": { + "updatedMetadata": { + "$ref": "#/definitions/commonMetadataMutable" + }, + "updatedSubjectSets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/subjectmappingSubjectSet" + }, + "title": "Replaces entire existing graph relation of Subject Sets, Condition Groups, \u0026 Conditions" + } + } + }, "subjectmappingSubjectMapping": { "type": "object", "properties": { @@ -489,15 +739,15 @@ }, "attributeValue": { "$ref": "#/definitions/policyattributesValue", - "title": "Attribute Value to be mapped to; aka: \"The Entity Entitlement Attribute\"" + "title": "the Attribute Value mapped to; aka: \"The Entity Entitlement Attribute\"" }, - "subjectSets": { + "subjectConditionSets": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/subjectmappingSubjectSet" + "$ref": "#/definitions/subjectmappingSubjectConditionSet" }, - "title": "the subjects included in this mapping" + "title": "the reusable SubjectConditionSets mapped to the given Attribute Value" }, "actions": { "type": "array", @@ -508,10 +758,10 @@ "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\": [\"STANDARD_ACTION_TRANSMIT\", \"STANDARD_ACTION_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_condition_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": { + "subjectmappingSubjectMappingCreate": { "type": "object", "properties": { "metadata": { @@ -521,13 +771,20 @@ "type": "string", "title": "Attribute Value to be mapped to" }, - "subjectSets": { + "existingSubjectConditionSetIds": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)" + }, + "newSubjectConditionSets": { "type": "array", "items": { "type": "object", - "$ref": "#/definitions/subjectmappingSubjectSet" + "$ref": "#/definitions/subjectmappingSubjectConditionSet" }, - "title": "The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements" + "title": "Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)" }, "actions": { "type": "array", @@ -549,6 +806,29 @@ "default": "SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED", "title": "buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package" }, + "subjectmappingSubjectMappingUpdate": { + "type": "object", + "properties": { + "updatedMetadata": { + "$ref": "#/definitions/commonMetadataMutable" + }, + "updatedSubjectConditionSetIds": { + "type": "array", + "items": { + "type": "string" + }, + "title": "Replaces entire list of existing SubjectConditionSet ids" + }, + "udpatedActions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/authorizationAction" + }, + "title": "Replaces entire list of actions permitted by subjects" + } + } + }, "subjectmappingSubjectSet": { "type": "object", "properties": { @@ -558,10 +838,18 @@ "type": "object", "$ref": "#/definitions/subjectmappingConditionGroup" }, - "title": "The conditions groups describing the matching rules for subjects in the set" + "title": "multiple Condition Groups are evaluated with AND logic" } }, - "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" + "title": "A collection of Condition Groups" + }, + "subjectmappingUpdateSubjectConditionSetResponse": { + "type": "object", + "properties": { + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSet" + } + } }, "subjectmappingUpdateSubjectMappingResponse": { "type": "object", diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 1a626344fc..1c576ac80d 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -149,9 +149,9 @@ type Condition struct { // 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 + // the evaluation operator of relation Operator SubjectMappingOperatorEnum `protobuf:"varint,2,opt,name=operator,proto3,enum=policy.subjectmapping.SubjectMappingOperatorEnum" json:"operator,omitempty"` - // list of comparison values for the subject_external_field + // list of comparison values for the subject_external_field, evaluated by the operator SubjectExternalValues []string `protobuf:"bytes,3,rep,name=subject_external_values,json=subjectExternalValues,proto3" json:"subject_external_values,omitempty"` } @@ -208,7 +208,7 @@ func (x *Condition) GetSubjectExternalValues() []string { return nil } -// A Group of conditions with either OR or AND evaluation across the contained conditions +// A collection of Conditions evaluated by the boolean_type provided type ConditionGroup struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -265,14 +265,13 @@ func (x *ConditionGroup) GetBooleanType() ConditionBooleanTypeEnum { return ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED } -// A Set of subjects described by matching criteria via a list of condition groups. -// A Subject Set can be used by multiple Subject Mappings +// A collection of Condition Groups type SubjectSet struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The conditions groups describing the matching rules for subjects in the set + // multiple Condition Groups are evaluated with AND logic ConditionGroups []*ConditionGroup `protobuf:"bytes,1,rep,name=condition_groups,json=conditionGroups,proto3" json:"condition_groups,omitempty"` } @@ -315,6 +314,82 @@ func (x *SubjectSet) GetConditionGroups() []*ConditionGroup { return nil } +// A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet +// are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple +// Subject Mappings / Attribute Values and is an independent unit. +type SubjectConditionSet struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // an optional name for ease of reference + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Metadata *common.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` + // multiple Subject Sets are evaluated with AND logic + SubjectSets []*SubjectSet `protobuf:"bytes,4,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` +} + +func (x *SubjectConditionSet) Reset() { + *x = SubjectConditionSet{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectConditionSet) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectConditionSet) ProtoMessage() {} + +func (x *SubjectConditionSet) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectConditionSet.ProtoReflect.Descriptor instead. +func (*SubjectConditionSet) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{3} +} + +func (x *SubjectConditionSet) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SubjectConditionSet) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SubjectConditionSet) GetMetadata() *common.Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *SubjectConditionSet) GetSubjectSets() []*SubjectSet { + if x != nil { + return x.SubjectSets + } + return nil +} + // 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 @@ -322,7 +397,7 @@ func (x *SubjectSet) GetConditionGroups() []*ConditionGroup { // { // "id": "someid", // "attribute_value": {example_one_attribute_value...}, -// "subject_sets": [{subject_set_1},{subject_set_2}] +// "subject_condition_sets": [{subject_set_1},{subject_set_2}] // "actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] // } type SubjectMapping struct { @@ -332,10 +407,10 @@ type SubjectMapping struct { 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"` - // Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute" + // the Attribute Value 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 - SubjectSets []*SubjectSet `protobuf:"bytes,4,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` + // the reusable SubjectConditionSets mapped to the given Attribute Value + SubjectConditionSets []*SubjectConditionSet `protobuf:"bytes,4,rep,name=subject_condition_sets,json=subjectConditionSets,proto3" json:"subject_condition_sets,omitempty"` // The actions permitted by subjects in this mapping Actions []*authorization.Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"` } @@ -343,7 +418,7 @@ type SubjectMapping struct { func (x *SubjectMapping) Reset() { *x = SubjectMapping{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[3] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -356,7 +431,7 @@ func (x *SubjectMapping) String() string { func (*SubjectMapping) ProtoMessage() {} func (x *SubjectMapping) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[3] + 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 { @@ -369,7 +444,7 @@ func (x *SubjectMapping) ProtoReflect() protoreflect.Message { // Deprecated: Use SubjectMapping.ProtoReflect.Descriptor instead. func (*SubjectMapping) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{3} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{4} } func (x *SubjectMapping) GetId() string { @@ -393,9 +468,9 @@ func (x *SubjectMapping) GetAttributeValue() *attributes.Value { return nil } -func (x *SubjectMapping) GetSubjectSets() []*SubjectSet { +func (x *SubjectMapping) GetSubjectConditionSets() []*SubjectConditionSet { if x != nil { - return x.SubjectSets + return x.SubjectConditionSets } return nil } @@ -420,7 +495,7 @@ type Subject struct { func (x *Subject) Reset() { *x = Subject{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[4] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -433,7 +508,7 @@ func (x *Subject) String() string { func (*Subject) ProtoMessage() {} func (x *Subject) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[4] + 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 { @@ -446,7 +521,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{4} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{5} } func (x *Subject) GetAttributes() *structpb.Struct { @@ -467,7 +542,7 @@ type MatchSubjectMappingsRequest struct { func (x *MatchSubjectMappingsRequest) Reset() { *x = MatchSubjectMappingsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -480,7 +555,7 @@ func (x *MatchSubjectMappingsRequest) String() string { func (*MatchSubjectMappingsRequest) ProtoMessage() {} func (x *MatchSubjectMappingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] + 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 { @@ -493,7 +568,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{5} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{6} } func (x *MatchSubjectMappingsRequest) GetSubject() *Subject { @@ -514,7 +589,7 @@ type MatchSubjectMappingsResponse struct { func (x *MatchSubjectMappingsResponse) Reset() { *x = MatchSubjectMappingsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[6] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -527,7 +602,7 @@ func (x *MatchSubjectMappingsResponse) String() string { func (*MatchSubjectMappingsResponse) ProtoMessage() {} func (x *MatchSubjectMappingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[6] + 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 { @@ -540,7 +615,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{6} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{7} } func (x *MatchSubjectMappingsResponse) GetSubjectMappings() []*SubjectMapping { @@ -550,80 +625,6 @@ func (x *MatchSubjectMappingsResponse) GetSubjectMappings() []*SubjectMapping { return nil } -type SubjectMappingCreateUpdate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - // Attribute Value to be mapped to - AttributeValueId string `protobuf:"bytes,2,opt,name=attribute_value_id,json=attributeValueId,proto3" json:"attribute_value_id,omitempty"` - // 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"` -} - -func (x *SubjectMappingCreateUpdate) Reset() { - *x = SubjectMappingCreateUpdate{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SubjectMappingCreateUpdate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SubjectMappingCreateUpdate) ProtoMessage() {} - -func (x *SubjectMappingCreateUpdate) ProtoReflect() protoreflect.Message { - mi := &file_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 SubjectMappingCreateUpdate.ProtoReflect.Descriptor instead. -func (*SubjectMappingCreateUpdate) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{7} -} - -func (x *SubjectMappingCreateUpdate) GetMetadata() *common.MetadataMutable { - if x != nil { - return x.Metadata - } - return nil -} - -func (x *SubjectMappingCreateUpdate) GetAttributeValueId() string { - if x != nil { - return x.AttributeValueId - } - return "" -} - -func (x *SubjectMappingCreateUpdate) GetSubjectSets() []*SubjectSet { - if x != nil { - return x.SubjectSets - } - return nil -} - -func (x *SubjectMappingCreateUpdate) GetActions() []*authorization.Action { - if x != nil { - return x.Actions - } - return nil -} - type GetSubjectMappingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -803,16 +804,24 @@ func (x *ListSubjectMappingsResponse) GetSubjectMappings() []*SubjectMapping { return nil } -type CreateSubjectMappingRequest struct { +type SubjectMappingCreate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectMapping *SubjectMappingCreateUpdate `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` + 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"` + // Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets) + ExistingSubjectConditionSetIds []string `protobuf:"bytes,3,rep,name=existing_subject_condition_set_ids,json=existingSubjectConditionSetIds,proto3" json:"existing_subject_condition_set_ids,omitempty"` + // Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided) + NewSubjectConditionSets []*SubjectConditionSet `protobuf:"bytes,4,rep,name=new_subject_condition_sets,json=newSubjectConditionSets,proto3" json:"new_subject_condition_sets,omitempty"` + // The actions permitted by subjects in this mapping + Actions []*authorization.Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"` } -func (x *CreateSubjectMappingRequest) Reset() { - *x = CreateSubjectMappingRequest{} +func (x *SubjectMappingCreate) Reset() { + *x = SubjectMappingCreate{} if protoimpl.UnsafeEnabled { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -820,13 +829,13 @@ func (x *CreateSubjectMappingRequest) Reset() { } } -func (x *CreateSubjectMappingRequest) String() string { +func (x *SubjectMappingCreate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateSubjectMappingRequest) ProtoMessage() {} +func (*SubjectMappingCreate) ProtoMessage() {} -func (x *CreateSubjectMappingRequest) ProtoReflect() protoreflect.Message { +func (x *SubjectMappingCreate) ProtoReflect() protoreflect.Message { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -838,28 +847,56 @@ func (x *CreateSubjectMappingRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateSubjectMappingRequest.ProtoReflect.Descriptor instead. -func (*CreateSubjectMappingRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use SubjectMappingCreate.ProtoReflect.Descriptor instead. +func (*SubjectMappingCreate) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{12} } -func (x *CreateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingCreateUpdate { +func (x *SubjectMappingCreate) GetMetadata() *common.MetadataMutable { if x != nil { - return x.SubjectMapping + return x.Metadata } return nil } -type CreateSubjectMappingResponse struct { +func (x *SubjectMappingCreate) GetAttributeValueId() string { + if x != nil { + return x.AttributeValueId + } + return "" +} + +func (x *SubjectMappingCreate) GetExistingSubjectConditionSetIds() []string { + if x != nil { + return x.ExistingSubjectConditionSetIds + } + return nil +} + +func (x *SubjectMappingCreate) GetNewSubjectConditionSets() []*SubjectConditionSet { + if x != nil { + return x.NewSubjectConditionSets + } + return nil +} + +func (x *SubjectMappingCreate) GetActions() []*authorization.Action { + if x != nil { + return x.Actions + } + return nil +} + +type CreateSubjectMappingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` + SubjectMapping *SubjectMappingCreate `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` } -func (x *CreateSubjectMappingResponse) Reset() { - *x = CreateSubjectMappingResponse{} +func (x *CreateSubjectMappingRequest) Reset() { + *x = CreateSubjectMappingRequest{} if protoimpl.UnsafeEnabled { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -867,13 +904,13 @@ func (x *CreateSubjectMappingResponse) Reset() { } } -func (x *CreateSubjectMappingResponse) String() string { +func (x *CreateSubjectMappingRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CreateSubjectMappingResponse) ProtoMessage() {} +func (*CreateSubjectMappingRequest) ProtoMessage() {} -func (x *CreateSubjectMappingResponse) ProtoReflect() protoreflect.Message { +func (x *CreateSubjectMappingRequest) ProtoReflect() protoreflect.Message { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -885,29 +922,28 @@ func (x *CreateSubjectMappingResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CreateSubjectMappingResponse.ProtoReflect.Descriptor instead. -func (*CreateSubjectMappingResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateSubjectMappingRequest.ProtoReflect.Descriptor instead. +func (*CreateSubjectMappingRequest) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{13} } -func (x *CreateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { +func (x *CreateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingCreate { if x != nil { return x.SubjectMapping } return nil } -type UpdateSubjectMappingRequest struct { +type CreateSubjectMappingResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - SubjectMapping *SubjectMappingCreateUpdate `protobuf:"bytes,2,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` } -func (x *UpdateSubjectMappingRequest) Reset() { - *x = UpdateSubjectMappingRequest{} +func (x *CreateSubjectMappingResponse) Reset() { + *x = CreateSubjectMappingResponse{} if protoimpl.UnsafeEnabled { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -915,13 +951,13 @@ func (x *UpdateSubjectMappingRequest) Reset() { } } -func (x *UpdateSubjectMappingRequest) String() string { +func (x *CreateSubjectMappingResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateSubjectMappingRequest) ProtoMessage() {} +func (*CreateSubjectMappingResponse) ProtoMessage() {} -func (x *UpdateSubjectMappingRequest) ProtoReflect() protoreflect.Message { +func (x *CreateSubjectMappingResponse) ProtoReflect() protoreflect.Message { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -933,35 +969,32 @@ func (x *UpdateSubjectMappingRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateSubjectMappingRequest.ProtoReflect.Descriptor instead. -func (*UpdateSubjectMappingRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateSubjectMappingResponse.ProtoReflect.Descriptor instead. +func (*CreateSubjectMappingResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{14} } -func (x *UpdateSubjectMappingRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *UpdateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingCreateUpdate { +func (x *CreateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { if x != nil { return x.SubjectMapping } return nil } -type UpdateSubjectMappingResponse struct { +type SubjectMappingUpdate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` + UpdatedMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=updated_metadata,json=updatedMetadata,proto3" json:"updated_metadata,omitempty"` + // Replaces entire list of existing SubjectConditionSet ids + UpdatedSubjectConditionSetIds []string `protobuf:"bytes,3,rep,name=updated_subject_condition_set_ids,json=updatedSubjectConditionSetIds,proto3" json:"updated_subject_condition_set_ids,omitempty"` + // Replaces entire list of actions permitted by subjects + UdpatedActions []*authorization.Action `protobuf:"bytes,5,rep,name=udpated_actions,json=udpatedActions,proto3" json:"udpated_actions,omitempty"` } -func (x *UpdateSubjectMappingResponse) Reset() { - *x = UpdateSubjectMappingResponse{} +func (x *SubjectMappingUpdate) Reset() { + *x = SubjectMappingUpdate{} if protoimpl.UnsafeEnabled { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -969,13 +1002,13 @@ func (x *UpdateSubjectMappingResponse) Reset() { } } -func (x *UpdateSubjectMappingResponse) String() string { +func (x *SubjectMappingUpdate) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateSubjectMappingResponse) ProtoMessage() {} +func (*SubjectMappingUpdate) ProtoMessage() {} -func (x *UpdateSubjectMappingResponse) ProtoReflect() protoreflect.Message { +func (x *SubjectMappingUpdate) ProtoReflect() protoreflect.Message { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -987,28 +1020,43 @@ func (x *UpdateSubjectMappingResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateSubjectMappingResponse.ProtoReflect.Descriptor instead. -func (*UpdateSubjectMappingResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use SubjectMappingUpdate.ProtoReflect.Descriptor instead. +func (*SubjectMappingUpdate) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{15} } -func (x *UpdateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { +func (x *SubjectMappingUpdate) GetUpdatedMetadata() *common.MetadataMutable { if x != nil { - return x.SubjectMapping + return x.UpdatedMetadata } return nil } -type DeleteSubjectMappingRequest struct { +func (x *SubjectMappingUpdate) GetUpdatedSubjectConditionSetIds() []string { + if x != nil { + return x.UpdatedSubjectConditionSetIds + } + return nil +} + +func (x *SubjectMappingUpdate) GetUdpatedActions() []*authorization.Action { + if x != nil { + return x.UdpatedActions + } + return nil +} + +type UpdateSubjectMappingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SubjectMapping *SubjectMappingUpdate `protobuf:"bytes,2,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` } -func (x *DeleteSubjectMappingRequest) Reset() { - *x = DeleteSubjectMappingRequest{} +func (x *UpdateSubjectMappingRequest) Reset() { + *x = UpdateSubjectMappingRequest{} if protoimpl.UnsafeEnabled { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1016,13 +1064,13 @@ func (x *DeleteSubjectMappingRequest) Reset() { } } -func (x *DeleteSubjectMappingRequest) String() string { +func (x *UpdateSubjectMappingRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteSubjectMappingRequest) ProtoMessage() {} +func (*UpdateSubjectMappingRequest) ProtoMessage() {} -func (x *DeleteSubjectMappingRequest) ProtoReflect() protoreflect.Message { +func (x *UpdateSubjectMappingRequest) ProtoReflect() protoreflect.Message { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1034,43 +1082,743 @@ func (x *DeleteSubjectMappingRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } +// Deprecated: Use UpdateSubjectMappingRequest.ProtoReflect.Descriptor instead. +func (*UpdateSubjectMappingRequest) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{16} +} + +func (x *UpdateSubjectMappingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingUpdate { + if x != nil { + return x.SubjectMapping + } + return nil +} + +type UpdateSubjectMappingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` +} + +func (x *UpdateSubjectMappingResponse) Reset() { + *x = UpdateSubjectMappingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSubjectMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSubjectMappingResponse) ProtoMessage() {} + +func (x *UpdateSubjectMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSubjectMappingResponse.ProtoReflect.Descriptor instead. +func (*UpdateSubjectMappingResponse) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{17} +} + +func (x *UpdateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { + if x != nil { + return x.SubjectMapping + } + return nil +} + +type DeleteSubjectMappingRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteSubjectMappingRequest) Reset() { + *x = DeleteSubjectMappingRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSubjectMappingRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSubjectMappingRequest) ProtoMessage() {} + +func (x *DeleteSubjectMappingRequest) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + // Deprecated: Use DeleteSubjectMappingRequest.ProtoReflect.Descriptor instead. func (*DeleteSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{16} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{18} +} + +func (x *DeleteSubjectMappingRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type DeleteSubjectMappingResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` +} + +func (x *DeleteSubjectMappingResponse) Reset() { + *x = DeleteSubjectMappingResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSubjectMappingResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSubjectMappingResponse) ProtoMessage() {} + +func (x *DeleteSubjectMappingResponse) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSubjectMappingResponse.ProtoReflect.Descriptor instead. +func (*DeleteSubjectMappingResponse) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{19} +} + +func (x *DeleteSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { + if x != nil { + return x.SubjectMapping + } + return nil +} + +type GetSubjectConditionSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *GetSubjectConditionSetRequest) Reset() { + *x = GetSubjectConditionSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubjectConditionSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubjectConditionSetRequest) ProtoMessage() {} + +func (x *GetSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubjectConditionSetRequest.ProtoReflect.Descriptor instead. +func (*GetSubjectConditionSetRequest) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{20} +} + +func (x *GetSubjectConditionSetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +type GetSubjectConditionSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` + // contextualized Subject Mappings associated with this SubjectConditionSet + AssociatedSubjectMappings []*SubjectMapping `protobuf:"bytes,2,rep,name=associated_subject_mappings,json=associatedSubjectMappings,proto3" json:"associated_subject_mappings,omitempty"` +} + +func (x *GetSubjectConditionSetResponse) Reset() { + *x = GetSubjectConditionSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetSubjectConditionSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetSubjectConditionSetResponse) ProtoMessage() {} + +func (x *GetSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetSubjectConditionSetResponse.ProtoReflect.Descriptor instead. +func (*GetSubjectConditionSetResponse) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{21} +} + +func (x *GetSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { + if x != nil { + return x.SubjectConditionSet + } + return nil +} + +func (x *GetSubjectConditionSetResponse) GetAssociatedSubjectMappings() []*SubjectMapping { + if x != nil { + return x.AssociatedSubjectMappings + } + return nil +} + +type ListSubjectConditionSetsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListSubjectConditionSetsRequest) Reset() { + *x = ListSubjectConditionSetsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubjectConditionSetsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubjectConditionSetsRequest) ProtoMessage() {} + +func (x *ListSubjectConditionSetsRequest) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubjectConditionSetsRequest.ProtoReflect.Descriptor instead. +func (*ListSubjectConditionSetsRequest) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{22} +} + +type ListSubjectConditionSetsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectConditionSets []*SubjectConditionSet `protobuf:"bytes,1,rep,name=subject_condition_sets,json=subjectConditionSets,proto3" json:"subject_condition_sets,omitempty"` +} + +func (x *ListSubjectConditionSetsResponse) Reset() { + *x = ListSubjectConditionSetsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListSubjectConditionSetsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListSubjectConditionSetsResponse) ProtoMessage() {} + +func (x *ListSubjectConditionSetsResponse) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListSubjectConditionSetsResponse.ProtoReflect.Descriptor instead. +func (*ListSubjectConditionSetsResponse) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{23} +} + +func (x *ListSubjectConditionSetsResponse) GetSubjectConditionSets() []*SubjectConditionSet { + if x != nil { + return x.SubjectConditionSets + } + return nil +} + +type SubjectConditionSetCreate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // an optional name for ease of reference + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + // multiple Subject Sets are evaluated with AND logic + SubjectSets []*SubjectSet `protobuf:"bytes,3,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` +} + +func (x *SubjectConditionSetCreate) Reset() { + *x = SubjectConditionSetCreate{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[24] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectConditionSetCreate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectConditionSetCreate) ProtoMessage() {} + +func (x *SubjectConditionSetCreate) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[24] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectConditionSetCreate.ProtoReflect.Descriptor instead. +func (*SubjectConditionSetCreate) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{24} +} + +func (x *SubjectConditionSetCreate) GetMetadata() *common.MetadataMutable { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *SubjectConditionSetCreate) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *SubjectConditionSetCreate) GetSubjectSets() []*SubjectSet { + if x != nil { + return x.SubjectSets + } + return nil +} + +type CreateSubjectConditionSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectConditionSet *SubjectConditionSetCreate `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` +} + +func (x *CreateSubjectConditionSetRequest) Reset() { + *x = CreateSubjectConditionSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSubjectConditionSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSubjectConditionSetRequest) ProtoMessage() {} + +func (x *CreateSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSubjectConditionSetRequest.ProtoReflect.Descriptor instead. +func (*CreateSubjectConditionSetRequest) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{25} +} + +func (x *CreateSubjectConditionSetRequest) GetSubjectConditionSet() *SubjectConditionSetCreate { + if x != nil { + return x.SubjectConditionSet + } + return nil +} + +type CreateSubjectConditionSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` +} + +func (x *CreateSubjectConditionSetResponse) Reset() { + *x = CreateSubjectConditionSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CreateSubjectConditionSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CreateSubjectConditionSetResponse) ProtoMessage() {} + +func (x *CreateSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CreateSubjectConditionSetResponse.ProtoReflect.Descriptor instead. +func (*CreateSubjectConditionSetResponse) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{26} +} + +func (x *CreateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { + if x != nil { + return x.SubjectConditionSet + } + return nil +} + +type SubjectConditionSetUpdate struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UpdatedMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=updated_metadata,json=updatedMetadata,proto3" json:"updated_metadata,omitempty"` + // Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions + UpdatedSubjectSets []*SubjectSet `protobuf:"bytes,3,rep,name=updated_subject_sets,json=updatedSubjectSets,proto3" json:"updated_subject_sets,omitempty"` +} + +func (x *SubjectConditionSetUpdate) Reset() { + *x = SubjectConditionSetUpdate{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SubjectConditionSetUpdate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SubjectConditionSetUpdate) ProtoMessage() {} + +func (x *SubjectConditionSetUpdate) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SubjectConditionSetUpdate.ProtoReflect.Descriptor instead. +func (*SubjectConditionSetUpdate) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{27} +} + +func (x *SubjectConditionSetUpdate) GetUpdatedMetadata() *common.MetadataMutable { + if x != nil { + return x.UpdatedMetadata + } + return nil +} + +func (x *SubjectConditionSetUpdate) GetUpdatedSubjectSets() []*SubjectSet { + if x != nil { + return x.UpdatedSubjectSets + } + return nil +} + +type UpdateSubjectConditionSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SubjectConditionSet *SubjectConditionSetUpdate `protobuf:"bytes,2,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` +} + +func (x *UpdateSubjectConditionSetRequest) Reset() { + *x = UpdateSubjectConditionSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSubjectConditionSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSubjectConditionSetRequest) ProtoMessage() {} + +func (x *UpdateSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdateSubjectConditionSetRequest.ProtoReflect.Descriptor instead. +func (*UpdateSubjectConditionSetRequest) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{28} +} + +func (x *UpdateSubjectConditionSetRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *UpdateSubjectConditionSetRequest) GetSubjectConditionSet() *SubjectConditionSetUpdate { + if x != nil { + return x.SubjectConditionSet + } + return nil +} + +type UpdateSubjectConditionSetResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` +} + +func (x *UpdateSubjectConditionSetResponse) Reset() { + *x = UpdateSubjectConditionSetResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[29] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdateSubjectConditionSetResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateSubjectConditionSetResponse) ProtoMessage() {} + +func (x *UpdateSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[29] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (x *DeleteSubjectMappingRequest) GetId() string { +// Deprecated: Use UpdateSubjectConditionSetResponse.ProtoReflect.Descriptor instead. +func (*UpdateSubjectConditionSetResponse) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{29} +} + +func (x *UpdateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { + if x != nil { + return x.SubjectConditionSet + } + return nil +} + +type DeleteSubjectConditionSetRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *DeleteSubjectConditionSetRequest) Reset() { + *x = DeleteSubjectConditionSetRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[30] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DeleteSubjectConditionSetRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DeleteSubjectConditionSetRequest) ProtoMessage() {} + +func (x *DeleteSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[30] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use DeleteSubjectConditionSetRequest.ProtoReflect.Descriptor instead. +func (*DeleteSubjectConditionSetRequest) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{30} +} + +func (x *DeleteSubjectConditionSetRequest) GetId() string { if x != nil { return x.Id } return "" } -type DeleteSubjectMappingResponse struct { +type DeleteSubjectConditionSetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` + SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` } -func (x *DeleteSubjectMappingResponse) Reset() { - *x = DeleteSubjectMappingResponse{} +func (x *DeleteSubjectConditionSetResponse) Reset() { + *x = DeleteSubjectConditionSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DeleteSubjectMappingResponse) String() string { +func (x *DeleteSubjectConditionSetResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DeleteSubjectMappingResponse) ProtoMessage() {} +func (*DeleteSubjectConditionSetResponse) ProtoMessage() {} -func (x *DeleteSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] +func (x *DeleteSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1081,14 +1829,14 @@ func (x *DeleteSubjectMappingResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use DeleteSubjectMappingResponse.ProtoReflect.Descriptor instead. -func (*DeleteSubjectMappingResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{17} +// Deprecated: Use DeleteSubjectConditionSetResponse.ProtoReflect.Descriptor instead. +func (*DeleteSubjectConditionSetResponse) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{31} } -func (x *DeleteSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { +func (x *DeleteSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { if x != nil { - return x.SubjectMapping + return x.SubjectConditionSet } return nil } @@ -1143,83 +1891,102 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 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, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22, 0xb7, 0x01, 0x0a, 0x13, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x03, 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, 0x4e, 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, 0x42, 0x08, + 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa4, 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, 0x60, 0x0a, 0x16, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, + 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, 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, 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, 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, + 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, 0xdf, 0x02, 0x0a, 0x14, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x72, + 0x65, 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, 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, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, 0x4a, 0x0a, 0x22, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x1e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x49, 0x64, 0x73, 0x12, 0x67, 0x0a, 0x1a, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, + 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x52, 0x17, 0x6e, 0x65, 0x77, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x73, 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, 0x54, 0x0a, 0x0f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 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, @@ -1227,133 +1994,305 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 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, + 0x6e, 0x67, 0x22, 0xe4, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x02, 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, 0x0f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x48, 0x0a, 0x21, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1d, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x75, 0x64, 0x70, + 0x61, 0x74, 0x65, 0x64, 0x5f, 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, 0x0e, 0x75, 0x64, 0x70, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8b, 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, 0x54, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 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, 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, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x37, + 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 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, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x19, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 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, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x4e, 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, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, + 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, 0x01, + 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x22, 0xbe, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, + 0x5f, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x53, 0x65, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x30, 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, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, + 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, + 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 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, 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, + 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, 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, 0xa4, 0x0f, 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, - 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, 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, + 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, 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, 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, 0x12, 0xac, 0x01, 0x0a, + 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, + 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 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, + 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, + 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xc6, 0x01, 0x0a, 0x19, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x30, 0x3a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, + 0x74, 0x73, 0x12, 0xcb, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, + 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x15, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x74, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, + 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, + 0x74, 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, 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, + 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 ( @@ -1369,73 +2308,113 @@ 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, 18) +var file_policy_subjectmapping_subject_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 32) var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ - (SubjectMappingOperatorEnum)(0), // 0: policy.subjectmapping.SubjectMappingOperatorEnum - (ConditionBooleanTypeEnum)(0), // 1: policy.subjectmapping.ConditionBooleanTypeEnum - (*Condition)(nil), // 2: policy.subjectmapping.Condition - (*ConditionGroup)(nil), // 3: policy.subjectmapping.ConditionGroup - (*SubjectSet)(nil), // 4: policy.subjectmapping.SubjectSet - (*SubjectMapping)(nil), // 5: policy.subjectmapping.SubjectMapping - (*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 + (SubjectMappingOperatorEnum)(0), // 0: policy.subjectmapping.SubjectMappingOperatorEnum + (ConditionBooleanTypeEnum)(0), // 1: policy.subjectmapping.ConditionBooleanTypeEnum + (*Condition)(nil), // 2: policy.subjectmapping.Condition + (*ConditionGroup)(nil), // 3: policy.subjectmapping.ConditionGroup + (*SubjectSet)(nil), // 4: policy.subjectmapping.SubjectSet + (*SubjectConditionSet)(nil), // 5: policy.subjectmapping.SubjectConditionSet + (*SubjectMapping)(nil), // 6: policy.subjectmapping.SubjectMapping + (*Subject)(nil), // 7: policy.subjectmapping.Subject + (*MatchSubjectMappingsRequest)(nil), // 8: policy.subjectmapping.MatchSubjectMappingsRequest + (*MatchSubjectMappingsResponse)(nil), // 9: policy.subjectmapping.MatchSubjectMappingsResponse + (*GetSubjectMappingRequest)(nil), // 10: policy.subjectmapping.GetSubjectMappingRequest + (*GetSubjectMappingResponse)(nil), // 11: policy.subjectmapping.GetSubjectMappingResponse + (*ListSubjectMappingsRequest)(nil), // 12: policy.subjectmapping.ListSubjectMappingsRequest + (*ListSubjectMappingsResponse)(nil), // 13: policy.subjectmapping.ListSubjectMappingsResponse + (*SubjectMappingCreate)(nil), // 14: policy.subjectmapping.SubjectMappingCreate + (*CreateSubjectMappingRequest)(nil), // 15: policy.subjectmapping.CreateSubjectMappingRequest + (*CreateSubjectMappingResponse)(nil), // 16: policy.subjectmapping.CreateSubjectMappingResponse + (*SubjectMappingUpdate)(nil), // 17: policy.subjectmapping.SubjectMappingUpdate + (*UpdateSubjectMappingRequest)(nil), // 18: policy.subjectmapping.UpdateSubjectMappingRequest + (*UpdateSubjectMappingResponse)(nil), // 19: policy.subjectmapping.UpdateSubjectMappingResponse + (*DeleteSubjectMappingRequest)(nil), // 20: policy.subjectmapping.DeleteSubjectMappingRequest + (*DeleteSubjectMappingResponse)(nil), // 21: policy.subjectmapping.DeleteSubjectMappingResponse + (*GetSubjectConditionSetRequest)(nil), // 22: policy.subjectmapping.GetSubjectConditionSetRequest + (*GetSubjectConditionSetResponse)(nil), // 23: policy.subjectmapping.GetSubjectConditionSetResponse + (*ListSubjectConditionSetsRequest)(nil), // 24: policy.subjectmapping.ListSubjectConditionSetsRequest + (*ListSubjectConditionSetsResponse)(nil), // 25: policy.subjectmapping.ListSubjectConditionSetsResponse + (*SubjectConditionSetCreate)(nil), // 26: policy.subjectmapping.SubjectConditionSetCreate + (*CreateSubjectConditionSetRequest)(nil), // 27: policy.subjectmapping.CreateSubjectConditionSetRequest + (*CreateSubjectConditionSetResponse)(nil), // 28: policy.subjectmapping.CreateSubjectConditionSetResponse + (*SubjectConditionSetUpdate)(nil), // 29: policy.subjectmapping.SubjectConditionSetUpdate + (*UpdateSubjectConditionSetRequest)(nil), // 30: policy.subjectmapping.UpdateSubjectConditionSetRequest + (*UpdateSubjectConditionSetResponse)(nil), // 31: policy.subjectmapping.UpdateSubjectConditionSetResponse + (*DeleteSubjectConditionSetRequest)(nil), // 32: policy.subjectmapping.DeleteSubjectConditionSetRequest + (*DeleteSubjectConditionSetResponse)(nil), // 33: policy.subjectmapping.DeleteSubjectConditionSetResponse + (*common.Metadata)(nil), // 34: common.Metadata + (*attributes.Value)(nil), // 35: policy.attributes.Value + (*authorization.Action)(nil), // 36: authorization.Action + (*structpb.Struct)(nil), // 37: google.protobuf.Struct + (*common.MetadataMutable)(nil), // 38: 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 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 + 34, // 4: policy.subjectmapping.SubjectConditionSet.metadata:type_name -> common.Metadata + 4, // 5: policy.subjectmapping.SubjectConditionSet.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 34, // 6: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata + 35, // 7: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value + 5, // 8: policy.subjectmapping.SubjectMapping.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 36, // 9: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action + 37, // 10: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct + 7, // 11: policy.subjectmapping.MatchSubjectMappingsRequest.subject:type_name -> policy.subjectmapping.Subject + 6, // 12: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 6, // 13: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 6, // 14: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 38, // 15: policy.subjectmapping.SubjectMappingCreate.metadata:type_name -> common.MetadataMutable + 5, // 16: policy.subjectmapping.SubjectMappingCreate.new_subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 36, // 17: policy.subjectmapping.SubjectMappingCreate.actions:type_name -> authorization.Action + 14, // 18: policy.subjectmapping.CreateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingCreate + 6, // 19: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 38, // 20: policy.subjectmapping.SubjectMappingUpdate.updated_metadata:type_name -> common.MetadataMutable + 36, // 21: policy.subjectmapping.SubjectMappingUpdate.udpated_actions:type_name -> authorization.Action + 17, // 22: policy.subjectmapping.UpdateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingUpdate + 6, // 23: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 6, // 24: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 5, // 25: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 6, // 26: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 5, // 27: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 38, // 28: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable + 4, // 29: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 26, // 30: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 5, // 31: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 38, // 32: policy.subjectmapping.SubjectConditionSetUpdate.updated_metadata:type_name -> common.MetadataMutable + 4, // 33: policy.subjectmapping.SubjectConditionSetUpdate.updated_subject_sets:type_name -> policy.subjectmapping.SubjectSet + 29, // 34: policy.subjectmapping.UpdateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetUpdate + 5, // 35: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 5, // 36: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 8, // 37: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 38: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 39: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 15, // 40: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 18, // 41: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 20, // 42: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 24, // 43: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest + 22, // 44: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest + 27, // 45: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest + 30, // 46: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest + 32, // 47: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest + 9, // 48: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 49: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 50: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 16, // 51: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 19, // 52: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 21, // 53: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 25, // 54: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse + 23, // 55: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse + 28, // 56: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse + 31, // 57: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse + 33, // 58: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse + 48, // [48:59] is the sub-list for method output_type + 37, // [37:48] is the sub-list for method input_type + 37, // [37:37] is the sub-list for extension type_name + 37, // [37:37] is the sub-list for extension extendee + 0, // [0:37] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } @@ -1481,7 +2460,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectMapping); i { + switch v := v.(*SubjectConditionSet); i { case 0: return &v.state case 1: @@ -1493,7 +2472,7 @@ 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.(*Subject); i { + switch v := v.(*SubjectMapping); i { case 0: return &v.state case 1: @@ -1505,7 +2484,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchSubjectMappingsRequest); i { + switch v := v.(*Subject); i { case 0: return &v.state case 1: @@ -1517,7 +2496,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MatchSubjectMappingsResponse); i { + switch v := v.(*MatchSubjectMappingsRequest); i { case 0: return &v.state case 1: @@ -1529,7 +2508,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectMappingCreateUpdate); i { + switch v := v.(*MatchSubjectMappingsResponse); i { case 0: return &v.state case 1: @@ -1589,7 +2568,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSubjectMappingRequest); i { + switch v := v.(*SubjectMappingCreate); i { case 0: return &v.state case 1: @@ -1601,7 +2580,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateSubjectMappingResponse); i { + switch v := v.(*CreateSubjectMappingRequest); i { case 0: return &v.state case 1: @@ -1613,7 +2592,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSubjectMappingRequest); i { + switch v := v.(*CreateSubjectMappingResponse); i { case 0: return &v.state case 1: @@ -1625,7 +2604,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateSubjectMappingResponse); i { + switch v := v.(*SubjectMappingUpdate); i { case 0: return &v.state case 1: @@ -1637,7 +2616,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteSubjectMappingRequest); i { + switch v := v.(*UpdateSubjectMappingRequest); i { case 0: return &v.state case 1: @@ -1649,6 +2628,30 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSubjectMappingResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_subjectmapping_subject_mapping_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSubjectMappingRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_policy_subjectmapping_subject_mapping_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSubjectMappingResponse); i { case 0: return &v.state @@ -1660,6 +2663,150 @@ 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{} { + switch v := v.(*GetSubjectConditionSetRequest); 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[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetSubjectConditionSetResponse); 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[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSubjectConditionSetsRequest); 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[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListSubjectConditionSetsResponse); 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[24].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectConditionSetCreate); 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[25].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSubjectConditionSetRequest); 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[26].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateSubjectConditionSetResponse); 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[27].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SubjectConditionSetUpdate); 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[28].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSubjectConditionSetRequest); 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[29].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateSubjectConditionSetResponse); 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[30].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSubjectConditionSetRequest); 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[31].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DeleteSubjectConditionSetResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -1667,7 +2814,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: 18, + NumMessages: 32, 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 9d46ad9239..9a48fb524b 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go @@ -289,6 +289,230 @@ func local_request_SubjectMappingService_DeleteSubjectMapping_0(ctx context.Cont } +func request_SubjectMappingService_ListSubjectConditionSets_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListSubjectConditionSetsRequest + var metadata runtime.ServerMetadata + + msg, err := client.ListSubjectConditionSets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SubjectMappingService_ListSubjectConditionSets_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq ListSubjectConditionSetsRequest + var metadata runtime.ServerMetadata + + msg, err := server.ListSubjectConditionSets(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SubjectMappingService_GetSubjectConditionSet_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSubjectConditionSetRequest + 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.GetSubjectConditionSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SubjectMappingService_GetSubjectConditionSet_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetSubjectConditionSetRequest + 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.GetSubjectConditionSet(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SubjectMappingService_CreateSubjectConditionSet_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateSubjectConditionSetRequest + 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.SubjectConditionSet); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.CreateSubjectConditionSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SubjectMappingService_CreateSubjectConditionSet_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq CreateSubjectConditionSetRequest + 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.SubjectConditionSet); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.CreateSubjectConditionSet(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SubjectMappingService_UpdateSubjectConditionSet_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateSubjectConditionSetRequest + 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.SubjectConditionSet); 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.UpdateSubjectConditionSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SubjectMappingService_UpdateSubjectConditionSet_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdateSubjectConditionSetRequest + 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.SubjectConditionSet); 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.UpdateSubjectConditionSet(ctx, &protoReq) + return msg, metadata, err + +} + +func request_SubjectMappingService_DeleteSubjectConditionSet_0(ctx context.Context, marshaler runtime.Marshaler, client SubjectMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteSubjectConditionSetRequest + 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.DeleteSubjectConditionSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_SubjectMappingService_DeleteSubjectConditionSet_0(ctx context.Context, marshaler runtime.Marshaler, server SubjectMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq DeleteSubjectConditionSetRequest + 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.DeleteSubjectConditionSet(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterSubjectMappingServiceHandlerServer registers the http handlers for service SubjectMappingService to "mux". // UnaryRPC :call SubjectMappingServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -445,6 +669,131 @@ func RegisterSubjectMappingServiceHandlerServer(ctx context.Context, mux *runtim }) + mux.Handle("GET", pattern_SubjectMappingService_ListSubjectConditionSets_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/ListSubjectConditionSets", runtime.WithHTTPPathPattern("/subject-condition-sets")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SubjectMappingService_ListSubjectConditionSets_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_ListSubjectConditionSets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SubjectMappingService_GetSubjectConditionSet_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/GetSubjectConditionSet", runtime.WithHTTPPathPattern("/subject-condition-sets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SubjectMappingService_GetSubjectConditionSet_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_GetSubjectConditionSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SubjectMappingService_CreateSubjectConditionSet_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/CreateSubjectConditionSet", runtime.WithHTTPPathPattern("/subject-condition-sets")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SubjectMappingService_CreateSubjectConditionSet_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_CreateSubjectConditionSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_SubjectMappingService_UpdateSubjectConditionSet_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/UpdateSubjectConditionSet", runtime.WithHTTPPathPattern("/subject-condition-sets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SubjectMappingService_UpdateSubjectConditionSet_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_UpdateSubjectConditionSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_SubjectMappingService_DeleteSubjectConditionSet_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/DeleteSubjectConditionSet", runtime.WithHTTPPathPattern("/subject-condition-sets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_SubjectMappingService_DeleteSubjectConditionSet_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_DeleteSubjectConditionSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -618,6 +967,116 @@ func RegisterSubjectMappingServiceHandlerClient(ctx context.Context, mux *runtim }) + mux.Handle("GET", pattern_SubjectMappingService_ListSubjectConditionSets_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/ListSubjectConditionSets", runtime.WithHTTPPathPattern("/subject-condition-sets")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SubjectMappingService_ListSubjectConditionSets_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_ListSubjectConditionSets_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_SubjectMappingService_GetSubjectConditionSet_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/GetSubjectConditionSet", runtime.WithHTTPPathPattern("/subject-condition-sets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SubjectMappingService_GetSubjectConditionSet_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_GetSubjectConditionSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_SubjectMappingService_CreateSubjectConditionSet_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/CreateSubjectConditionSet", runtime.WithHTTPPathPattern("/subject-condition-sets")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SubjectMappingService_CreateSubjectConditionSet_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_CreateSubjectConditionSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("PATCH", pattern_SubjectMappingService_UpdateSubjectConditionSet_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/UpdateSubjectConditionSet", runtime.WithHTTPPathPattern("/subject-condition-sets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SubjectMappingService_UpdateSubjectConditionSet_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_UpdateSubjectConditionSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("DELETE", pattern_SubjectMappingService_DeleteSubjectConditionSet_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/DeleteSubjectConditionSet", runtime.WithHTTPPathPattern("/subject-condition-sets/{id}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_SubjectMappingService_DeleteSubjectConditionSet_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_DeleteSubjectConditionSet_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -633,6 +1092,16 @@ var ( pattern_SubjectMappingService_UpdateSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-mappings", "id"}, "")) pattern_SubjectMappingService_DeleteSubjectMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-mappings", "id"}, "")) + + pattern_SubjectMappingService_ListSubjectConditionSets_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"subject-condition-sets"}, "")) + + pattern_SubjectMappingService_GetSubjectConditionSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-condition-sets", "id"}, "")) + + pattern_SubjectMappingService_CreateSubjectConditionSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"subject-condition-sets"}, "")) + + pattern_SubjectMappingService_UpdateSubjectConditionSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-condition-sets", "id"}, "")) + + pattern_SubjectMappingService_DeleteSubjectConditionSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"subject-condition-sets", "id"}, "")) ) var ( @@ -647,4 +1116,14 @@ var ( forward_SubjectMappingService_UpdateSubjectMapping_0 = runtime.ForwardResponseMessage forward_SubjectMappingService_DeleteSubjectMapping_0 = runtime.ForwardResponseMessage + + forward_SubjectMappingService_ListSubjectConditionSets_0 = runtime.ForwardResponseMessage + + forward_SubjectMappingService_GetSubjectConditionSet_0 = runtime.ForwardResponseMessage + + forward_SubjectMappingService_CreateSubjectConditionSet_0 = runtime.ForwardResponseMessage + + forward_SubjectMappingService_UpdateSubjectConditionSet_0 = runtime.ForwardResponseMessage + + forward_SubjectMappingService_DeleteSubjectConditionSet_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 1ca8fe8886..059a1bc00a 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping_grpc.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping_grpc.pb.go @@ -19,12 +19,17 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - SubjectMappingService_MatchSubjectMappings_FullMethodName = "/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings" - SubjectMappingService_ListSubjectMappings_FullMethodName = "/policy.subjectmapping.SubjectMappingService/ListSubjectMappings" - SubjectMappingService_GetSubjectMapping_FullMethodName = "/policy.subjectmapping.SubjectMappingService/GetSubjectMapping" - SubjectMappingService_CreateSubjectMapping_FullMethodName = "/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping" - SubjectMappingService_UpdateSubjectMapping_FullMethodName = "/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping" - SubjectMappingService_DeleteSubjectMapping_FullMethodName = "/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping" + SubjectMappingService_MatchSubjectMappings_FullMethodName = "/policy.subjectmapping.SubjectMappingService/MatchSubjectMappings" + SubjectMappingService_ListSubjectMappings_FullMethodName = "/policy.subjectmapping.SubjectMappingService/ListSubjectMappings" + SubjectMappingService_GetSubjectMapping_FullMethodName = "/policy.subjectmapping.SubjectMappingService/GetSubjectMapping" + SubjectMappingService_CreateSubjectMapping_FullMethodName = "/policy.subjectmapping.SubjectMappingService/CreateSubjectMapping" + SubjectMappingService_UpdateSubjectMapping_FullMethodName = "/policy.subjectmapping.SubjectMappingService/UpdateSubjectMapping" + SubjectMappingService_DeleteSubjectMapping_FullMethodName = "/policy.subjectmapping.SubjectMappingService/DeleteSubjectMapping" + SubjectMappingService_ListSubjectConditionSets_FullMethodName = "/policy.subjectmapping.SubjectMappingService/ListSubjectConditionSets" + SubjectMappingService_GetSubjectConditionSet_FullMethodName = "/policy.subjectmapping.SubjectMappingService/GetSubjectConditionSet" + SubjectMappingService_CreateSubjectConditionSet_FullMethodName = "/policy.subjectmapping.SubjectMappingService/CreateSubjectConditionSet" + SubjectMappingService_UpdateSubjectConditionSet_FullMethodName = "/policy.subjectmapping.SubjectMappingService/UpdateSubjectConditionSet" + SubjectMappingService_DeleteSubjectConditionSet_FullMethodName = "/policy.subjectmapping.SubjectMappingService/DeleteSubjectConditionSet" ) // SubjectMappingServiceClient is the client API for SubjectMappingService service. @@ -38,6 +43,11 @@ type SubjectMappingServiceClient interface { CreateSubjectMapping(ctx context.Context, in *CreateSubjectMappingRequest, opts ...grpc.CallOption) (*CreateSubjectMappingResponse, error) UpdateSubjectMapping(ctx context.Context, in *UpdateSubjectMappingRequest, opts ...grpc.CallOption) (*UpdateSubjectMappingResponse, error) DeleteSubjectMapping(ctx context.Context, in *DeleteSubjectMappingRequest, opts ...grpc.CallOption) (*DeleteSubjectMappingResponse, error) + ListSubjectConditionSets(ctx context.Context, in *ListSubjectConditionSetsRequest, opts ...grpc.CallOption) (*ListSubjectConditionSetsResponse, error) + GetSubjectConditionSet(ctx context.Context, in *GetSubjectConditionSetRequest, opts ...grpc.CallOption) (*GetSubjectConditionSetResponse, error) + CreateSubjectConditionSet(ctx context.Context, in *CreateSubjectConditionSetRequest, opts ...grpc.CallOption) (*CreateSubjectConditionSetResponse, error) + UpdateSubjectConditionSet(ctx context.Context, in *UpdateSubjectConditionSetRequest, opts ...grpc.CallOption) (*UpdateSubjectConditionSetResponse, error) + DeleteSubjectConditionSet(ctx context.Context, in *DeleteSubjectConditionSetRequest, opts ...grpc.CallOption) (*DeleteSubjectConditionSetResponse, error) } type subjectMappingServiceClient struct { @@ -102,6 +112,51 @@ func (c *subjectMappingServiceClient) DeleteSubjectMapping(ctx context.Context, return out, nil } +func (c *subjectMappingServiceClient) ListSubjectConditionSets(ctx context.Context, in *ListSubjectConditionSetsRequest, opts ...grpc.CallOption) (*ListSubjectConditionSetsResponse, error) { + out := new(ListSubjectConditionSetsResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_ListSubjectConditionSets_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subjectMappingServiceClient) GetSubjectConditionSet(ctx context.Context, in *GetSubjectConditionSetRequest, opts ...grpc.CallOption) (*GetSubjectConditionSetResponse, error) { + out := new(GetSubjectConditionSetResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_GetSubjectConditionSet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subjectMappingServiceClient) CreateSubjectConditionSet(ctx context.Context, in *CreateSubjectConditionSetRequest, opts ...grpc.CallOption) (*CreateSubjectConditionSetResponse, error) { + out := new(CreateSubjectConditionSetResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_CreateSubjectConditionSet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subjectMappingServiceClient) UpdateSubjectConditionSet(ctx context.Context, in *UpdateSubjectConditionSetRequest, opts ...grpc.CallOption) (*UpdateSubjectConditionSetResponse, error) { + out := new(UpdateSubjectConditionSetResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_UpdateSubjectConditionSet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *subjectMappingServiceClient) DeleteSubjectConditionSet(ctx context.Context, in *DeleteSubjectConditionSetRequest, opts ...grpc.CallOption) (*DeleteSubjectConditionSetResponse, error) { + out := new(DeleteSubjectConditionSetResponse) + err := c.cc.Invoke(ctx, SubjectMappingService_DeleteSubjectConditionSet_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SubjectMappingServiceServer is the server API for SubjectMappingService service. // All implementations must embed UnimplementedSubjectMappingServiceServer // for forward compatibility @@ -113,6 +168,11 @@ type SubjectMappingServiceServer interface { CreateSubjectMapping(context.Context, *CreateSubjectMappingRequest) (*CreateSubjectMappingResponse, error) UpdateSubjectMapping(context.Context, *UpdateSubjectMappingRequest) (*UpdateSubjectMappingResponse, error) DeleteSubjectMapping(context.Context, *DeleteSubjectMappingRequest) (*DeleteSubjectMappingResponse, error) + ListSubjectConditionSets(context.Context, *ListSubjectConditionSetsRequest) (*ListSubjectConditionSetsResponse, error) + GetSubjectConditionSet(context.Context, *GetSubjectConditionSetRequest) (*GetSubjectConditionSetResponse, error) + CreateSubjectConditionSet(context.Context, *CreateSubjectConditionSetRequest) (*CreateSubjectConditionSetResponse, error) + UpdateSubjectConditionSet(context.Context, *UpdateSubjectConditionSetRequest) (*UpdateSubjectConditionSetResponse, error) + DeleteSubjectConditionSet(context.Context, *DeleteSubjectConditionSetRequest) (*DeleteSubjectConditionSetResponse, error) mustEmbedUnimplementedSubjectMappingServiceServer() } @@ -138,6 +198,21 @@ func (UnimplementedSubjectMappingServiceServer) UpdateSubjectMapping(context.Con func (UnimplementedSubjectMappingServiceServer) DeleteSubjectMapping(context.Context, *DeleteSubjectMappingRequest) (*DeleteSubjectMappingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteSubjectMapping not implemented") } +func (UnimplementedSubjectMappingServiceServer) ListSubjectConditionSets(context.Context, *ListSubjectConditionSetsRequest) (*ListSubjectConditionSetsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListSubjectConditionSets not implemented") +} +func (UnimplementedSubjectMappingServiceServer) GetSubjectConditionSet(context.Context, *GetSubjectConditionSetRequest) (*GetSubjectConditionSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetSubjectConditionSet not implemented") +} +func (UnimplementedSubjectMappingServiceServer) CreateSubjectConditionSet(context.Context, *CreateSubjectConditionSetRequest) (*CreateSubjectConditionSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateSubjectConditionSet not implemented") +} +func (UnimplementedSubjectMappingServiceServer) UpdateSubjectConditionSet(context.Context, *UpdateSubjectConditionSetRequest) (*UpdateSubjectConditionSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateSubjectConditionSet not implemented") +} +func (UnimplementedSubjectMappingServiceServer) DeleteSubjectConditionSet(context.Context, *DeleteSubjectConditionSetRequest) (*DeleteSubjectConditionSetResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method DeleteSubjectConditionSet not implemented") +} func (UnimplementedSubjectMappingServiceServer) mustEmbedUnimplementedSubjectMappingServiceServer() {} // UnsafeSubjectMappingServiceServer may be embedded to opt out of forward compatibility for this service. @@ -259,6 +334,96 @@ func _SubjectMappingService_DeleteSubjectMapping_Handler(srv interface{}, ctx co return interceptor(ctx, in, info, handler) } +func _SubjectMappingService_ListSubjectConditionSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListSubjectConditionSetsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).ListSubjectConditionSets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_ListSubjectConditionSets_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).ListSubjectConditionSets(ctx, req.(*ListSubjectConditionSetsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubjectMappingService_GetSubjectConditionSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetSubjectConditionSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).GetSubjectConditionSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_GetSubjectConditionSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).GetSubjectConditionSet(ctx, req.(*GetSubjectConditionSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubjectMappingService_CreateSubjectConditionSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateSubjectConditionSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).CreateSubjectConditionSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_CreateSubjectConditionSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).CreateSubjectConditionSet(ctx, req.(*CreateSubjectConditionSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubjectMappingService_UpdateSubjectConditionSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateSubjectConditionSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).UpdateSubjectConditionSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_UpdateSubjectConditionSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).UpdateSubjectConditionSet(ctx, req.(*UpdateSubjectConditionSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SubjectMappingService_DeleteSubjectConditionSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteSubjectConditionSetRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SubjectMappingServiceServer).DeleteSubjectConditionSet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: SubjectMappingService_DeleteSubjectConditionSet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SubjectMappingServiceServer).DeleteSubjectConditionSet(ctx, req.(*DeleteSubjectConditionSetRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SubjectMappingService_ServiceDesc is the grpc.ServiceDesc for SubjectMappingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -290,6 +455,26 @@ var SubjectMappingService_ServiceDesc = grpc.ServiceDesc{ MethodName: "DeleteSubjectMapping", Handler: _SubjectMappingService_DeleteSubjectMapping_Handler, }, + { + MethodName: "ListSubjectConditionSets", + Handler: _SubjectMappingService_ListSubjectConditionSets_Handler, + }, + { + MethodName: "GetSubjectConditionSet", + Handler: _SubjectMappingService_GetSubjectConditionSet_Handler, + }, + { + MethodName: "CreateSubjectConditionSet", + Handler: _SubjectMappingService_CreateSubjectConditionSet_Handler, + }, + { + MethodName: "UpdateSubjectConditionSet", + Handler: _SubjectMappingService_UpdateSubjectConditionSet_Handler, + }, + { + MethodName: "DeleteSubjectConditionSet", + Handler: _SubjectMappingService_DeleteSubjectConditionSet_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "policy/subjectmapping/subject_mapping.proto", 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 393f3117ea..3bddc8cc49 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 @@ -113,7 +113,7 @@ public java.lang.String getSubjectExternalField() { private int operator_ = 0; /** *
    -   * the operator
    +   * the evaluation operator of relation
        * 
    * * .policy.subjectmapping.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } @@ -124,7 +124,7 @@ public java.lang.String getSubjectExternalField() { } /** *
    -   * the operator
    +   * the evaluation operator of relation
        * 
    * * .policy.subjectmapping.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } @@ -141,7 +141,7 @@ public java.lang.String getSubjectExternalField() { com.google.protobuf.LazyStringArrayList.emptyList(); /** *
    -   * list of comparison values for the subject_external_field
    +   * list of comparison values for the subject_external_field, evaluated by the operator
        * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -153,7 +153,7 @@ public java.lang.String getSubjectExternalField() { } /** *
    -   * list of comparison values for the subject_external_field
    +   * list of comparison values for the subject_external_field, evaluated by the operator
        * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -164,7 +164,7 @@ public int getSubjectExternalValuesCount() { } /** *
    -   * list of comparison values for the subject_external_field
    +   * list of comparison values for the subject_external_field, evaluated by the operator
        * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -176,7 +176,7 @@ public java.lang.String getSubjectExternalValues(int index) { } /** *
    -   * list of comparison values for the subject_external_field
    +   * list of comparison values for the subject_external_field, evaluated by the operator
        * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -689,7 +689,7 @@ public Builder setSubjectExternalFieldBytes( private int operator_ = 0; /** *
    -     * the operator
    +     * the evaluation operator of relation
          * 
    * * .policy.subjectmapping.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } @@ -700,7 +700,7 @@ public Builder setSubjectExternalFieldBytes( } /** *
    -     * the operator
    +     * the evaluation operator of relation
          * 
    * * .policy.subjectmapping.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } @@ -715,7 +715,7 @@ public Builder setOperatorValue(int value) { } /** *
    -     * the operator
    +     * the evaluation operator of relation
          * 
    * * .policy.subjectmapping.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } @@ -728,7 +728,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMappingOperatorEnum getO } /** *
    -     * the operator
    +     * the evaluation operator of relation
          * 
    * * .policy.subjectmapping.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } @@ -746,7 +746,7 @@ public Builder setOperator(io.opentdf.platform.policy.subjectmapping.SubjectMapp } /** *
    -     * the operator
    +     * the evaluation operator of relation
          * 
    * * .policy.subjectmapping.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } @@ -769,7 +769,7 @@ private void ensureSubjectExternalValuesIsMutable() { } /** *
    -     * list of comparison values for the subject_external_field
    +     * list of comparison values for the subject_external_field, evaluated by the operator
          * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -782,7 +782,7 @@ private void ensureSubjectExternalValuesIsMutable() { } /** *
    -     * list of comparison values for the subject_external_field
    +     * list of comparison values for the subject_external_field, evaluated by the operator
          * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -793,7 +793,7 @@ public int getSubjectExternalValuesCount() { } /** *
    -     * list of comparison values for the subject_external_field
    +     * list of comparison values for the subject_external_field, evaluated by the operator
          * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -805,7 +805,7 @@ public java.lang.String getSubjectExternalValues(int index) { } /** *
    -     * list of comparison values for the subject_external_field
    +     * list of comparison values for the subject_external_field, evaluated by the operator
          * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -818,7 +818,7 @@ public java.lang.String getSubjectExternalValues(int index) { } /** *
    -     * list of comparison values for the subject_external_field
    +     * list of comparison values for the subject_external_field, evaluated by the operator
          * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -837,7 +837,7 @@ public Builder setSubjectExternalValues( } /** *
    -     * list of comparison values for the subject_external_field
    +     * list of comparison values for the subject_external_field, evaluated by the operator
          * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -855,7 +855,7 @@ public Builder addSubjectExternalValues( } /** *
    -     * list of comparison values for the subject_external_field
    +     * list of comparison values for the subject_external_field, evaluated by the operator
          * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -873,7 +873,7 @@ public Builder addAllSubjectExternalValues( } /** *
    -     * list of comparison values for the subject_external_field
    +     * list of comparison values for the subject_external_field, evaluated by the operator
          * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -888,7 +888,7 @@ public Builder clearSubjectExternalValues() { } /** *
    -     * list of comparison values for the subject_external_field
    +     * list of comparison values for the subject_external_field, evaluated by the operator
          * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroup.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroup.java index 810d553899..f4b06fdcda 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroup.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroup.java @@ -6,7 +6,7 @@ /** *
    - * A Group of conditions with either OR or AND evaluation across the contained conditions
    + * A collection of Conditions evaluated by the boolean_type provided
      * 
    * * Protobuf type {@code policy.subjectmapping.ConditionGroup} @@ -283,7 +283,7 @@ protected Builder newBuilderForType( } /** *
    -   * A Group of conditions with either OR or AND evaluation across the contained conditions
    +   * A collection of Conditions evaluated by the boolean_type provided
        * 
    * * Protobuf type {@code policy.subjectmapping.ConditionGroup} 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 231e757400..a44dc99380 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 @@ -30,7 +30,7 @@ public interface ConditionOrBuilder extends /** *
    -   * the operator
    +   * the evaluation operator of relation
        * 
    * * .policy.subjectmapping.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } @@ -39,7 +39,7 @@ public interface ConditionOrBuilder extends int getOperatorValue(); /** *
    -   * the operator
    +   * the evaluation operator of relation
        * 
    * * .policy.subjectmapping.SubjectMappingOperatorEnum operator = 2 [json_name = "operator", (.buf.validate.field) = { ... } @@ -49,7 +49,7 @@ public interface ConditionOrBuilder extends /** *
    -   * list of comparison values for the subject_external_field
    +   * list of comparison values for the subject_external_field, evaluated by the operator
        * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -59,7 +59,7 @@ public interface ConditionOrBuilder extends getSubjectExternalValuesList(); /** *
    -   * list of comparison values for the subject_external_field
    +   * list of comparison values for the subject_external_field, evaluated by the operator
        * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -68,7 +68,7 @@ public interface ConditionOrBuilder extends int getSubjectExternalValuesCount(); /** *
    -   * list of comparison values for the subject_external_field
    +   * list of comparison values for the subject_external_field, evaluated by the operator
        * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; @@ -78,7 +78,7 @@ public interface ConditionOrBuilder extends java.lang.String getSubjectExternalValues(int index); /** *
    -   * list of comparison values for the subject_external_field
    +   * list of comparison values for the subject_external_field, evaluated by the operator
        * 
    * * repeated string subject_external_values = 3 [json_name = "subjectExternalValues"]; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java new file mode 100644 index 0000000000..96414f0012 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequest.java @@ -0,0 +1,599 @@ +// 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.CreateSubjectConditionSetRequest} + */ +public final class CreateSubjectConditionSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectConditionSetRequest) + CreateSubjectConditionSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateSubjectConditionSetRequest.newBuilder() to construct. + private CreateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateSubjectConditionSetRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateSubjectConditionSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate subjectConditionSet_; + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; + } + + 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, getSubjectConditionSet()); + } + 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, getSubjectConditionSet()); + } + 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.CreateSubjectConditionSetRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) 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 (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest 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.CreateSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest 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.CreateSubjectConditionSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest 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.CreateSubjectConditionSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest 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.CreateSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest 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.CreateSubjectConditionSetRequest 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.CreateSubjectConditionSetRequest 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.CreateSubjectConditionSetRequest 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.CreateSubjectConditionSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectConditionSetRequest) + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest build() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.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.CreateSubjectConditionSetRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + 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( + getSubjectConditionSetFieldBuilder().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.SubjectConditionSetCreate subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> subjectConditionSetBuilder_; + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : subjectConditionSet_; + } + } + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + @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.CreateSubjectConditionSetRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectConditionSetRequest) + private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSubjectConditionSetRequest 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.CreateSubjectConditionSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java new file mode 100644 index 0000000000..cc271966c0 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetRequestOrBuilder.java @@ -0,0 +1,25 @@ +// 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 CreateSubjectConditionSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectConditionSetRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSetCreate subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getSubjectConditionSetOrBuilder(); +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java new file mode 100644 index 0000000000..7919585aa5 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java @@ -0,0 +1,599 @@ +// 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.CreateSubjectConditionSetResponse} + */ +public final class CreateSubjectConditionSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.CreateSubjectConditionSetResponse) + CreateSubjectConditionSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateSubjectConditionSetResponse.newBuilder() to construct. + private CreateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateSubjectConditionSetResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CreateSubjectConditionSetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + + 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, getSubjectConditionSet()); + } + 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, getSubjectConditionSet()); + } + 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.CreateSubjectConditionSetResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) 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 (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse 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.CreateSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse 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.CreateSubjectConditionSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse 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.CreateSubjectConditionSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse 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.CreateSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse 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.CreateSubjectConditionSetResponse 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.CreateSubjectConditionSetResponse 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.CreateSubjectConditionSetResponse 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.CreateSubjectConditionSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.CreateSubjectConditionSetResponse) + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse build() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.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.CreateSubjectConditionSetResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + 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( + getSubjectConditionSetFieldBuilder().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.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + @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.CreateSubjectConditionSetResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.CreateSubjectConditionSetResponse) + private static final io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateSubjectConditionSetResponse 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.CreateSubjectConditionSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java new file mode 100644 index 0000000000..9e0619c5ba --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java @@ -0,0 +1,25 @@ +// 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 CreateSubjectConditionSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectConditionSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java index dba5dea5cb..fb29f9ddcf 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java @@ -41,9 +41,9 @@ protected java.lang.Object newInstance( private int bitField0_; public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate subjectMapping_; + private io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate subjectMapping_; /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; * @return Whether the subjectMapping field is set. */ @java.lang.Override @@ -51,19 +51,19 @@ public boolean hasSubjectMapping() { return ((bitField0_ & 0x00000001) != 0); } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; * @return The subjectMapping. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getSubjectMapping() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance() : subjectMapping_; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder getSubjectMappingOrBuilder() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance() : subjectMapping_; } private byte memoizedIsInitialized = -1; @@ -413,31 +413,31 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate subjectMapping_; + private io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate subjectMapping_; private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder> subjectMappingBuilder_; + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder> subjectMappingBuilder_; /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; * @return Whether the subjectMapping field is set. */ public boolean hasSubjectMapping() { return ((bitField0_ & 0x00000001) != 0); } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; * @return The subjectMapping. */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate getSubjectMapping() { + public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getSubjectMapping() { if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance() : subjectMapping_; + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance() : subjectMapping_; } else { return subjectMappingBuilder_.getMessage(); } } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate value) { + public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate value) { if (subjectMappingBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -451,10 +451,10 @@ public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.Subje return this; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; */ public Builder setSubjectMapping( - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder builderForValue) { + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder builderForValue) { if (subjectMappingBuilder_ == null) { subjectMapping_ = builderForValue.build(); } else { @@ -465,13 +465,13 @@ public Builder setSubjectMapping( return this; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate value) { + public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate value) { if (subjectMappingBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance()) { + subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance()) { getSubjectMappingBuilder().mergeFrom(value); } else { subjectMapping_ = value; @@ -486,7 +486,7 @@ public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.Sub return this; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; */ public Builder clearSubjectMapping() { bitField0_ = (bitField0_ & ~0x00000001); @@ -499,33 +499,33 @@ public Builder clearSubjectMapping() { return this; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder getSubjectMappingBuilder() { + public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder getSubjectMappingBuilder() { bitField0_ |= 0x00000001; onChanged(); return getSubjectMappingFieldBuilder().getBuilder(); } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder getSubjectMappingOrBuilder() { + public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder getSubjectMappingOrBuilder() { if (subjectMappingBuilder_ != null) { return subjectMappingBuilder_.getMessageOrBuilder(); } else { return subjectMapping_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance() : subjectMapping_; + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance() : subjectMapping_; } } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; */ private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder> + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder> getSubjectMappingFieldBuilder() { if (subjectMappingBuilder_ == null) { subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder>( + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder>( getSubjectMapping(), getParentForChildren(), isClean()); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java index 2105940509..53dc9a9917 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java @@ -9,17 +9,17 @@ public interface CreateSubjectMappingRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; * @return Whether the subjectMapping field is set. */ boolean hasSubjectMapping(); /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; * @return The subjectMapping. */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate getSubjectMapping(); + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getSubjectMapping(); /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 1 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder getSubjectMappingOrBuilder(); + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder getSubjectMappingOrBuilder(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java new file mode 100644 index 0000000000..f2b5e6e373 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequest.java @@ -0,0 +1,542 @@ +// 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.DeleteSubjectConditionSetRequest} + */ +public final class DeleteSubjectConditionSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectConditionSetRequest) + DeleteSubjectConditionSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteSubjectConditionSetRequest.newBuilder() to construct. + private DeleteSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteSubjectConditionSetRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteSubjectConditionSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.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.DeleteSubjectConditionSetRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest) 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.DeleteSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectConditionSetRequest) + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.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_DeleteSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest build() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.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.DeleteSubjectConditionSetRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectConditionSetRequest) + private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSubjectConditionSetRequest 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.DeleteSubjectConditionSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java new file mode 100644 index 0000000000..485be1e260 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetRequestOrBuilder.java @@ -0,0 +1,22 @@ +// 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 DeleteSubjectConditionSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectConditionSetRequest) + 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/DeleteSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java new file mode 100644 index 0000000000..b362c697b2 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java @@ -0,0 +1,599 @@ +// 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.DeleteSubjectConditionSetResponse} + */ +public final class DeleteSubjectConditionSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.DeleteSubjectConditionSetResponse) + DeleteSubjectConditionSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteSubjectConditionSetResponse.newBuilder() to construct. + private DeleteSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteSubjectConditionSetResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DeleteSubjectConditionSetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + + 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, getSubjectConditionSet()); + } + 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, getSubjectConditionSet()); + } + 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.DeleteSubjectConditionSetResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) 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 (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse 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.DeleteSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse 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.DeleteSubjectConditionSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse 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.DeleteSubjectConditionSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse 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.DeleteSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse 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.DeleteSubjectConditionSetResponse 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.DeleteSubjectConditionSetResponse 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.DeleteSubjectConditionSetResponse 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.DeleteSubjectConditionSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.DeleteSubjectConditionSetResponse) + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse build() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.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.DeleteSubjectConditionSetResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + 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( + getSubjectConditionSetFieldBuilder().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.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + @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.DeleteSubjectConditionSetResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.DeleteSubjectConditionSetResponse) + private static final io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteSubjectConditionSetResponse 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.DeleteSubjectConditionSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java new file mode 100644 index 0000000000..f91d96311a --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java @@ -0,0 +1,25 @@ +// 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 DeleteSubjectConditionSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.DeleteSubjectConditionSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java new file mode 100644 index 0000000000..d39484b89f --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequest.java @@ -0,0 +1,542 @@ +// 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.GetSubjectConditionSetRequest} + */ +public final class GetSubjectConditionSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectConditionSetRequest) + GetSubjectConditionSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetSubjectConditionSetRequest.newBuilder() to construct. + private GetSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetSubjectConditionSetRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetSubjectConditionSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.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.GetSubjectConditionSetRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest) 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.GetSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectConditionSetRequest) + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.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_GetSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest build() { + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.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.GetSubjectConditionSetRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectConditionSetRequest) + private static final io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSubjectConditionSetRequest 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.GetSubjectConditionSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java new file mode 100644 index 0000000000..f6c76435af --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetRequestOrBuilder.java @@ -0,0 +1,22 @@ +// 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 GetSubjectConditionSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectConditionSetRequest) + 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/GetSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java new file mode 100644 index 0000000000..94c874a6f6 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponse.java @@ -0,0 +1,1046 @@ +// 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.GetSubjectConditionSetResponse} + */ +public final class GetSubjectConditionSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.GetSubjectConditionSetResponse) + GetSubjectConditionSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetSubjectConditionSetResponse.newBuilder() to construct. + private GetSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetSubjectConditionSetResponse() { + associatedSubjectMappings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new GetSubjectConditionSetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + + public static final int ASSOCIATED_SUBJECT_MAPPINGS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List associatedSubjectMappings_; + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public java.util.List getAssociatedSubjectMappingsList() { + return associatedSubjectMappings_; + } + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public java.util.List + getAssociatedSubjectMappingsOrBuilderList() { + return associatedSubjectMappings_; + } + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public int getAssociatedSubjectMappingsCount() { + return associatedSubjectMappings_.size(); + } + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMapping getAssociatedSubjectMappings(int index) { + return associatedSubjectMappings_.get(index); + } + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getAssociatedSubjectMappingsOrBuilder( + int index) { + return associatedSubjectMappings_.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, getSubjectConditionSet()); + } + for (int i = 0; i < associatedSubjectMappings_.size(); i++) { + output.writeMessage(2, associatedSubjectMappings_.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, getSubjectConditionSet()); + } + for (int i = 0; i < associatedSubjectMappings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, associatedSubjectMappings_.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.GetSubjectConditionSetResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } + if (!getAssociatedSubjectMappingsList() + .equals(other.getAssociatedSubjectMappingsList())) 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 (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + if (getAssociatedSubjectMappingsCount() > 0) { + hash = (37 * hash) + ASSOCIATED_SUBJECT_MAPPINGS_FIELD_NUMBER; + hash = (53 * hash) + getAssociatedSubjectMappingsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse 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.GetSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse 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.GetSubjectConditionSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse 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.GetSubjectConditionSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse 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.GetSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse 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.GetSubjectConditionSetResponse 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.GetSubjectConditionSetResponse 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.GetSubjectConditionSetResponse 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.GetSubjectConditionSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.GetSubjectConditionSetResponse) + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + getAssociatedSubjectMappingsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + if (associatedSubjectMappingsBuilder_ == null) { + associatedSubjectMappings_ = java.util.Collections.emptyList(); + } else { + associatedSubjectMappings_ = null; + associatedSubjectMappingsBuilder_.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_GetSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse build() { + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result) { + if (associatedSubjectMappingsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + associatedSubjectMappings_ = java.util.Collections.unmodifiableList(associatedSubjectMappings_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.associatedSubjectMappings_ = associatedSubjectMappings_; + } else { + result.associatedSubjectMappings_ = associatedSubjectMappingsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.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.GetSubjectConditionSetResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + if (associatedSubjectMappingsBuilder_ == null) { + if (!other.associatedSubjectMappings_.isEmpty()) { + if (associatedSubjectMappings_.isEmpty()) { + associatedSubjectMappings_ = other.associatedSubjectMappings_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.addAll(other.associatedSubjectMappings_); + } + onChanged(); + } + } else { + if (!other.associatedSubjectMappings_.isEmpty()) { + if (associatedSubjectMappingsBuilder_.isEmpty()) { + associatedSubjectMappingsBuilder_.dispose(); + associatedSubjectMappingsBuilder_ = null; + associatedSubjectMappings_ = other.associatedSubjectMappings_; + bitField0_ = (bitField0_ & ~0x00000002); + associatedSubjectMappingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAssociatedSubjectMappingsFieldBuilder() : null; + } else { + associatedSubjectMappingsBuilder_.addAllMessages(other.associatedSubjectMappings_); + } + } + } + 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( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + io.opentdf.platform.policy.subjectmapping.SubjectMapping m = + input.readMessage( + io.opentdf.platform.policy.subjectmapping.SubjectMapping.parser(), + extensionRegistry); + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(m); + } else { + associatedSubjectMappingsBuilder_.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.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + + private java.util.List associatedSubjectMappings_ = + java.util.Collections.emptyList(); + private void ensureAssociatedSubjectMappingsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + associatedSubjectMappings_ = new java.util.ArrayList(associatedSubjectMappings_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> associatedSubjectMappingsBuilder_; + + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public java.util.List getAssociatedSubjectMappingsList() { + if (associatedSubjectMappingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(associatedSubjectMappings_); + } else { + return associatedSubjectMappingsBuilder_.getMessageList(); + } + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public int getAssociatedSubjectMappingsCount() { + if (associatedSubjectMappingsBuilder_ == null) { + return associatedSubjectMappings_.size(); + } else { + return associatedSubjectMappingsBuilder_.getCount(); + } + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMapping getAssociatedSubjectMappings(int index) { + if (associatedSubjectMappingsBuilder_ == null) { + return associatedSubjectMappings_.get(index); + } else { + return associatedSubjectMappingsBuilder_.getMessage(index); + } + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder setAssociatedSubjectMappings( + int index, io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { + if (associatedSubjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.set(index, value); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder setAssociatedSubjectMappings( + int index, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder builderForValue) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.set(index, builderForValue.build()); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAssociatedSubjectMappings(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { + if (associatedSubjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(value); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAssociatedSubjectMappings( + int index, io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { + if (associatedSubjectMappingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(index, value); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAssociatedSubjectMappings( + io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder builderForValue) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(builderForValue.build()); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAssociatedSubjectMappings( + int index, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder builderForValue) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.add(index, builderForValue.build()); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder addAllAssociatedSubjectMappings( + java.lang.Iterable values) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, associatedSubjectMappings_); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder clearAssociatedSubjectMappings() { + if (associatedSubjectMappingsBuilder_ == null) { + associatedSubjectMappings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.clear(); + } + return this; + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public Builder removeAssociatedSubjectMappings(int index) { + if (associatedSubjectMappingsBuilder_ == null) { + ensureAssociatedSubjectMappingsIsMutable(); + associatedSubjectMappings_.remove(index); + onChanged(); + } else { + associatedSubjectMappingsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder getAssociatedSubjectMappingsBuilder( + int index) { + return getAssociatedSubjectMappingsFieldBuilder().getBuilder(index); + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getAssociatedSubjectMappingsOrBuilder( + int index) { + if (associatedSubjectMappingsBuilder_ == null) { + return associatedSubjectMappings_.get(index); } else { + return associatedSubjectMappingsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public java.util.List + getAssociatedSubjectMappingsOrBuilderList() { + if (associatedSubjectMappingsBuilder_ != null) { + return associatedSubjectMappingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(associatedSubjectMappings_); + } + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder addAssociatedSubjectMappingsBuilder() { + return getAssociatedSubjectMappingsFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance()); + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder addAssociatedSubjectMappingsBuilder( + int index) { + return getAssociatedSubjectMappingsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance()); + } + /** + *
    +     * contextualized Subject Mappings associated with this SubjectConditionSet
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + public java.util.List + getAssociatedSubjectMappingsBuilderList() { + return getAssociatedSubjectMappingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> + getAssociatedSubjectMappingsFieldBuilder() { + if (associatedSubjectMappingsBuilder_ == null) { + associatedSubjectMappingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder>( + associatedSubjectMappings_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + associatedSubjectMappings_ = null; + } + return associatedSubjectMappingsBuilder_; + } + @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.GetSubjectConditionSetResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.GetSubjectConditionSetResponse) + private static final io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSubjectConditionSetResponse 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.GetSubjectConditionSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java new file mode 100644 index 0000000000..e78a825ec8 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/GetSubjectConditionSetResponseOrBuilder.java @@ -0,0 +1,69 @@ +// 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 GetSubjectConditionSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.GetSubjectConditionSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); + + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + java.util.List + getAssociatedSubjectMappingsList(); + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectMapping getAssociatedSubjectMappings(int index); + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + int getAssociatedSubjectMappingsCount(); + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + java.util.List + getAssociatedSubjectMappingsOrBuilderList(); + /** + *
    +   * contextualized Subject Mappings associated with this SubjectConditionSet
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectMapping associated_subject_mappings = 2 [json_name = "associatedSubjectMappings"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getAssociatedSubjectMappingsOrBuilder( + int index); +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java new file mode 100644 index 0000000000..6a488af5ea --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequest.java @@ -0,0 +1,399 @@ +// 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.ListSubjectConditionSetsRequest} + */ +public final class ListSubjectConditionSetsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectConditionSetsRequest) + ListSubjectConditionSetsRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListSubjectConditionSetsRequest.newBuilder() to construct. + private ListSubjectConditionSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListSubjectConditionSetsRequest() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListSubjectConditionSetsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.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.ListSubjectConditionSetsRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest other = (io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest) 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.ListSubjectConditionSetsRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest 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.ListSubjectConditionSetsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest 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.ListSubjectConditionSetsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest 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.ListSubjectConditionSetsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest 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.ListSubjectConditionSetsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest 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.ListSubjectConditionSetsRequest 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.ListSubjectConditionSetsRequest 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.ListSubjectConditionSetsRequest 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.ListSubjectConditionSetsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectConditionSetsRequest) + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.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_ListSubjectConditionSetsRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest build() { + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest result = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest(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.ListSubjectConditionSetsRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.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.ListSubjectConditionSetsRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectConditionSetsRequest) + private static final io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubjectConditionSetsRequest 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.ListSubjectConditionSetsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java new file mode 100644 index 0000000000..1a55d0e68b --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsRequestOrBuilder.java @@ -0,0 +1,10 @@ +// 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 ListSubjectConditionSetsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectConditionSetsRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java new file mode 100644 index 0000000000..8fa08347c3 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponse.java @@ -0,0 +1,760 @@ +// 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.ListSubjectConditionSetsResponse} + */ +public final class ListSubjectConditionSetsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.ListSubjectConditionSetsResponse) + ListSubjectConditionSetsResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListSubjectConditionSetsResponse.newBuilder() to construct. + private ListSubjectConditionSetsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListSubjectConditionSetsResponse() { + subjectConditionSets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ListSubjectConditionSetsResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.Builder.class); + } + + public static final int SUBJECT_CONDITION_SETS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List subjectConditionSets_; + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public java.util.List getSubjectConditionSetsList() { + return subjectConditionSets_; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public java.util.List + getSubjectConditionSetsOrBuilderList() { + return subjectConditionSets_; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public int getSubjectConditionSetsCount() { + return subjectConditionSets_.size(); + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSets(int index) { + return subjectConditionSets_.get(index); + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( + int index) { + return subjectConditionSets_.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 < subjectConditionSets_.size(); i++) { + output.writeMessage(1, subjectConditionSets_.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 < subjectConditionSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, subjectConditionSets_.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.ListSubjectConditionSetsResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse other = (io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse) obj; + + if (!getSubjectConditionSetsList() + .equals(other.getSubjectConditionSetsList())) 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 (getSubjectConditionSetsCount() > 0) { + hash = (37 * hash) + SUBJECT_CONDITION_SETS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSetsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.ListSubjectConditionSetsResponse) + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.class, io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + if (subjectConditionSetsBuilder_ == null) { + subjectConditionSets_ = java.util.Collections.emptyList(); + } else { + subjectConditionSets_ = null; + subjectConditionSetsBuilder_.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_ListSubjectConditionSetsResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse build() { + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse result) { + if (subjectConditionSetsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subjectConditionSets_ = java.util.Collections.unmodifiableList(subjectConditionSets_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subjectConditionSets_ = subjectConditionSets_; + } else { + result.subjectConditionSets_ = subjectConditionSetsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.getDefaultInstance()) return this; + if (subjectConditionSetsBuilder_ == null) { + if (!other.subjectConditionSets_.isEmpty()) { + if (subjectConditionSets_.isEmpty()) { + subjectConditionSets_ = other.subjectConditionSets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.addAll(other.subjectConditionSets_); + } + onChanged(); + } + } else { + if (!other.subjectConditionSets_.isEmpty()) { + if (subjectConditionSetsBuilder_.isEmpty()) { + subjectConditionSetsBuilder_.dispose(); + subjectConditionSetsBuilder_ = null; + subjectConditionSets_ = other.subjectConditionSets_; + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectConditionSetsFieldBuilder() : null; + } else { + subjectConditionSetsBuilder_.addAllMessages(other.subjectConditionSets_); + } + } + } + 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.SubjectConditionSet m = + input.readMessage( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.parser(), + extensionRegistry); + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(m); + } else { + subjectConditionSetsBuilder_.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 subjectConditionSets_ = + java.util.Collections.emptyList(); + private void ensureSubjectConditionSetsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subjectConditionSets_ = new java.util.ArrayList(subjectConditionSets_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetsBuilder_; + + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public java.util.List getSubjectConditionSetsList() { + if (subjectConditionSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectConditionSets_); + } else { + return subjectConditionSetsBuilder_.getMessageList(); + } + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public int getSubjectConditionSetsCount() { + if (subjectConditionSetsBuilder_ == null) { + return subjectConditionSets_.size(); + } else { + return subjectConditionSetsBuilder_.getCount(); + } + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSets(int index) { + if (subjectConditionSetsBuilder_ == null) { + return subjectConditionSets_.get(index); + } else { + return subjectConditionSetsBuilder_.getMessage(index); + } + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder setSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.set(index, value); + onChanged(); + } else { + subjectConditionSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder setSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.set(index, builderForValue.build()); + onChanged(); + } else { + subjectConditionSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(value); + onChanged(); + } else { + subjectConditionSetsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(index, value); + onChanged(); + } else { + subjectConditionSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addSubjectConditionSets( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(builderForValue.build()); + onChanged(); + } else { + subjectConditionSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectConditionSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder addAllSubjectConditionSets( + java.lang.Iterable values) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectConditionSets_); + onChanged(); + } else { + subjectConditionSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder clearSubjectConditionSets() { + if (subjectConditionSetsBuilder_ == null) { + subjectConditionSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + subjectConditionSetsBuilder_.clear(); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public Builder removeSubjectConditionSets(int index) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.remove(index); + onChanged(); + } else { + subjectConditionSetsBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetsBuilder( + int index) { + return getSubjectConditionSetsFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( + int index) { + if (subjectConditionSetsBuilder_ == null) { + return subjectConditionSets_.get(index); } else { + return subjectConditionSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public java.util.List + getSubjectConditionSetsOrBuilderList() { + if (subjectConditionSetsBuilder_ != null) { + return subjectConditionSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectConditionSets_); + } + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addSubjectConditionSetsBuilder() { + return getSubjectConditionSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addSubjectConditionSetsBuilder( + int index) { + return getSubjectConditionSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); + } + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + public java.util.List + getSubjectConditionSetsBuilderList() { + return getSubjectConditionSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getSubjectConditionSetsFieldBuilder() { + if (subjectConditionSetsBuilder_ == null) { + subjectConditionSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + subjectConditionSets_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + subjectConditionSets_ = null; + } + return subjectConditionSetsBuilder_; + } + @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.ListSubjectConditionSetsResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.ListSubjectConditionSetsResponse) + private static final io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSubjectConditionSetsResponse 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.ListSubjectConditionSetsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java new file mode 100644 index 0000000000..e1f36d4371 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ListSubjectConditionSetsResponseOrBuilder.java @@ -0,0 +1,34 @@ +// 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 ListSubjectConditionSetsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.ListSubjectConditionSetsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + java.util.List + getSubjectConditionSetsList(); + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSets(int index); + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + int getSubjectConditionSetsCount(); + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + java.util.List + getSubjectConditionSetsOrBuilderList(); + /** + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 1 [json_name = "subjectConditionSets"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( + int index); +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSet.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSet.java new file mode 100644 index 0000000000..7564ca1863 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSet.java @@ -0,0 +1,1358 @@ +// 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; + +/** + *
    + * A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet
    + * are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple
    + * Subject Mappings / Attribute Values and is an independent unit.
    + * 
    + * + * Protobuf type {@code policy.subjectmapping.SubjectConditionSet} + */ +public final class SubjectConditionSet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectConditionSet) + SubjectConditionSetOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectConditionSet.newBuilder() to construct. + private SubjectConditionSet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectConditionSet() { + id_ = ""; + name_ = ""; + subjectSets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectConditionSet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.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 NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string name = 2 [json_name = "name"]; + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + 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(); + name_ = s; + return s; + } + } + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int METADATA_FIELD_NUMBER = 3; + private io.opentdf.platform.common.Metadata metadata_; + /** + * .common.Metadata metadata = 3 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .common.Metadata metadata = 3 [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 = 3 [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 SUBJECT_SETS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List subjectSets_; + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getSubjectSetsList() { + return subjectSets_; + } + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getSubjectSetsOrBuilderList() { + return subjectSets_; + } + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getSubjectSetsCount() { + return subjectSets_.size(); + } + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { + return subjectSets_.get(index); + } + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + @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 { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(3, getMetadata()); + } + for (int i = 0; i < subjectSets_.size(); i++) { + output.writeMessage(4, subjectSets_.get(i)); + } + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMetadata()); + } + for (int i = 0; i < subjectSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, 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.SubjectConditionSet)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet other = (io.opentdf.platform.policy.subjectmapping.SubjectConditionSet) obj; + + if (!getId() + .equals(other.getId())) return false; + if (!getName() + .equals(other.getName())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + 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(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().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.SubjectConditionSet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSet 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.SubjectConditionSet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSet 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.SubjectConditionSet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSet 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.SubjectConditionSet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSet 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.SubjectConditionSet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSet 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.SubjectConditionSet 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.SubjectConditionSet 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.SubjectConditionSet 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; + } + /** + *
    +   * A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet
    +   * are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple
    +   * Subject Mappings / Attribute Values and is an independent unit.
    +   * 
    + * + * Protobuf type {@code policy.subjectmapping.SubjectConditionSet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectConditionSet) + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.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(); + getSubjectSetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + name_ = ""; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + } else { + subjectSets_ = null; + subjectSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSet_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet build() { + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet buildPartial() { + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet result = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSet(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet result) { + if (subjectSetsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.subjectSets_ = subjectSets_; + } else { + result.subjectSets_ = subjectSetsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 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.SubjectConditionSet) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectConditionSet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet other) { + if (other == io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getName().isEmpty()) { + name_ = other.name_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (subjectSetsBuilder_ == null) { + if (!other.subjectSets_.isEmpty()) { + if (subjectSets_.isEmpty()) { + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureSubjectSetsIsMutable(); + subjectSets_.addAll(other.subjectSets_); + } + onChanged(); + } + } else { + if (!other.subjectSets_.isEmpty()) { + if (subjectSetsBuilder_.isEmpty()) { + subjectSetsBuilder_.dispose(); + subjectSetsBuilder_ = null; + subjectSets_ = other.subjectSets_; + bitField0_ = (bitField0_ & ~0x00000008); + 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: { + id_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + 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 34 + 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"]; + * @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 java.lang.Object name_ = ""; + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string name = 2 [json_name = "name"]; + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string name = 2 [json_name = "name"]; + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + name_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string name = 2 [json_name = "name"]; + * @return This builder for chaining. + */ + public Builder clearName() { + name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string name = 2 [json_name = "name"]; + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + name_ = value; + bitField0_ |= 0x00000002; + 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 = 3 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .common.Metadata metadata = 3 [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 = 3 [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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 3 [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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 3 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .common.Metadata metadata = 3 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 3 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .common.Metadata metadata = 3 [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 = 3 [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 subjectSets_ = + java.util.Collections.emptyList(); + private void ensureSubjectSetsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + subjectSets_ = new java.util.ArrayList(subjectSets_); + bitField0_ |= 0x00000008; + } + } + + 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_; + + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List getSubjectSetsList() { + if (subjectSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectSets_); + } else { + return subjectSetsBuilder_.getMessageList(); + } + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public int getSubjectSetsCount() { + if (subjectSetsBuilder_ == null) { + return subjectSets_.size(); + } else { + return subjectSetsBuilder_.getCount(); + } + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); + } else { + return subjectSetsBuilder_.getMessage(index); + } + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + 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; + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + 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; + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + 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; + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + 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; + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + 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; + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + 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; + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + 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; + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder clearSubjectSets() { + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + subjectSetsBuilder_.clear(); + } + return this; + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public Builder removeSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.remove(index); + onChanged(); + } else { + subjectSetsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().getBuilder(index); + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); } else { + return subjectSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List + getSubjectSetsOrBuilderList() { + if (subjectSetsBuilder_ != null) { + return subjectSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectSets_); + } + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder() { + return getSubjectSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder( + int index) { + return getSubjectSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + } + /** + *
    +     * multiple Subject Sets are evaluated with AND logic
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + 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_ & 0x00000008) != 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.SubjectConditionSet) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectConditionSet) + private static final io.opentdf.platform.policy.subjectmapping.SubjectConditionSet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSet(); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectConditionSet 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.SubjectConditionSet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java similarity index 59% rename from sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdate.java rename to sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java index 312e81bb2b..adcde3c75b 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdate.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java @@ -5,41 +5,40 @@ package io.opentdf.platform.policy.subjectmapping; /** - * Protobuf type {@code policy.subjectmapping.SubjectMappingCreateUpdate} + * Protobuf type {@code policy.subjectmapping.SubjectConditionSetCreate} */ -public final class SubjectMappingCreateUpdate extends +public final class SubjectConditionSetCreate extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectMappingCreateUpdate) - SubjectMappingCreateUpdateOrBuilder { + // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectConditionSetCreate) + SubjectConditionSetCreateOrBuilder { private static final long serialVersionUID = 0L; - // Use SubjectMappingCreateUpdate.newBuilder() to construct. - private SubjectMappingCreateUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use SubjectConditionSetCreate.newBuilder() to construct. + private SubjectConditionSetCreate(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private SubjectMappingCreateUpdate() { - attributeValueId_ = ""; + private SubjectConditionSetCreate() { + name_ = ""; subjectSets_ = java.util.Collections.emptyList(); - actions_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new SubjectMappingCreateUpdate(); + return new SubjectConditionSetCreate(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_descriptor; + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_fieldAccessorTable + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder.class); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder.class); } private int bitField0_; @@ -69,47 +68,47 @@ public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder( return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; } - public static final int ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 2; + public static final int NAME_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private volatile java.lang.Object attributeValueId_ = ""; + private volatile java.lang.Object name_ = ""; /** *
    -   * Attribute Value to be mapped to
    +   * an optional name for ease of reference
        * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The attributeValueId. + * string name = 2 [json_name = "name"]; + * @return The name. */ @java.lang.Override - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; + public java.lang.String getName() { + java.lang.Object ref = name_; 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(); - attributeValueId_ = s; + name_ = s; return s; } } /** *
    -   * Attribute Value to be mapped to
    +   * an optional name for ease of reference
        * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The bytes for attributeValueId. + * string name = 2 [json_name = "name"]; + * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; + getNameBytes() { + java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - attributeValueId_ = b; + name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -121,10 +120,10 @@ public java.lang.String getAttributeValueId() { private java.util.List subjectSets_; /** *
    -   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +   * multiple Subject Sets are evaluated with AND logic
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List getSubjectSetsList() { @@ -132,10 +131,10 @@ public java.util.List getS } /** *
    -   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +   * multiple Subject Sets are evaluated with AND logic
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List @@ -144,10 +143,10 @@ public java.util.List getS } /** *
    -   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +   * multiple Subject Sets are evaluated with AND logic
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public int getSubjectSetsCount() { @@ -155,10 +154,10 @@ public int getSubjectSetsCount() { } /** *
    -   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +   * multiple Subject Sets are evaluated with AND logic
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { @@ -166,10 +165,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int i } /** *
    -   * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +   * multiple Subject Sets are evaluated with AND logic
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( @@ -177,67 +176,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS return subjectSets_.get(index); } - public static final int ACTIONS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List actions_; - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; - } - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); - } - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.Action getActions(int index) { - return actions_.get(index); - } - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); - } - private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -255,15 +193,12 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getMetadata()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeValueId_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); } 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)); - } getUnknownFields().writeTo(output); } @@ -277,17 +212,13 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getMetadata()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attributeValueId_); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); } 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 - .computeMessageSize(4, actions_.get(i)); - } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; @@ -298,22 +229,20 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate)) { + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate)) { return super.equals(obj); } - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate other = (io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate) obj; + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate other = (io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate) obj; if (hasMetadata() != other.hasMetadata()) return false; if (hasMetadata()) { if (!getMetadata() .equals(other.getMetadata())) return false; } - if (!getAttributeValueId() - .equals(other.getAttributeValueId())) return false; + if (!getName() + .equals(other.getName())) return false; if (!getSubjectSetsList() .equals(other.getSubjectSetsList())) return false; - if (!getActionsList() - .equals(other.getActionsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,59 +258,55 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); } - hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttributeValueId().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().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; - hash = (53 * hash) + getActionsList().hashCode(); - } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate 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.SubjectMappingCreateUpdate parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate 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.SubjectMappingCreateUpdate parseFrom(byte[] data) + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate 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.SubjectMappingCreateUpdate parseFrom(java.io.InputStream input) + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -389,26 +314,26 @@ public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpda .parseWithIOException(PARSER, input, extensionRegistry); } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate parseDelimitedFrom(java.io.InputStream input) + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate parseDelimitedFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate 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.SubjectMappingCreateUpdate parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate 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.SubjectMappingCreateUpdate parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -421,7 +346,7 @@ public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpda public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate prototype) { + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -437,26 +362,26 @@ protected Builder newBuilderForType( return builder; } /** - * Protobuf type {@code policy.subjectmapping.SubjectMappingCreateUpdate} + * Protobuf type {@code policy.subjectmapping.SubjectConditionSetCreate} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectMappingCreateUpdate) - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder { + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectConditionSetCreate) + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_descriptor; + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_fieldAccessorTable + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder.class); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder.class); } - // Construct using io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.newBuilder() + // Construct using io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -471,7 +396,6 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { getMetadataFieldBuilder(); getSubjectSetsFieldBuilder(); - getActionsFieldBuilder(); } } @java.lang.Override @@ -483,7 +407,7 @@ public Builder clear() { metadataBuilder_.dispose(); metadataBuilder_ = null; } - attributeValueId_ = ""; + name_ = ""; if (subjectSetsBuilder_ == null) { subjectSets_ = java.util.Collections.emptyList(); } else { @@ -491,30 +415,23 @@ public Builder clear() { subjectSetsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - } else { - actions_ = null; - actionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_descriptor; + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance(); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance(); } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate build() { - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate result = buildPartial(); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate build() { + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -522,15 +439,15 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate buil } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate buildPartial() { - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate result = new io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate(this); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate buildPartial() { + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate result) { + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result) { if (subjectSetsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); @@ -540,18 +457,9 @@ private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmappin } else { result.subjectSets_ = subjectSetsBuilder_.build(); } - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); - } } - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate result) { + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -561,7 +469,7 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMapp to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { - result.attributeValueId_ = attributeValueId_; + result.name_ = name_; } result.bitField0_ |= to_bitField0_; } @@ -600,21 +508,21 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate)other); + if (other instanceof io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate other) { - if (other == io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance()) return this; + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate other) { + if (other == io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) return this; if (other.hasMetadata()) { mergeMetadata(other.getMetadata()); } - if (!other.getAttributeValueId().isEmpty()) { - attributeValueId_ = other.attributeValueId_; + if (!other.getName().isEmpty()) { + name_ = other.name_; bitField0_ |= 0x00000002; onChanged(); } @@ -644,32 +552,6 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappin } } } - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); - } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000008); - actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionsFieldBuilder() : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); - } - } - } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -704,7 +586,7 @@ public Builder mergeFrom( break; } // case 10 case 18: { - attributeValueId_ = input.readStringRequireUtf8(); + name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 @@ -721,19 +603,6 @@ public Builder mergeFrom( } break; } // case 26 - case 34: { - io.opentdf.platform.authorization.Action m = - input.readMessage( - io.opentdf.platform.authorization.Action.parser(), - extensionRegistry); - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(m); - } else { - actionsBuilder_.addMessage(m); - } - break; - } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -872,22 +741,22 @@ public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder( return metadataBuilder_; } - private java.lang.Object attributeValueId_ = ""; + private java.lang.Object name_ = ""; /** *
    -     * Attribute Value to be mapped to
    +     * an optional name for ease of reference
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The attributeValueId. + * string name = 2 [json_name = "name"]; + * @return The name. */ - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; + public java.lang.String getName() { + java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - attributeValueId_ = s; + name_ = s; return s; } else { return (java.lang.String) ref; @@ -895,20 +764,20 @@ public java.lang.String getAttributeValueId() { } /** *
    -     * Attribute Value to be mapped to
    +     * an optional name for ease of reference
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The bytes for attributeValueId. + * string name = 2 [json_name = "name"]; + * @return The bytes for name. */ public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; + getNameBytes() { + java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - attributeValueId_ = b; + name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -916,49 +785,49 @@ public java.lang.String getAttributeValueId() { } /** *
    -     * Attribute Value to be mapped to
    +     * an optional name for ease of reference
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @param value The attributeValueId to set. + * string name = 2 [json_name = "name"]; + * @param value The name to set. * @return This builder for chaining. */ - public Builder setAttributeValueId( + public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - attributeValueId_ = value; + name_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
    -     * Attribute Value to be mapped to
    +     * an optional name for ease of reference
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * string name = 2 [json_name = "name"]; * @return This builder for chaining. */ - public Builder clearAttributeValueId() { - attributeValueId_ = getDefaultInstance().getAttributeValueId(); + public Builder clearName() { + name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
    -     * Attribute Value to be mapped to
    +     * an optional name for ease of reference
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @param value The bytes for attributeValueId to set. + * string name = 2 [json_name = "name"]; + * @param value The bytes for name to set. * @return This builder for chaining. */ - public Builder setAttributeValueIdBytes( + public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - attributeValueId_ = value; + name_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -978,10 +847,10 @@ private void ensureSubjectSetsIsMutable() { /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsList() { if (subjectSetsBuilder_ == null) { @@ -992,10 +861,10 @@ public java.util.List getS } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public int getSubjectSetsCount() { if (subjectSetsBuilder_ == null) { @@ -1006,10 +875,10 @@ public int getSubjectSetsCount() { } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { if (subjectSetsBuilder_ == null) { @@ -1020,10 +889,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int i } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -1041,10 +910,10 @@ public Builder setSubjectSets( } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1059,10 +928,10 @@ public Builder setSubjectSets( } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { if (subjectSetsBuilder_ == null) { @@ -1079,10 +948,10 @@ public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectS } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -1100,10 +969,10 @@ public Builder addSubjectSets( } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1118,10 +987,10 @@ public Builder addSubjectSets( } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1136,10 +1005,10 @@ public Builder addSubjectSets( } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addAllSubjectSets( java.lang.Iterable values) { @@ -1155,10 +1024,10 @@ public Builder addAllSubjectSets( } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder clearSubjectSets() { if (subjectSetsBuilder_ == null) { @@ -1172,10 +1041,10 @@ public Builder clearSubjectSets() { } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder removeSubjectSets(int index) { if (subjectSetsBuilder_ == null) { @@ -1189,10 +1058,10 @@ public Builder removeSubjectSets(int index) { } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetsBuilder( int index) { @@ -1200,10 +1069,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSe } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index) { @@ -1214,10 +1083,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsOrBuilderList() { @@ -1229,10 +1098,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder() { return getSubjectSetsFieldBuilder().addBuilder( @@ -1240,10 +1109,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder( int index) { @@ -1252,10 +1121,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe } /** *
    -     * The subjects sets stored as a single marshaled JSON blob, meaning updates are complete replacements
    +     * multiple Subject Sets are evaluated with AND logic
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsBuilderList() { @@ -1275,318 +1144,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe } return subjectSetsBuilder_; } - - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> actionsBuilder_; - - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.authorization.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public Builder addActions(io.opentdf.platform.authorization.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.authorization.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public Builder addActions( - io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public Builder addAllActions( - java.lang.Iterable values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - actionsBuilder_.clear(); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.Action.Builder getActionsBuilder( - int index) { - return getActionsFieldBuilder().getBuilder(index); - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( - int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public java.util.List - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.Action.Builder addActionsBuilder() { - return getActionsFieldBuilder().addBuilder( - io.opentdf.platform.authorization.Action.getDefaultInstance()); - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( - int index) { - return getActionsFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.Action.getDefaultInstance()); - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - public java.util.List - getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> - getActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( - actions_, - ((bitField0_ & 0x00000008) != 0), - getParentForChildren(), - isClean()); - actions_ = null; - } - return actionsBuilder_; - } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -1600,23 +1157,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.SubjectMappingCreateUpdate) + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.SubjectConditionSetCreate) } - // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectMappingCreateUpdate) - private static final io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectConditionSetCreate) + private static final io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate(); + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate(); } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate getDefaultInstance() { + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public SubjectMappingCreateUpdate parsePartialFrom( + public SubjectConditionSetCreate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1635,17 +1192,17 @@ public SubjectMappingCreateUpdate parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate getDefaultInstanceForType() { + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java new file mode 100644 index 0000000000..c57e6e324f --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java @@ -0,0 +1,89 @@ +// 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 SubjectConditionSetCreateOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectConditionSetCreate) + 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(); + + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string name = 2 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getSubjectSetsList(); + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index); + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + int getSubjectSetsCount(); + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getSubjectSetsOrBuilderList(); + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index); +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetOrBuilder.java new file mode 100644 index 0000000000..5c7bc5d970 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetOrBuilder.java @@ -0,0 +1,101 @@ +// 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 SubjectConditionSetOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectConditionSet) + 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(); + + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string name = 2 [json_name = "name"]; + * @return The name. + */ + java.lang.String getName(); + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string name = 2 [json_name = "name"]; + * @return The bytes for name. + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * .common.Metadata metadata = 3 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .common.Metadata metadata = 3 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + * .common.Metadata metadata = 3 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); + + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getSubjectSetsList(); + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index); + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + int getSubjectSetsCount(); + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getSubjectSetsOrBuilderList(); + /** + *
    +   * multiple Subject Sets are evaluated with AND logic
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( + int index); +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java new file mode 100644 index 0000000000..c4123e1d71 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java @@ -0,0 +1,1046 @@ +// 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.SubjectConditionSetUpdate} + */ +public final class SubjectConditionSetUpdate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectConditionSetUpdate) + SubjectConditionSetUpdateOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectConditionSetUpdate.newBuilder() to construct. + private SubjectConditionSetUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectConditionSetUpdate() { + updatedSubjectSets_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectConditionSetUpdate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder.class); + } + + private int bitField0_; + public static final int UPDATED_METADATA_FIELD_NUMBER = 2; + private io.opentdf.platform.common.MetadataMutable updatedMetadata_; + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return Whether the updatedMetadata field is set. + */ + @java.lang.Override + public boolean hasUpdatedMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return The updatedMetadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getUpdatedMetadata() { + return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder() { + return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + } + + public static final int UPDATED_SUBJECT_SETS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private java.util.List updatedSubjectSets_; + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getUpdatedSubjectSetsList() { + return updatedSubjectSets_; + } + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getUpdatedSubjectSetsOrBuilderList() { + return updatedSubjectSets_; + } + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getUpdatedSubjectSetsCount() { + return updatedSubjectSets_.size(); + } + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdatedSubjectSets(int index) { + return updatedSubjectSets_.get(index); + } + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdatedSubjectSetsOrBuilder( + int index) { + return updatedSubjectSets_.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(2, getUpdatedMetadata()); + } + for (int i = 0; i < updatedSubjectSets_.size(); i++) { + output.writeMessage(3, updatedSubjectSets_.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(2, getUpdatedMetadata()); + } + for (int i = 0; i < updatedSubjectSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, updatedSubjectSets_.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.SubjectConditionSetUpdate)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate other = (io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate) obj; + + if (hasUpdatedMetadata() != other.hasUpdatedMetadata()) return false; + if (hasUpdatedMetadata()) { + if (!getUpdatedMetadata() + .equals(other.getUpdatedMetadata())) return false; + } + if (!getUpdatedSubjectSetsList() + .equals(other.getUpdatedSubjectSetsList())) 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 (hasUpdatedMetadata()) { + hash = (37 * hash) + UPDATED_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getUpdatedMetadata().hashCode(); + } + if (getUpdatedSubjectSetsCount() > 0) { + hash = (37 * hash) + UPDATED_SUBJECT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getUpdatedSubjectSetsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectConditionSetUpdate) + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUpdatedMetadataFieldBuilder(); + getUpdatedSubjectSetsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updatedMetadata_ = null; + if (updatedMetadataBuilder_ != null) { + updatedMetadataBuilder_.dispose(); + updatedMetadataBuilder_ = null; + } + if (updatedSubjectSetsBuilder_ == null) { + updatedSubjectSets_ = java.util.Collections.emptyList(); + } else { + updatedSubjectSets_ = null; + updatedSubjectSetsBuilder_.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_SubjectConditionSetUpdate_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate build() { + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate buildPartial() { + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result) { + if (updatedSubjectSetsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + updatedSubjectSets_ = java.util.Collections.unmodifiableList(updatedSubjectSets_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.updatedSubjectSets_ = updatedSubjectSets_; + } else { + result.updatedSubjectSets_ = updatedSubjectSetsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updatedMetadata_ = updatedMetadataBuilder_ == null + ? updatedMetadata_ + : updatedMetadataBuilder_.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.SubjectConditionSetUpdate) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate other) { + if (other == io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance()) return this; + if (other.hasUpdatedMetadata()) { + mergeUpdatedMetadata(other.getUpdatedMetadata()); + } + if (updatedSubjectSetsBuilder_ == null) { + if (!other.updatedSubjectSets_.isEmpty()) { + if (updatedSubjectSets_.isEmpty()) { + updatedSubjectSets_ = other.updatedSubjectSets_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureUpdatedSubjectSetsIsMutable(); + updatedSubjectSets_.addAll(other.updatedSubjectSets_); + } + onChanged(); + } + } else { + if (!other.updatedSubjectSets_.isEmpty()) { + if (updatedSubjectSetsBuilder_.isEmpty()) { + updatedSubjectSetsBuilder_.dispose(); + updatedSubjectSetsBuilder_ = null; + updatedSubjectSets_ = other.updatedSubjectSets_; + bitField0_ = (bitField0_ & ~0x00000002); + updatedSubjectSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUpdatedSubjectSetsFieldBuilder() : null; + } else { + updatedSubjectSetsBuilder_.addAllMessages(other.updatedSubjectSets_); + } + } + } + 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 18: { + input.readMessage( + getUpdatedMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: { + io.opentdf.platform.policy.subjectmapping.SubjectSet m = + input.readMessage( + io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), + extensionRegistry); + if (updatedSubjectSetsBuilder_ == null) { + ensureUpdatedSubjectSetsIsMutable(); + updatedSubjectSets_.add(m); + } else { + updatedSubjectSetsBuilder_.addMessage(m); + } + break; + } // case 26 + 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 updatedMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updatedMetadataBuilder_; + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return Whether the updatedMetadata field is set. + */ + public boolean hasUpdatedMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return The updatedMetadata. + */ + public io.opentdf.platform.common.MetadataMutable getUpdatedMetadata() { + if (updatedMetadataBuilder_ == null) { + return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + } else { + return updatedMetadataBuilder_.getMessage(); + } + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public Builder setUpdatedMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updatedMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updatedMetadata_ = value; + } else { + updatedMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public Builder setUpdatedMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (updatedMetadataBuilder_ == null) { + updatedMetadata_ = builderForValue.build(); + } else { + updatedMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public Builder mergeUpdatedMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updatedMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updatedMetadata_ != null && + updatedMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getUpdatedMetadataBuilder().mergeFrom(value); + } else { + updatedMetadata_ = value; + } + } else { + updatedMetadataBuilder_.mergeFrom(value); + } + if (updatedMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public Builder clearUpdatedMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + updatedMetadata_ = null; + if (updatedMetadataBuilder_ != null) { + updatedMetadataBuilder_.dispose(); + updatedMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getUpdatedMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdatedMetadataFieldBuilder().getBuilder(); + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder() { + if (updatedMetadataBuilder_ != null) { + return updatedMetadataBuilder_.getMessageOrBuilder(); + } else { + return updatedMetadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + } + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getUpdatedMetadataFieldBuilder() { + if (updatedMetadataBuilder_ == null) { + updatedMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getUpdatedMetadata(), + getParentForChildren(), + isClean()); + updatedMetadata_ = null; + } + return updatedMetadataBuilder_; + } + + private java.util.List updatedSubjectSets_ = + java.util.Collections.emptyList(); + private void ensureUpdatedSubjectSetsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + updatedSubjectSets_ = new java.util.ArrayList(updatedSubjectSets_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> updatedSubjectSetsBuilder_; + + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List getUpdatedSubjectSetsList() { + if (updatedSubjectSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(updatedSubjectSets_); + } else { + return updatedSubjectSetsBuilder_.getMessageList(); + } + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public int getUpdatedSubjectSetsCount() { + if (updatedSubjectSetsBuilder_ == null) { + return updatedSubjectSets_.size(); + } else { + return updatedSubjectSetsBuilder_.getCount(); + } + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdatedSubjectSets(int index) { + if (updatedSubjectSetsBuilder_ == null) { + return updatedSubjectSets_.get(index); + } else { + return updatedSubjectSetsBuilder_.getMessage(index); + } + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public Builder setUpdatedSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (updatedSubjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatedSubjectSetsIsMutable(); + updatedSubjectSets_.set(index, value); + onChanged(); + } else { + updatedSubjectSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public Builder setUpdatedSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { + if (updatedSubjectSetsBuilder_ == null) { + ensureUpdatedSubjectSetsIsMutable(); + updatedSubjectSets_.set(index, builderForValue.build()); + onChanged(); + } else { + updatedSubjectSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public Builder addUpdatedSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (updatedSubjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatedSubjectSetsIsMutable(); + updatedSubjectSets_.add(value); + onChanged(); + } else { + updatedSubjectSetsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public Builder addUpdatedSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (updatedSubjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdatedSubjectSetsIsMutable(); + updatedSubjectSets_.add(index, value); + onChanged(); + } else { + updatedSubjectSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public Builder addUpdatedSubjectSets( + io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { + if (updatedSubjectSetsBuilder_ == null) { + ensureUpdatedSubjectSetsIsMutable(); + updatedSubjectSets_.add(builderForValue.build()); + onChanged(); + } else { + updatedSubjectSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public Builder addUpdatedSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { + if (updatedSubjectSetsBuilder_ == null) { + ensureUpdatedSubjectSetsIsMutable(); + updatedSubjectSets_.add(index, builderForValue.build()); + onChanged(); + } else { + updatedSubjectSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public Builder addAllUpdatedSubjectSets( + java.lang.Iterable values) { + if (updatedSubjectSetsBuilder_ == null) { + ensureUpdatedSubjectSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, updatedSubjectSets_); + onChanged(); + } else { + updatedSubjectSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public Builder clearUpdatedSubjectSets() { + if (updatedSubjectSetsBuilder_ == null) { + updatedSubjectSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + updatedSubjectSetsBuilder_.clear(); + } + return this; + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public Builder removeUpdatedSubjectSets(int index) { + if (updatedSubjectSetsBuilder_ == null) { + ensureUpdatedSubjectSetsIsMutable(); + updatedSubjectSets_.remove(index); + onChanged(); + } else { + updatedSubjectSetsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getUpdatedSubjectSetsBuilder( + int index) { + return getUpdatedSubjectSetsFieldBuilder().getBuilder(index); + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdatedSubjectSetsOrBuilder( + int index) { + if (updatedSubjectSetsBuilder_ == null) { + return updatedSubjectSets_.get(index); } else { + return updatedSubjectSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List + getUpdatedSubjectSetsOrBuilderList() { + if (updatedSubjectSetsBuilder_ != null) { + return updatedSubjectSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(updatedSubjectSets_); + } + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdatedSubjectSetsBuilder() { + return getUpdatedSubjectSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdatedSubjectSetsBuilder( + int index) { + return getUpdatedSubjectSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + } + /** + *
    +     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + public java.util.List + getUpdatedSubjectSetsBuilderList() { + return getUpdatedSubjectSetsFieldBuilder().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> + getUpdatedSubjectSetsFieldBuilder() { + if (updatedSubjectSetsBuilder_ == null) { + updatedSubjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( + updatedSubjectSets_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + updatedSubjectSets_ = null; + } + return updatedSubjectSetsBuilder_; + } + @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.SubjectConditionSetUpdate) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectConditionSetUpdate) + private static final io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate(); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectConditionSetUpdate 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.SubjectConditionSetUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java new file mode 100644 index 0000000000..7b3810501c --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java @@ -0,0 +1,69 @@ +// 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 SubjectConditionSetUpdateOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectConditionSetUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return Whether the updatedMetadata field is set. + */ + boolean hasUpdatedMetadata(); + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return The updatedMetadata. + */ + io.opentdf.platform.common.MetadataMutable getUpdatedMetadata(); + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder(); + + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getUpdatedSubjectSetsList(); + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdatedSubjectSets(int index); + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + int getUpdatedSubjectSetsCount(); + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + java.util.List + getUpdatedSubjectSetsOrBuilderList(); + /** + *
    +   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdatedSubjectSetsOrBuilder( + 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 82eadc33fa..4f704217d3 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 @@ -14,7 +14,7 @@ *{ *"id": "someid", *"attribute_value": {example_one_attribute_value...}, - *"subject_sets": [{subject_set_1},{subject_set_2}] + *"subject_condition_sets": [{subject_set_1},{subject_set_2}] *"actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] *} * @@ -32,7 +32,7 @@ private SubjectMapping(com.google.protobuf.GeneratedMessageV3.Builder builder } private SubjectMapping() { id_ = ""; - subjectSets_ = java.util.Collections.emptyList(); + subjectConditionSets_ = java.util.Collections.emptyList(); actions_ = java.util.Collections.emptyList(); } @@ -126,7 +126,7 @@ public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { private io.opentdf.platform.policy.attributes.Value attributeValue_; /** *
    -   * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
        * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -138,7 +138,7 @@ public boolean hasAttributeValue() { } /** *
    -   * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
        * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -150,7 +150,7 @@ public io.opentdf.platform.policy.attributes.Value getAttributeValue() { } /** *
    -   * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
        * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -160,65 +160,65 @@ public io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrB return attributeValue_ == null ? io.opentdf.platform.policy.attributes.Value.getDefaultInstance() : attributeValue_; } - public static final int SUBJECT_SETS_FIELD_NUMBER = 4; + public static final int SUBJECT_CONDITION_SETS_FIELD_NUMBER = 4; @SuppressWarnings("serial") - private java.util.List subjectSets_; + private java.util.List subjectConditionSets_; /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ @java.lang.Override - public java.util.List getSubjectSetsList() { - return subjectSets_; + public java.util.List getSubjectConditionSetsList() { + return subjectConditionSets_; } /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ @java.lang.Override - public java.util.List - getSubjectSetsOrBuilderList() { - return subjectSets_; + public java.util.List + getSubjectConditionSetsOrBuilderList() { + return subjectConditionSets_; } /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ @java.lang.Override - public int getSubjectSetsCount() { - return subjectSets_.size(); + public int getSubjectConditionSetsCount() { + return subjectConditionSets_.size(); } /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { - return subjectSets_.get(index); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSets(int index) { + return subjectConditionSets_.get(index); } /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( int index) { - return subjectSets_.get(index); + return subjectConditionSets_.get(index); } public static final int ACTIONS_FIELD_NUMBER = 5; @@ -305,8 +305,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getAttributeValue()); } - for (int i = 0; i < subjectSets_.size(); i++) { - output.writeMessage(4, subjectSets_.get(i)); + for (int i = 0; i < subjectConditionSets_.size(); i++) { + output.writeMessage(4, subjectConditionSets_.get(i)); } for (int i = 0; i < actions_.size(); i++) { output.writeMessage(5, actions_.get(i)); @@ -331,9 +331,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getAttributeValue()); } - for (int i = 0; i < subjectSets_.size(); i++) { + for (int i = 0; i < subjectConditionSets_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, subjectSets_.get(i)); + .computeMessageSize(4, subjectConditionSets_.get(i)); } for (int i = 0; i < actions_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -366,8 +366,8 @@ public boolean equals(final java.lang.Object obj) { if (!getAttributeValue() .equals(other.getAttributeValue())) return false; } - if (!getSubjectSetsList() - .equals(other.getSubjectSetsList())) return false; + if (!getSubjectConditionSetsList() + .equals(other.getSubjectConditionSetsList())) return false; if (!getActionsList() .equals(other.getActionsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -391,9 +391,9 @@ public int hashCode() { hash = (37 * hash) + ATTRIBUTE_VALUE_FIELD_NUMBER; hash = (53 * hash) + getAttributeValue().hashCode(); } - if (getSubjectSetsCount() > 0) { - hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectSetsList().hashCode(); + if (getSubjectConditionSetsCount() > 0) { + hash = (37 * hash) + SUBJECT_CONDITION_SETS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSetsList().hashCode(); } if (getActionsCount() > 0) { hash = (37 * hash) + ACTIONS_FIELD_NUMBER; @@ -506,7 +506,7 @@ protected Builder newBuilderForType( *{ *"id": "someid", *"attribute_value": {example_one_attribute_value...}, - *"subject_sets": [{subject_set_1},{subject_set_2}] + *"subject_condition_sets": [{subject_set_1},{subject_set_2}] *"actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] *} * @@ -545,7 +545,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { getMetadataFieldBuilder(); getAttributeValueFieldBuilder(); - getSubjectSetsFieldBuilder(); + getSubjectConditionSetsFieldBuilder(); getActionsFieldBuilder(); } } @@ -564,11 +564,11 @@ public Builder clear() { attributeValueBuilder_.dispose(); attributeValueBuilder_ = null; } - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); + if (subjectConditionSetsBuilder_ == null) { + subjectConditionSets_ = java.util.Collections.emptyList(); } else { - subjectSets_ = null; - subjectSetsBuilder_.clear(); + subjectConditionSets_ = null; + subjectConditionSetsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); if (actionsBuilder_ == null) { @@ -611,14 +611,14 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMapping buildPartial() { } private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMapping result) { - if (subjectSetsBuilder_ == null) { + if (subjectConditionSetsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { - subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); + subjectConditionSets_ = java.util.Collections.unmodifiableList(subjectConditionSets_); bitField0_ = (bitField0_ & ~0x00000008); } - result.subjectSets_ = subjectSets_; + result.subjectConditionSets_ = subjectConditionSets_; } else { - result.subjectSets_ = subjectSetsBuilder_.build(); + result.subjectConditionSets_ = subjectConditionSetsBuilder_.build(); } if (actionsBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { @@ -707,29 +707,29 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappin if (other.hasAttributeValue()) { mergeAttributeValue(other.getAttributeValue()); } - if (subjectSetsBuilder_ == null) { - if (!other.subjectSets_.isEmpty()) { - if (subjectSets_.isEmpty()) { - subjectSets_ = other.subjectSets_; + if (subjectConditionSetsBuilder_ == null) { + if (!other.subjectConditionSets_.isEmpty()) { + if (subjectConditionSets_.isEmpty()) { + subjectConditionSets_ = other.subjectConditionSets_; bitField0_ = (bitField0_ & ~0x00000008); } else { - ensureSubjectSetsIsMutable(); - subjectSets_.addAll(other.subjectSets_); + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.addAll(other.subjectConditionSets_); } onChanged(); } } else { - if (!other.subjectSets_.isEmpty()) { - if (subjectSetsBuilder_.isEmpty()) { - subjectSetsBuilder_.dispose(); - subjectSetsBuilder_ = null; - subjectSets_ = other.subjectSets_; + if (!other.subjectConditionSets_.isEmpty()) { + if (subjectConditionSetsBuilder_.isEmpty()) { + subjectConditionSetsBuilder_.dispose(); + subjectConditionSetsBuilder_ = null; + subjectConditionSets_ = other.subjectConditionSets_; bitField0_ = (bitField0_ & ~0x00000008); - subjectSetsBuilder_ = + subjectConditionSetsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectSetsFieldBuilder() : null; + getSubjectConditionSetsFieldBuilder() : null; } else { - subjectSetsBuilder_.addAllMessages(other.subjectSets_); + subjectConditionSetsBuilder_.addAllMessages(other.subjectConditionSets_); } } } @@ -805,15 +805,15 @@ public Builder mergeFrom( break; } // case 26 case 34: { - io.opentdf.platform.policy.subjectmapping.SubjectSet m = + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet m = input.readMessage( - io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.parser(), extensionRegistry); - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(m); + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(m); } else { - subjectSetsBuilder_.addMessage(m); + subjectConditionSetsBuilder_.addMessage(m); } break; } // case 34 @@ -1045,7 +1045,7 @@ public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { io.opentdf.platform.policy.attributes.Value, io.opentdf.platform.policy.attributes.Value.Builder, io.opentdf.platform.policy.attributes.ValueOrBuilder> attributeValueBuilder_; /** *
    -     * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -1056,7 +1056,7 @@ public boolean hasAttributeValue() { } /** *
    -     * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -1071,7 +1071,7 @@ public io.opentdf.platform.policy.attributes.Value getAttributeValue() { } /** *
    -     * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -1091,7 +1091,7 @@ public Builder setAttributeValue(io.opentdf.platform.policy.attributes.Value val } /** *
    -     * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -1109,7 +1109,7 @@ public Builder setAttributeValue( } /** *
    -     * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -1134,7 +1134,7 @@ public Builder mergeAttributeValue(io.opentdf.platform.policy.attributes.Value v } /** *
    -     * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -1151,7 +1151,7 @@ public Builder clearAttributeValue() { } /** *
    -     * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -1163,7 +1163,7 @@ public io.opentdf.platform.policy.attributes.Value.Builder getAttributeValueBuil } /** *
    -     * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -1178,7 +1178,7 @@ public io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrB } /** *
    -     * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +     * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -1197,316 +1197,316 @@ public io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrB return attributeValueBuilder_; } - private java.util.List subjectSets_ = + private java.util.List subjectConditionSets_ = java.util.Collections.emptyList(); - private void ensureSubjectSetsIsMutable() { + private void ensureSubjectConditionSetsIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { - subjectSets_ = new java.util.ArrayList(subjectSets_); + subjectConditionSets_ = new java.util.ArrayList(subjectConditionSets_); bitField0_ |= 0x00000008; } } 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_; + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetsBuilder_; /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public java.util.List getSubjectSetsList() { - if (subjectSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectSets_); + public java.util.List getSubjectConditionSetsList() { + if (subjectConditionSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectConditionSets_); } else { - return subjectSetsBuilder_.getMessageList(); + return subjectConditionSetsBuilder_.getMessageList(); } } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public int getSubjectSetsCount() { - if (subjectSetsBuilder_ == null) { - return subjectSets_.size(); + public int getSubjectConditionSetsCount() { + if (subjectConditionSetsBuilder_ == null) { + return subjectConditionSets_.size(); } else { - return subjectSetsBuilder_.getCount(); + return subjectConditionSetsBuilder_.getCount(); } } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSets(int index) { + if (subjectConditionSetsBuilder_ == null) { + return subjectConditionSets_.get(index); } else { - return subjectSetsBuilder_.getMessage(index); + return subjectConditionSetsBuilder_.getMessage(index); } } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetsBuilder_ == null) { + public Builder setSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, value); + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.set(index, value); onChanged(); } else { - subjectSetsBuilder_.setMessage(index, value); + subjectConditionSetsBuilder_.setMessage(index, value); } return this; } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public Builder setSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.set(index, builderForValue.build()); + public Builder setSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.set(index, builderForValue.build()); onChanged(); } else { - subjectSetsBuilder_.setMessage(index, builderForValue.build()); + subjectConditionSetsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetsBuilder_ == null) { + public Builder addSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubjectSetsIsMutable(); - subjectSets_.add(value); + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(value); onChanged(); } else { - subjectSetsBuilder_.addMessage(value); + subjectConditionSetsBuilder_.addMessage(value); } return this; } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (subjectSetsBuilder_ == null) { + public Builder addSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, value); + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(index, value); onChanged(); } else { - subjectSetsBuilder_.addMessage(index, value); + subjectConditionSetsBuilder_.addMessage(index, value); } return this; } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public Builder addSubjectSets( - io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(builderForValue.build()); + public Builder addSubjectConditionSets( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(builderForValue.build()); onChanged(); } else { - subjectSetsBuilder_.addMessage(builderForValue.build()); + subjectConditionSetsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public Builder addSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.add(index, builderForValue.build()); + public Builder addSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.add(index, builderForValue.build()); onChanged(); } else { - subjectSetsBuilder_.addMessage(index, builderForValue.build()); + subjectConditionSetsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public Builder addAllSubjectSets( - java.lang.Iterable values) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); + public Builder addAllSubjectConditionSets( + java.lang.Iterable values) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectSets_); + values, subjectConditionSets_); onChanged(); } else { - subjectSetsBuilder_.addAllMessages(values); + subjectConditionSetsBuilder_.addAllMessages(values); } return this; } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public Builder clearSubjectSets() { - if (subjectSetsBuilder_ == null) { - subjectSets_ = java.util.Collections.emptyList(); + public Builder clearSubjectConditionSets() { + if (subjectConditionSetsBuilder_ == null) { + subjectConditionSets_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { - subjectSetsBuilder_.clear(); + subjectConditionSetsBuilder_.clear(); } return this; } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public Builder removeSubjectSets(int index) { - if (subjectSetsBuilder_ == null) { - ensureSubjectSetsIsMutable(); - subjectSets_.remove(index); + public Builder removeSubjectConditionSets(int index) { + if (subjectConditionSetsBuilder_ == null) { + ensureSubjectConditionSetsIsMutable(); + subjectConditionSets_.remove(index); onChanged(); } else { - subjectSetsBuilder_.remove(index); + subjectConditionSetsBuilder_.remove(index); } return this; } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetsBuilder( + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetsBuilder( int index) { - return getSubjectSetsFieldBuilder().getBuilder(index); + return getSubjectConditionSetsFieldBuilder().getBuilder(index); } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( int index) { - if (subjectSetsBuilder_ == null) { - return subjectSets_.get(index); } else { - return subjectSetsBuilder_.getMessageOrBuilder(index); + if (subjectConditionSetsBuilder_ == null) { + return subjectConditionSets_.get(index); } else { + return subjectConditionSetsBuilder_.getMessageOrBuilder(index); } } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public java.util.List - getSubjectSetsOrBuilderList() { - if (subjectSetsBuilder_ != null) { - return subjectSetsBuilder_.getMessageOrBuilderList(); + public java.util.List + getSubjectConditionSetsOrBuilderList() { + if (subjectConditionSetsBuilder_ != null) { + return subjectConditionSetsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(subjectSets_); + return java.util.Collections.unmodifiableList(subjectConditionSets_); } } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder() { - return getSubjectSetsFieldBuilder().addBuilder( - io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addSubjectConditionSetsBuilder() { + return getSubjectConditionSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder( + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addSubjectConditionSetsBuilder( int index) { - return getSubjectSetsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + return getSubjectConditionSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); } /** *
    -     * the subjects included in this mapping
    +     * the reusable SubjectConditionSets mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - public java.util.List - getSubjectSetsBuilderList() { - return getSubjectSetsFieldBuilder().getBuilderList(); + public java.util.List + getSubjectConditionSetsBuilderList() { + return getSubjectConditionSetsFieldBuilder().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_, + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getSubjectConditionSetsFieldBuilder() { + if (subjectConditionSetsBuilder_ == null) { + subjectConditionSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + subjectConditionSets_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - subjectSets_ = null; + subjectConditionSets_ = null; } - return subjectSetsBuilder_; + return subjectConditionSetsBuilder_; } private java.util.List actions_ = diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java new file mode 100644 index 0000000000..72f1f96e42 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java @@ -0,0 +1,1894 @@ +// 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.SubjectMappingCreate} + */ +public final class SubjectMappingCreate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectMappingCreate) + SubjectMappingCreateOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectMappingCreate.newBuilder() to construct. + private SubjectMappingCreate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectMappingCreate() { + attributeValueId_ = ""; + existingSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + newSubjectConditionSets_ = java.util.Collections.emptyList(); + actions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectMappingCreate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.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 ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object attributeValueId_ = ""; + /** + *
    +   * Attribute Value to be mapped to
    +   * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * @return The attributeValueId. + */ + @java.lang.Override + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + 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(); + attributeValueId_ = s; + return s; + } + } + /** + *
    +   * Attribute Value to be mapped to
    +   * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * @return The bytes for attributeValueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXISTING_SUBJECT_CONDITION_SET_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList existingSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
    +   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @return A list containing the existingSubjectConditionSetIds. + */ + public com.google.protobuf.ProtocolStringList + getExistingSubjectConditionSetIdsList() { + return existingSubjectConditionSetIds_; + } + /** + *
    +   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @return The count of existingSubjectConditionSetIds. + */ + public int getExistingSubjectConditionSetIdsCount() { + return existingSubjectConditionSetIds_.size(); + } + /** + *
    +   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param index The index of the element to return. + * @return The existingSubjectConditionSetIds at the given index. + */ + public java.lang.String getExistingSubjectConditionSetIds(int index) { + return existingSubjectConditionSetIds_.get(index); + } + /** + *
    +   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param index The index of the value to return. + * @return The bytes of the existingSubjectConditionSetIds at the given index. + */ + public com.google.protobuf.ByteString + getExistingSubjectConditionSetIdsBytes(int index) { + return existingSubjectConditionSetIds_.getByteString(index); + } + + public static final int NEW_SUBJECT_CONDITION_SETS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List newSubjectConditionSets_; + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + @java.lang.Override + public java.util.List getNewSubjectConditionSetsList() { + return newSubjectConditionSets_; + } + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + @java.lang.Override + public java.util.List + getNewSubjectConditionSetsOrBuilderList() { + return newSubjectConditionSets_; + } + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + @java.lang.Override + public int getNewSubjectConditionSetsCount() { + return newSubjectConditionSets_.size(); + } + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getNewSubjectConditionSets(int index) { + return newSubjectConditionSets_.get(index); + } + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getNewSubjectConditionSetsOrBuilder( + int index) { + return newSubjectConditionSets_.get(index); + } + + public static final int ACTIONS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List actions_; + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.Action getActions(int index) { + return actions_.get(index); + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.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()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeValueId_); + } + for (int i = 0; i < existingSubjectConditionSetIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, existingSubjectConditionSetIds_.getRaw(i)); + } + for (int i = 0; i < newSubjectConditionSets_.size(); i++) { + output.writeMessage(4, newSubjectConditionSets_.get(i)); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(5, actions_.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()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attributeValueId_); + } + { + int dataSize = 0; + for (int i = 0; i < existingSubjectConditionSetIds_.size(); i++) { + dataSize += computeStringSizeNoTag(existingSubjectConditionSetIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getExistingSubjectConditionSetIdsList().size(); + } + for (int i = 0; i < newSubjectConditionSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, newSubjectConditionSets_.get(i)); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, actions_.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.SubjectMappingCreate)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate other = (io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate) obj; + + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (!getAttributeValueId() + .equals(other.getAttributeValueId())) return false; + if (!getExistingSubjectConditionSetIdsList() + .equals(other.getExistingSubjectConditionSetIdsList())) return false; + if (!getNewSubjectConditionSetsList() + .equals(other.getNewSubjectConditionSetsList())) return false; + if (!getActionsList() + .equals(other.getActionsList())) 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(); + } + hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValueId().hashCode(); + if (getExistingSubjectConditionSetIdsCount() > 0) { + hash = (37 * hash) + EXISTING_SUBJECT_CONDITION_SET_IDS_FIELD_NUMBER; + hash = (53 * hash) + getExistingSubjectConditionSetIdsList().hashCode(); + } + if (getNewSubjectConditionSetsCount() > 0) { + hash = (37 * hash) + NEW_SUBJECT_CONDITION_SETS_FIELD_NUMBER; + hash = (53 * hash) + getNewSubjectConditionSetsList().hashCode(); + } + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate 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.SubjectMappingCreate 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.SubjectMappingCreate 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.SubjectMappingCreate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectMappingCreate) + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.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(); + getNewSubjectConditionSetsFieldBuilder(); + getActionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + attributeValueId_ = ""; + existingSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + if (newSubjectConditionSetsBuilder_ == null) { + newSubjectConditionSets_ = java.util.Collections.emptyList(); + } else { + newSubjectConditionSets_ = null; + newSubjectConditionSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000010); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate build() { + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate buildPartial() { + io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate result = new io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate result) { + if (newSubjectConditionSetsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + newSubjectConditionSets_ = java.util.Collections.unmodifiableList(newSubjectConditionSets_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.newSubjectConditionSets_ = newSubjectConditionSets_; + } else { + result.newSubjectConditionSets_ = newSubjectConditionSetsBuilder_.build(); + } + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributeValueId_ = attributeValueId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + existingSubjectConditionSetIds_.makeImmutable(); + result.existingSubjectConditionSetIds_ = existingSubjectConditionSetIds_; + } + 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.SubjectMappingCreate) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate other) { + if (other == io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance()) return this; + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (!other.getAttributeValueId().isEmpty()) { + attributeValueId_ = other.attributeValueId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.existingSubjectConditionSetIds_.isEmpty()) { + if (existingSubjectConditionSetIds_.isEmpty()) { + existingSubjectConditionSetIds_ = other.existingSubjectConditionSetIds_; + bitField0_ |= 0x00000004; + } else { + ensureExistingSubjectConditionSetIdsIsMutable(); + existingSubjectConditionSetIds_.addAll(other.existingSubjectConditionSetIds_); + } + onChanged(); + } + if (newSubjectConditionSetsBuilder_ == null) { + if (!other.newSubjectConditionSets_.isEmpty()) { + if (newSubjectConditionSets_.isEmpty()) { + newSubjectConditionSets_ = other.newSubjectConditionSets_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureNewSubjectConditionSetsIsMutable(); + newSubjectConditionSets_.addAll(other.newSubjectConditionSets_); + } + onChanged(); + } + } else { + if (!other.newSubjectConditionSets_.isEmpty()) { + if (newSubjectConditionSetsBuilder_.isEmpty()) { + newSubjectConditionSetsBuilder_.dispose(); + newSubjectConditionSetsBuilder_ = null; + newSubjectConditionSets_ = other.newSubjectConditionSets_; + bitField0_ = (bitField0_ & ~0x00000008); + newSubjectConditionSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getNewSubjectConditionSetsFieldBuilder() : null; + } else { + newSubjectConditionSetsBuilder_.addAllMessages(other.newSubjectConditionSets_); + } + } + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000010); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getActionsFieldBuilder() : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } + } + 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: { + attributeValueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureExistingSubjectConditionSetIdsIsMutable(); + existingSubjectConditionSetIds_.add(s); + break; + } // case 26 + case 34: { + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet m = + input.readMessage( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.parser(), + extensionRegistry); + if (newSubjectConditionSetsBuilder_ == null) { + ensureNewSubjectConditionSetsIsMutable(); + newSubjectConditionSets_.add(m); + } else { + newSubjectConditionSetsBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + io.opentdf.platform.authorization.Action m = + input.readMessage( + io.opentdf.platform.authorization.Action.parser(), + extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 42 + 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.lang.Object attributeValueId_ = ""; + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * @return The attributeValueId. + */ + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * @return The bytes for attributeValueId. + */ + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * @param value The attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attributeValueId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * @return This builder for chaining. + */ + public Builder clearAttributeValueId() { + attributeValueId_ = getDefaultInstance().getAttributeValueId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * @param value The bytes for attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attributeValueId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringArrayList existingSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureExistingSubjectConditionSetIdsIsMutable() { + if (!existingSubjectConditionSetIds_.isModifiable()) { + existingSubjectConditionSetIds_ = new com.google.protobuf.LazyStringArrayList(existingSubjectConditionSetIds_); + } + bitField0_ |= 0x00000004; + } + /** + *
    +     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @return A list containing the existingSubjectConditionSetIds. + */ + public com.google.protobuf.ProtocolStringList + getExistingSubjectConditionSetIdsList() { + existingSubjectConditionSetIds_.makeImmutable(); + return existingSubjectConditionSetIds_; + } + /** + *
    +     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @return The count of existingSubjectConditionSetIds. + */ + public int getExistingSubjectConditionSetIdsCount() { + return existingSubjectConditionSetIds_.size(); + } + /** + *
    +     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param index The index of the element to return. + * @return The existingSubjectConditionSetIds at the given index. + */ + public java.lang.String getExistingSubjectConditionSetIds(int index) { + return existingSubjectConditionSetIds_.get(index); + } + /** + *
    +     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param index The index of the value to return. + * @return The bytes of the existingSubjectConditionSetIds at the given index. + */ + public com.google.protobuf.ByteString + getExistingSubjectConditionSetIdsBytes(int index) { + return existingSubjectConditionSetIds_.getByteString(index); + } + /** + *
    +     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param index The index to set the value at. + * @param value The existingSubjectConditionSetIds to set. + * @return This builder for chaining. + */ + public Builder setExistingSubjectConditionSetIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureExistingSubjectConditionSetIdsIsMutable(); + existingSubjectConditionSetIds_.set(index, value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
    +     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param value The existingSubjectConditionSetIds to add. + * @return This builder for chaining. + */ + public Builder addExistingSubjectConditionSetIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureExistingSubjectConditionSetIdsIsMutable(); + existingSubjectConditionSetIds_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
    +     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param values The existingSubjectConditionSetIds to add. + * @return This builder for chaining. + */ + public Builder addAllExistingSubjectConditionSetIds( + java.lang.Iterable values) { + ensureExistingSubjectConditionSetIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, existingSubjectConditionSetIds_); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
    +     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @return This builder for chaining. + */ + public Builder clearExistingSubjectConditionSetIds() { + existingSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004);; + onChanged(); + return this; + } + /** + *
    +     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param value The bytes of the existingSubjectConditionSetIds to add. + * @return This builder for chaining. + */ + public Builder addExistingSubjectConditionSetIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureExistingSubjectConditionSetIdsIsMutable(); + existingSubjectConditionSetIds_.add(value); + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List newSubjectConditionSets_ = + java.util.Collections.emptyList(); + private void ensureNewSubjectConditionSetsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + newSubjectConditionSets_ = new java.util.ArrayList(newSubjectConditionSets_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> newSubjectConditionSetsBuilder_; + + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public java.util.List getNewSubjectConditionSetsList() { + if (newSubjectConditionSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(newSubjectConditionSets_); + } else { + return newSubjectConditionSetsBuilder_.getMessageList(); + } + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public int getNewSubjectConditionSetsCount() { + if (newSubjectConditionSetsBuilder_ == null) { + return newSubjectConditionSets_.size(); + } else { + return newSubjectConditionSetsBuilder_.getCount(); + } + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getNewSubjectConditionSets(int index) { + if (newSubjectConditionSetsBuilder_ == null) { + return newSubjectConditionSets_.get(index); + } else { + return newSubjectConditionSetsBuilder_.getMessage(index); + } + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public Builder setNewSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (newSubjectConditionSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNewSubjectConditionSetsIsMutable(); + newSubjectConditionSets_.set(index, value); + onChanged(); + } else { + newSubjectConditionSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public Builder setNewSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (newSubjectConditionSetsBuilder_ == null) { + ensureNewSubjectConditionSetsIsMutable(); + newSubjectConditionSets_.set(index, builderForValue.build()); + onChanged(); + } else { + newSubjectConditionSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public Builder addNewSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (newSubjectConditionSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNewSubjectConditionSetsIsMutable(); + newSubjectConditionSets_.add(value); + onChanged(); + } else { + newSubjectConditionSetsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public Builder addNewSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (newSubjectConditionSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureNewSubjectConditionSetsIsMutable(); + newSubjectConditionSets_.add(index, value); + onChanged(); + } else { + newSubjectConditionSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public Builder addNewSubjectConditionSets( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (newSubjectConditionSetsBuilder_ == null) { + ensureNewSubjectConditionSetsIsMutable(); + newSubjectConditionSets_.add(builderForValue.build()); + onChanged(); + } else { + newSubjectConditionSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public Builder addNewSubjectConditionSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (newSubjectConditionSetsBuilder_ == null) { + ensureNewSubjectConditionSetsIsMutable(); + newSubjectConditionSets_.add(index, builderForValue.build()); + onChanged(); + } else { + newSubjectConditionSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public Builder addAllNewSubjectConditionSets( + java.lang.Iterable values) { + if (newSubjectConditionSetsBuilder_ == null) { + ensureNewSubjectConditionSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, newSubjectConditionSets_); + onChanged(); + } else { + newSubjectConditionSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public Builder clearNewSubjectConditionSets() { + if (newSubjectConditionSetsBuilder_ == null) { + newSubjectConditionSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + newSubjectConditionSetsBuilder_.clear(); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public Builder removeNewSubjectConditionSets(int index) { + if (newSubjectConditionSetsBuilder_ == null) { + ensureNewSubjectConditionSetsIsMutable(); + newSubjectConditionSets_.remove(index); + onChanged(); + } else { + newSubjectConditionSetsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getNewSubjectConditionSetsBuilder( + int index) { + return getNewSubjectConditionSetsFieldBuilder().getBuilder(index); + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getNewSubjectConditionSetsOrBuilder( + int index) { + if (newSubjectConditionSetsBuilder_ == null) { + return newSubjectConditionSets_.get(index); } else { + return newSubjectConditionSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public java.util.List + getNewSubjectConditionSetsOrBuilderList() { + if (newSubjectConditionSetsBuilder_ != null) { + return newSubjectConditionSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(newSubjectConditionSets_); + } + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addNewSubjectConditionSetsBuilder() { + return getNewSubjectConditionSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addNewSubjectConditionSetsBuilder( + int index) { + return getNewSubjectConditionSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); + } + /** + *
    +     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + public java.util.List + getNewSubjectConditionSetsBuilderList() { + return getNewSubjectConditionSetsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getNewSubjectConditionSetsFieldBuilder() { + if (newSubjectConditionSetsBuilder_ == null) { + newSubjectConditionSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + newSubjectConditionSets_, + ((bitField0_ & 0x00000008) != 0), + getParentForChildren(), + isClean()); + newSubjectConditionSets_ = null; + } + return newSubjectConditionSetsBuilder_; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> actionsBuilder_; + + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public io.opentdf.platform.authorization.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public Builder setActions( + int index, io.opentdf.platform.authorization.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public Builder setActions( + int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public Builder addActions(io.opentdf.platform.authorization.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public Builder addActions( + int index, io.opentdf.platform.authorization.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public Builder addActions( + io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public Builder addActions( + int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public io.opentdf.platform.authorization.Action.Builder getActionsBuilder( + int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( + int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public io.opentdf.platform.authorization.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder().addBuilder( + io.opentdf.platform.authorization.Action.getDefaultInstance()); + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( + int index) { + return getActionsFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.Action.getDefaultInstance()); + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( + actions_, + ((bitField0_ & 0x00000010) != 0), + getParentForChildren(), + isClean()); + actions_ = null; + } + return actionsBuilder_; + } + @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.SubjectMappingCreate) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectMappingCreate) + private static final io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate(); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectMappingCreate 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.SubjectMappingCreate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java new file mode 100644 index 0000000000..23a0cfe994 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java @@ -0,0 +1,174 @@ +// 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 SubjectMappingCreateOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectMappingCreate) + 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(); + + /** + *
    +   * Attribute Value to be mapped to
    +   * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * @return The attributeValueId. + */ + java.lang.String getAttributeValueId(); + /** + *
    +   * Attribute Value to be mapped to
    +   * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId"]; + * @return The bytes for attributeValueId. + */ + com.google.protobuf.ByteString + getAttributeValueIdBytes(); + + /** + *
    +   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @return A list containing the existingSubjectConditionSetIds. + */ + java.util.List + getExistingSubjectConditionSetIdsList(); + /** + *
    +   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @return The count of existingSubjectConditionSetIds. + */ + int getExistingSubjectConditionSetIdsCount(); + /** + *
    +   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param index The index of the element to return. + * @return The existingSubjectConditionSetIds at the given index. + */ + java.lang.String getExistingSubjectConditionSetIds(int index); + /** + *
    +   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * 
    + * + * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * @param index The index of the value to return. + * @return The bytes of the existingSubjectConditionSetIds at the given index. + */ + com.google.protobuf.ByteString + getExistingSubjectConditionSetIdsBytes(int index); + + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + java.util.List + getNewSubjectConditionSetsList(); + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getNewSubjectConditionSets(int index); + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + int getNewSubjectConditionSetsCount(); + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + java.util.List + getNewSubjectConditionSetsOrBuilderList(); + /** + *
    +   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getNewSubjectConditionSetsOrBuilder( + int index); + + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + java.util.List + getActionsList(); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + io.opentdf.platform.authorization.Action getActions(int index); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + int getActionsCount(); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + java.util.List + getActionsOrBuilderList(); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions"]; + */ + io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( + int index); +} 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 deleted file mode 100644 index 7d68a7d2be..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateUpdateOrBuilder.java +++ /dev/null @@ -1,133 +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 SubjectMappingCreateUpdateOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectMappingCreateUpdate) - 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(); - - /** - *
    -   * Attribute Value to be mapped to
    -   * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The attributeValueId. - */ - java.lang.String getAttributeValueId(); - /** - *
    -   * Attribute Value to be mapped to
    -   * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The bytes for attributeValueId. - */ - com.google.protobuf.ByteString - getAttributeValueIdBytes(); - - /** - *
    -   * 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.util.List - getSubjectSetsList(); - /** - *
    -   * 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.SubjectSet getSubjectSets(int 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"]; - */ - int getSubjectSetsCount(); - /** - *
    -   * 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.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); - - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - java.util.List - getActionsList(); - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - io.opentdf.platform.authorization.Action getActions(int index); - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - int getActionsCount(); - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - java.util.List - getActionsOrBuilderList(); - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 4 [json_name = "actions"]; - */ - io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( - 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 fd0f7533f3..9e221fd759 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 @@ -37,7 +37,7 @@ public interface SubjectMappingOrBuilder extends /** *
    -   * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
        * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -46,7 +46,7 @@ public interface SubjectMappingOrBuilder extends boolean hasAttributeValue(); /** *
    -   * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
        * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -55,7 +55,7 @@ public interface SubjectMappingOrBuilder extends io.opentdf.platform.policy.attributes.Value getAttributeValue(); /** *
    -   * Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute"
    +   * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
        * 
    * * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; @@ -64,46 +64,46 @@ public interface SubjectMappingOrBuilder extends /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - java.util.List - getSubjectSetsList(); + java.util.List + getSubjectConditionSetsList(); /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSets(int index); /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - int getSubjectSetsCount(); + int getSubjectConditionSetsCount(); /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - java.util.List - getSubjectSetsOrBuilderList(); + java.util.List + getSubjectConditionSetsOrBuilderList(); /** *
    -   * the subjects included in this mapping
    +   * the reusable SubjectConditionSets mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets"]; + * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( int index); /** 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 36ac8f3d04..a352dc951c 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 @@ -30,6 +30,11 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_SubjectSet_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_SubjectConditionSet_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_SubjectConditionSet_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_SubjectMapping_descriptor; static final @@ -50,11 +55,6 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_SubjectMappingCreateUpdate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor; static final @@ -75,6 +75,11 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_SubjectMappingCreate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; static final @@ -85,6 +90,11 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_SubjectMappingUpdate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; static final @@ -105,6 +115,66 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -133,90 +203,167 @@ public static void registerAllExtensions( "\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\"\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" + "ups\"\267\001\n\023SubjectConditionSet\022\016\n\002id\030\001 \001(\tR" + + "\002id\022\022\n\004name\030\002 \001(\tR\004name\022,\n\010metadata\030\003 \001(" + + "\0132\020.common.MetadataR\010metadata\022N\n\014subject" + + "_sets\030\004 \003(\0132!.policy.subjectmapping.Subj" + + "ectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\244\002\n\016Subjec" + + "tMapping\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010metadata\030\002 \001" + + "(\0132\020.common.MetadataR\010metadata\022A\n\017attrib" + + "ute_value\030\003 \001(\0132\030.policy.attributes.Valu" + + "eR\016attributeValue\022`\n\026subject_condition_s" + + "ets\030\004 \003(\0132*.policy.subjectmapping.Subjec" + + "tConditionSetR\024subjectConditionSets\022/\n\007a" + + "ctions\030\005 \003(\0132\025.authorization.ActionR\007act" + + "ions\"B\n\007Subject\0227\n\nattributes\030\001 \001(\0132\027.go" + + "ogle.protobuf.StructR\nattributes\"W\n\033Matc" + + "hSubjectMappingsRequest\0228\n\007subject\030\001 \001(\013" + + "2\036.policy.subjectmapping.SubjectR\007subjec" + + "t\"p\n\034MatchSubjectMappingsResponse\022P\n\020sub" + + "ject_mappings\030\001 \003(\0132%.policy.subjectmapp" + + "ing.SubjectMappingR\017subjectMappings\"2\n\030G" + + "etSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003" + + "\310\001\001R\002id\"k\n\031GetSubjectMappingResponse\022N\n\017" + + "subject_mapping\030\001 \001(\0132%.policy.subjectma" + + "pping.SubjectMappingR\016subjectMapping\"\034\n\032" + + "ListSubjectMappingsRequest\"o\n\033ListSubjec" + + "tMappingsResponse\022P\n\020subject_mappings\030\001 " + + "\003(\0132%.policy.subjectmapping.SubjectMappi" + + "ngR\017subjectMappings\"\337\002\n\024SubjectMappingCr" + + "eate\0223\n\010metadata\030\001 \001(\0132\027.common.Metadata" + + "MutableR\010metadata\022,\n\022attribute_value_id\030" + + "\002 \001(\tR\020attributeValueId\022J\n\"existing_subj" + + "ect_condition_set_ids\030\003 \003(\tR\036existingSub" + + "jectConditionSetIds\022g\n\032new_subject_condi" + + "tion_sets\030\004 \003(\0132*.policy.subjectmapping." + + "SubjectConditionSetR\027newSubjectCondition" + + "Sets\022/\n\007actions\030\005 \003(\0132\025.authorization.Ac" + + "tionR\007actions\"s\n\033CreateSubjectMappingReq" + + "uest\022T\n\017subject_mapping\030\001 \001(\0132+.policy.s" + + "ubjectmapping.SubjectMappingCreateR\016subj" + + "ectMapping\"n\n\034CreateSubjectMappingRespon" + + "se\022N\n\017subject_mapping\030\001 \001(\0132%.policy.sub" + + "jectmapping.SubjectMappingR\016subjectMappi" + + "ng\"\344\001\n\024SubjectMappingUpdate\022B\n\020updated_m" + + "etadata\030\002 \001(\0132\027.common.MetadataMutableR\017" + + "updatedMetadata\022H\n!updated_subject_condi" + + "tion_set_ids\030\003 \003(\tR\035updatedSubjectCondit" + + "ionSetIds\022>\n\017udpated_actions\030\005 \003(\0132\025.aut" + + "horization.ActionR\016udpatedActions\"\213\001\n\033Up" + + "dateSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272" + + "H\003\310\001\001R\002id\022T\n\017subject_mapping\030\002 \001(\0132+.pol" + + "icy.subjectmapping.SubjectMappingUpdateR" + + "\016subjectMapping\"n\n\034UpdateSubjectMappingR" + + "esponse\022N\n\017subject_mapping\030\001 \001(\0132%.polic" + + "y.subjectmapping.SubjectMappingR\016subject" + + "Mapping\"5\n\033DeleteSubjectMappingRequest\022\026" + + "\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectM" + + "appingResponse\022N\n\017subject_mapping\030\001 \001(\0132" + + "%.policy.subjectmapping.SubjectMappingR\016" + + "subjectMapping\"7\n\035GetSubjectConditionSet" + + "Request\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetS" + + "ubjectConditionSetResponse\022^\n\025subject_co" + + "ndition_set\030\001 \001(\0132*.policy.subjectmappin" + + "g.SubjectConditionSetR\023subjectConditionS" + + "et\022e\n\033associated_subject_mappings\030\002 \003(\0132" + + "%.policy.subjectmapping.SubjectMappingR\031" + + "associatedSubjectMappings\"!\n\037ListSubject" + + "ConditionSetsRequest\"\204\001\n ListSubjectCond" + + "itionSetsResponse\022`\n\026subject_condition_s" + + "ets\030\001 \003(\0132*.policy.subjectmapping.Subjec" + + "tConditionSetR\024subjectConditionSets\"\264\001\n\031" + + "SubjectConditionSetCreate\0223\n\010metadata\030\001 " + + "\001(\0132\027.common.MetadataMutableR\010metadata\022\022" + + "\n\004name\030\002 \001(\tR\004name\022N\n\014subject_sets\030\003 \003(\013" + + "2!.policy.subjectmapping.SubjectSetB\010\272H\005" + + "\222\001\002\010\001R\013subjectSets\"\210\001\n CreateSubjectCond" + + "itionSetRequest\022d\n\025subject_condition_set" + + "\030\001 \001(\01320.policy.subjectmapping.SubjectCo" + + "nditionSetCreateR\023subjectConditionSet\"\203\001" + + "\n!CreateSubjectConditionSetResponse\022^\n\025s" + + "ubject_condition_set\030\001 \001(\0132*.policy.subj" + + "ectmapping.SubjectConditionSetR\023subjectC" + + "onditionSet\"\276\001\n\031SubjectConditionSetUpdat" + + "e\022B\n\020updated_metadata\030\002 \001(\0132\027.common.Met" + + "adataMutableR\017updatedMetadata\022]\n\024updated" + + "_subject_sets\030\003 \003(\0132!.policy.subjectmapp" + + "ing.SubjectSetB\010\272H\005\222\001\002\010\001R\022updatedSubject" + + "Sets\"\240\001\n UpdateSubjectConditionSetReques" + + "t\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022d\n\025subject_con" + + "dition_set\030\002 \001(\01320.policy.subjectmapping" + + ".SubjectConditionSetUpdateR\023subjectCondi" + + "tionSet\"\203\001\n!UpdateSubjectConditionSetRes" + + "ponse\022^\n\025subject_condition_set\030\001 \001(\0132*.p" + + "olicy.subjectmapping.SubjectConditionSet" + + "R\023subjectConditionSet\":\n DeleteSubjectCo" + + "nditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002i" + + "d\"\203\001\n!DeleteSubjectConditionSetResponse\022" + + "^\n\025subject_condition_set\030\001 \001(\0132*.policy." + + "subjectmapping.SubjectConditionSetR\023subj" + + "ectConditionSet*\233\001\n\032SubjectMappingOperat" + + "orEnum\022-\n)SUBJECT_MAPPING_OPERATOR_ENUM_" + + "UNSPECIFIED\020\000\022$\n SUBJECT_MAPPING_OPERATO" + + "R_ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_" + + "ENUM_NOT_IN\020\002*\220\001\n\030ConditionBooleanTypeEn" + + "um\022+\n\'CONDITION_BOOLEAN_TYPE_ENUM_UNSPEC" + + "IFIED\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_ENUM_A" + + "ND\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_OR\020\002" + + "2\244\017\n\025SubjectMappingService\022\251\001\n\024MatchSubj" + + "ectMappings\0222.policy.subjectmapping.Matc" + + "hSubjectMappingsRequest\0323.policy.subject" + + "mapping.MatchSubjectMappingsResponse\"(\202\323" + + "\344\223\002\"\"\027/subject-mappings/match:\007subject\022\227" + + "\001\n\023ListSubjectMappings\0221.policy.subjectm" + + "apping.ListSubjectMappingsRequest\0322.poli" + + "cy.subjectmapping.ListSubjectMappingsRes" + + "ponse\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021Get" + + "SubjectMapping\022/.policy.subjectmapping.G" + + "etSubjectMappingRequest\0320.policy.subject" + + "mapping.GetSubjectMappingResponse\"\036\202\323\344\223\002" + + "\030\022\026/subject-mappings/{id}\022\253\001\n\024CreateSubj" + + "ectMapping\0222.policy.subjectmapping.Creat" + + "eSubjectMappingRequest\0323.policy.subjectm" + + "apping.CreateSubjectMappingResponse\"*\202\323\344" + + "\223\002$\"\021/subject-mappings:\017subject_mapping\022" + + "\260\001\n\024UpdateSubjectMapping\0222.policy.subjec" + + "tmapping.UpdateSubjectMappingRequest\0323.p" + + "olicy.subjectmapping.UpdateSubjectMappin" + + "gResponse\"/\202\323\344\223\002)\"\026/subject-mappings/{id" + + "}:\017subject_mapping\022\237\001\n\024DeleteSubjectMapp" + + "ing\0222.policy.subjectmapping.DeleteSubjec" + + "tMappingRequest\0323.policy.subjectmapping." + + "DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030*\026/s" + + "ubject-mappings/{id}\022\254\001\n\030ListSubjectCond" + + "itionSets\0226.policy.subjectmapping.ListSu" + + "bjectConditionSetsRequest\0327.policy.subje" + + "ctmapping.ListSubjectConditionSetsRespon" + + "se\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022\253\001\n\026" + + "GetSubjectConditionSet\0224.policy.subjectm" + + "apping.GetSubjectConditionSetRequest\0325.p" + + "olicy.subjectmapping.GetSubjectCondition" + + "SetResponse\"$\202\323\344\223\002\036\022\034/subject-condition-" + + "sets/{id}\022\306\001\n\031CreateSubjectConditionSet\022" + + "7.policy.subjectmapping.CreateSubjectCon" + + "ditionSetRequest\0328.policy.subjectmapping" + + ".CreateSubjectConditionSetResponse\"6\202\323\344\223" + + "\0020\"\027/subject-condition-sets:\025subject_con" + + "dition_set\022\313\001\n\031UpdateSubjectConditionSet" + + "\0227.policy.subjectmapping.UpdateSubjectCo" + + "nditionSetRequest\0328.policy.subjectmappin" + + "g.UpdateSubjectConditionSetResponse\";\202\323\344" + + "\223\00252\034/subject-condition-sets/{id}:\025subje" + + "ct_condition_set\022\264\001\n\031DeleteSubjectCondit" + + "ionSet\0227.policy.subjectmapping.DeleteSub" + + "jectConditionSetRequest\0328.policy.subject" + + "mapping.DeleteSubjectConditionSetRespons" + + "e\"$\202\323\344\223\002\036*\034/subject-condition-sets/{id}B" + + "\364\001\n)io.opentdf.platform.policy.subjectma" + + "ppingB\023SubjectMappingProtoP\001Z=github.com" + + "/opentdf/platform/protocol/go/policy/sub" + + "jectmapping\242\002\003PSX\252\002\025Policy.Subjectmappin" + + "g\312\002\025Policy\\Subjectmapping\342\002!Policy\\Subje" + + "ctmapping\\GPBMetadata\352\002\026Policy::Subjectm" + + "appingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -246,36 +393,36 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectSet_descriptor, new java.lang.String[] { "ConditionGroups", }); - internal_static_policy_subjectmapping_SubjectMapping_descriptor = + internal_static_policy_subjectmapping_SubjectConditionSet_descriptor = getDescriptor().getMessageTypes().get(3); + internal_static_policy_subjectmapping_SubjectConditionSet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_SubjectConditionSet_descriptor, + new java.lang.String[] { "Id", "Name", "Metadata", "SubjectSets", }); + internal_static_policy_subjectmapping_SubjectMapping_descriptor = + getDescriptor().getMessageTypes().get(4); 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", }); + new java.lang.String[] { "Id", "Metadata", "AttributeValue", "SubjectConditionSets", "Actions", }); internal_static_policy_subjectmapping_Subject_descriptor = - getDescriptor().getMessageTypes().get(4); + getDescriptor().getMessageTypes().get(5); 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(5); + getDescriptor().getMessageTypes().get(6); 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(6); + getDescriptor().getMessageTypes().get(7); 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(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", "SubjectSets", "Actions", }); internal_static_policy_subjectmapping_GetSubjectMappingRequest_descriptor = getDescriptor().getMessageTypes().get(8); internal_static_policy_subjectmapping_GetSubjectMappingRequest_fieldAccessorTable = new @@ -300,42 +447,126 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor, new java.lang.String[] { "SubjectMappings", }); - internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor = + internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor = getDescriptor().getMessageTypes().get(12); + internal_static_policy_subjectmapping_SubjectMappingCreate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor, + new java.lang.String[] { "Metadata", "AttributeValueId", "ExistingSubjectConditionSetIds", "NewSubjectConditionSets", "Actions", }); + internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor = + getDescriptor().getMessageTypes().get(13); 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(13); + getDescriptor().getMessageTypes().get(14); 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_SubjectMappingUpdate_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_policy_subjectmapping_SubjectMappingUpdate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor, + new java.lang.String[] { "UpdatedMetadata", "UpdatedSubjectConditionSetIds", "UdpatedActions", }); internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(14); + getDescriptor().getMessageTypes().get(16); 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(15); + getDescriptor().getMessageTypes().get(17); 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(16); + getDescriptor().getMessageTypes().get(18); 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(17); + getDescriptor().getMessageTypes().get(19); internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor, new java.lang.String[] { "SubjectMapping", }); + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor, + new java.lang.String[] { "SubjectConditionSet", "AssociatedSubjectMappings", }); + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor, + new java.lang.String[] { }); + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor, + new java.lang.String[] { "SubjectConditionSets", }); + internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor, + new java.lang.String[] { "Metadata", "Name", "SubjectSets", }); + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor, + new java.lang.String[] { "SubjectConditionSet", }); + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor, + new java.lang.String[] { "SubjectConditionSet", }); + internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor, + new java.lang.String[] { "UpdatedMetadata", "UpdatedSubjectSets", }); + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor, + new java.lang.String[] { "Id", "SubjectConditionSet", }); + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor, + new java.lang.String[] { "SubjectConditionSet", }); + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor, + new java.lang.String[] { "Id", }); + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor, + new java.lang.String[] { "SubjectConditionSet", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(build.buf.validate.ValidateProto.field); 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 7002cf8758..7ee3b15579 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 @@ -201,6 +201,161 @@ io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse> getDelet return getDeleteSubjectMappingMethod; } + private static volatile io.grpc.MethodDescriptor getListSubjectConditionSetsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSubjectConditionSets", + requestType = io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getListSubjectConditionSetsMethod() { + io.grpc.MethodDescriptor getListSubjectConditionSetsMethod; + if ((getListSubjectConditionSetsMethod = SubjectMappingServiceGrpc.getListSubjectConditionSetsMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getListSubjectConditionSetsMethod = SubjectMappingServiceGrpc.getListSubjectConditionSetsMethod) == null) { + SubjectMappingServiceGrpc.getListSubjectConditionSetsMethod = getListSubjectConditionSetsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSubjectConditionSets")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("ListSubjectConditionSets")) + .build(); + } + } + } + return getListSubjectConditionSetsMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetSubjectConditionSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSubjectConditionSet", + requestType = io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetSubjectConditionSetMethod() { + io.grpc.MethodDescriptor getGetSubjectConditionSetMethod; + if ((getGetSubjectConditionSetMethod = SubjectMappingServiceGrpc.getGetSubjectConditionSetMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getGetSubjectConditionSetMethod = SubjectMappingServiceGrpc.getGetSubjectConditionSetMethod) == null) { + SubjectMappingServiceGrpc.getGetSubjectConditionSetMethod = getGetSubjectConditionSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSubjectConditionSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("GetSubjectConditionSet")) + .build(); + } + } + } + return getGetSubjectConditionSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getCreateSubjectConditionSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateSubjectConditionSet", + requestType = io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getCreateSubjectConditionSetMethod() { + io.grpc.MethodDescriptor getCreateSubjectConditionSetMethod; + if ((getCreateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getCreateSubjectConditionSetMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getCreateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getCreateSubjectConditionSetMethod) == null) { + SubjectMappingServiceGrpc.getCreateSubjectConditionSetMethod = getCreateSubjectConditionSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateSubjectConditionSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("CreateSubjectConditionSet")) + .build(); + } + } + } + return getCreateSubjectConditionSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getUpdateSubjectConditionSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateSubjectConditionSet", + requestType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getUpdateSubjectConditionSetMethod() { + io.grpc.MethodDescriptor getUpdateSubjectConditionSetMethod; + if ((getUpdateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getUpdateSubjectConditionSetMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getUpdateSubjectConditionSetMethod = SubjectMappingServiceGrpc.getUpdateSubjectConditionSetMethod) == null) { + SubjectMappingServiceGrpc.getUpdateSubjectConditionSetMethod = getUpdateSubjectConditionSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateSubjectConditionSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("UpdateSubjectConditionSet")) + .build(); + } + } + } + return getUpdateSubjectConditionSetMethod; + } + + private static volatile io.grpc.MethodDescriptor getDeleteSubjectConditionSetMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteSubjectConditionSet", + requestType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.class, + responseType = io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getDeleteSubjectConditionSetMethod() { + io.grpc.MethodDescriptor getDeleteSubjectConditionSetMethod; + if ((getDeleteSubjectConditionSetMethod = SubjectMappingServiceGrpc.getDeleteSubjectConditionSetMethod) == null) { + synchronized (SubjectMappingServiceGrpc.class) { + if ((getDeleteSubjectConditionSetMethod = SubjectMappingServiceGrpc.getDeleteSubjectConditionSetMethod) == null) { + SubjectMappingServiceGrpc.getDeleteSubjectConditionSetMethod = getDeleteSubjectConditionSetMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteSubjectConditionSet")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance())) + .setSchemaDescriptor(new SubjectMappingServiceMethodDescriptorSupplier("DeleteSubjectConditionSet")) + .build(); + } + } + } + return getDeleteSubjectConditionSetMethod; + } + /** * Creates a new async stub that supports all call types for the service */ @@ -293,6 +448,41 @@ default void deleteSubjectMapping(io.opentdf.platform.policy.subjectmapping.Dele io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubjectMappingMethod(), responseObserver); } + + /** + */ + default void listSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListSubjectConditionSetsMethod(), responseObserver); + } + + /** + */ + default void getSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetSubjectConditionSetMethod(), responseObserver); + } + + /** + */ + default void createSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateSubjectConditionSetMethod(), responseObserver); + } + + /** + */ + default void updateSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateSubjectConditionSetMethod(), responseObserver); + } + + /** + */ + default void deleteSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteSubjectConditionSetMethod(), responseObserver); + } } /** @@ -372,6 +562,46 @@ public void deleteSubjectMapping(io.opentdf.platform.policy.subjectmapping.Delet io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getDeleteSubjectMappingMethod(), getCallOptions()), request, responseObserver); } + + /** + */ + public void listSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListSubjectConditionSetsMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void createSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void updateSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void deleteSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteSubjectConditionSetMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -434,6 +664,41 @@ public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse de return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeleteSubjectMappingMethod(), getCallOptions(), request); } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse listSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListSubjectConditionSetsMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse getSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSubjectConditionSetMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse createSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateSubjectConditionSetMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse updateSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateSubjectConditionSetMethod(), getCallOptions(), request); + } + + /** + */ + public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse deleteSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteSubjectConditionSetMethod(), getCallOptions(), request); + } } /** @@ -502,6 +767,46 @@ public com.google.common.util.concurrent.ListenableFuture listSubjectConditionSets( + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListSubjectConditionSetsMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSubjectConditionSetMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture createSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateSubjectConditionSetMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture updateSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateSubjectConditionSetMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture deleteSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteSubjectConditionSetMethod(), getCallOptions()), request); + } } private static final int METHODID_MATCH_SUBJECT_MAPPINGS = 0; @@ -510,6 +815,11 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -552,6 +862,26 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.deleteSubjectMapping((io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_LIST_SUBJECT_CONDITION_SETS: + serviceImpl.listSubjectConditionSets((io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_SUBJECT_CONDITION_SET: + serviceImpl.getSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SUBJECT_CONDITION_SET: + serviceImpl.createSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_SUBJECT_CONDITION_SET: + serviceImpl.updateSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SUBJECT_CONDITION_SET: + serviceImpl.deleteSubjectConditionSet((io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -612,6 +942,41 @@ public static final io.grpc.ServerServiceDefinition bindService(AsyncService ser io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingRequest, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse>( service, METHODID_DELETE_SUBJECT_MAPPING))) + .addMethod( + getListSubjectConditionSetsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsRequest, + io.opentdf.platform.policy.subjectmapping.ListSubjectConditionSetsResponse>( + service, METHODID_LIST_SUBJECT_CONDITION_SETS))) + .addMethod( + getGetSubjectConditionSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetRequest, + io.opentdf.platform.policy.subjectmapping.GetSubjectConditionSetResponse>( + service, METHODID_GET_SUBJECT_CONDITION_SET))) + .addMethod( + getCreateSubjectConditionSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRequest, + io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse>( + service, METHODID_CREATE_SUBJECT_CONDITION_SET))) + .addMethod( + getUpdateSubjectConditionSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest, + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse>( + service, METHODID_UPDATE_SUBJECT_CONDITION_SET))) + .addMethod( + getDeleteSubjectConditionSetMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRequest, + io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse>( + service, METHODID_DELETE_SUBJECT_CONDITION_SET))) .build(); } @@ -666,6 +1031,11 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreateSubjectMappingMethod()) .addMethod(getUpdateSubjectMappingMethod()) .addMethod(getDeleteSubjectMappingMethod()) + .addMethod(getListSubjectConditionSetsMethod()) + .addMethod(getGetSubjectConditionSetMethod()) + .addMethod(getCreateSubjectConditionSetMethod()) + .addMethod(getUpdateSubjectConditionSetMethod()) + .addMethod(getDeleteSubjectConditionSetMethod()) .build(); } } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java new file mode 100644 index 0000000000..2f80b3e51c --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java @@ -0,0 +1,1287 @@ +// 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.SubjectMappingUpdate} + */ +public final class SubjectMappingUpdate extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectMappingUpdate) + SubjectMappingUpdateOrBuilder { +private static final long serialVersionUID = 0L; + // Use SubjectMappingUpdate.newBuilder() to construct. + private SubjectMappingUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private SubjectMappingUpdate() { + updatedSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + udpatedActions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new SubjectMappingUpdate(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder.class); + } + + private int bitField0_; + public static final int UPDATED_METADATA_FIELD_NUMBER = 2; + private io.opentdf.platform.common.MetadataMutable updatedMetadata_; + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return Whether the updatedMetadata field is set. + */ + @java.lang.Override + public boolean hasUpdatedMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return The updatedMetadata. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutable getUpdatedMetadata() { + return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder() { + return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + } + + public static final int UPDATED_SUBJECT_CONDITION_SET_IDS_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList updatedSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + *
    +   * Replaces entire list of existing SubjectConditionSet ids
    +   * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @return A list containing the updatedSubjectConditionSetIds. + */ + public com.google.protobuf.ProtocolStringList + getUpdatedSubjectConditionSetIdsList() { + return updatedSubjectConditionSetIds_; + } + /** + *
    +   * Replaces entire list of existing SubjectConditionSet ids
    +   * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @return The count of updatedSubjectConditionSetIds. + */ + public int getUpdatedSubjectConditionSetIdsCount() { + return updatedSubjectConditionSetIds_.size(); + } + /** + *
    +   * Replaces entire list of existing SubjectConditionSet ids
    +   * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param index The index of the element to return. + * @return The updatedSubjectConditionSetIds at the given index. + */ + public java.lang.String getUpdatedSubjectConditionSetIds(int index) { + return updatedSubjectConditionSetIds_.get(index); + } + /** + *
    +   * Replaces entire list of existing SubjectConditionSet ids
    +   * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param index The index of the value to return. + * @return The bytes of the updatedSubjectConditionSetIds at the given index. + */ + public com.google.protobuf.ByteString + getUpdatedSubjectConditionSetIdsBytes(int index) { + return updatedSubjectConditionSetIds_.getByteString(index); + } + + public static final int UDPATED_ACTIONS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List udpatedActions_; + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + @java.lang.Override + public java.util.List getUdpatedActionsList() { + return udpatedActions_; + } + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + @java.lang.Override + public java.util.List + getUdpatedActionsOrBuilderList() { + return udpatedActions_; + } + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + @java.lang.Override + public int getUdpatedActionsCount() { + return udpatedActions_.size(); + } + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.Action getUdpatedActions(int index) { + return udpatedActions_.get(index); + } + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.ActionOrBuilder getUdpatedActionsOrBuilder( + int index) { + return udpatedActions_.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(2, getUpdatedMetadata()); + } + for (int i = 0; i < updatedSubjectConditionSetIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, updatedSubjectConditionSetIds_.getRaw(i)); + } + for (int i = 0; i < udpatedActions_.size(); i++) { + output.writeMessage(5, udpatedActions_.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(2, getUpdatedMetadata()); + } + { + int dataSize = 0; + for (int i = 0; i < updatedSubjectConditionSetIds_.size(); i++) { + dataSize += computeStringSizeNoTag(updatedSubjectConditionSetIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getUpdatedSubjectConditionSetIdsList().size(); + } + for (int i = 0; i < udpatedActions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, udpatedActions_.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.SubjectMappingUpdate)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate other = (io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate) obj; + + if (hasUpdatedMetadata() != other.hasUpdatedMetadata()) return false; + if (hasUpdatedMetadata()) { + if (!getUpdatedMetadata() + .equals(other.getUpdatedMetadata())) return false; + } + if (!getUpdatedSubjectConditionSetIdsList() + .equals(other.getUpdatedSubjectConditionSetIdsList())) return false; + if (!getUdpatedActionsList() + .equals(other.getUdpatedActionsList())) 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 (hasUpdatedMetadata()) { + hash = (37 * hash) + UPDATED_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getUpdatedMetadata().hashCode(); + } + if (getUpdatedSubjectConditionSetIdsCount() > 0) { + hash = (37 * hash) + UPDATED_SUBJECT_CONDITION_SET_IDS_FIELD_NUMBER; + hash = (53 * hash) + getUpdatedSubjectConditionSetIdsList().hashCode(); + } + if (getUdpatedActionsCount() > 0) { + hash = (37 * hash) + UDPATED_ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getUdpatedActionsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate 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.SubjectMappingUpdate 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.SubjectMappingUpdate 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.SubjectMappingUpdate} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectMappingUpdate) + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getUpdatedMetadataFieldBuilder(); + getUdpatedActionsFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + updatedMetadata_ = null; + if (updatedMetadataBuilder_ != null) { + updatedMetadataBuilder_.dispose(); + updatedMetadataBuilder_ = null; + } + updatedSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + if (udpatedActionsBuilder_ == null) { + udpatedActions_ = java.util.Collections.emptyList(); + } else { + udpatedActions_ = null; + udpatedActionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate build() { + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate buildPartial() { + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate result = new io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate result) { + if (udpatedActionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + udpatedActions_ = java.util.Collections.unmodifiableList(udpatedActions_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.udpatedActions_ = udpatedActions_; + } else { + result.udpatedActions_ = udpatedActionsBuilder_.build(); + } + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.updatedMetadata_ = updatedMetadataBuilder_ == null + ? updatedMetadata_ + : updatedMetadataBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + updatedSubjectConditionSetIds_.makeImmutable(); + result.updatedSubjectConditionSetIds_ = updatedSubjectConditionSetIds_; + } + 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.SubjectMappingUpdate) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate other) { + if (other == io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance()) return this; + if (other.hasUpdatedMetadata()) { + mergeUpdatedMetadata(other.getUpdatedMetadata()); + } + if (!other.updatedSubjectConditionSetIds_.isEmpty()) { + if (updatedSubjectConditionSetIds_.isEmpty()) { + updatedSubjectConditionSetIds_ = other.updatedSubjectConditionSetIds_; + bitField0_ |= 0x00000002; + } else { + ensureUpdatedSubjectConditionSetIdsIsMutable(); + updatedSubjectConditionSetIds_.addAll(other.updatedSubjectConditionSetIds_); + } + onChanged(); + } + if (udpatedActionsBuilder_ == null) { + if (!other.udpatedActions_.isEmpty()) { + if (udpatedActions_.isEmpty()) { + udpatedActions_ = other.udpatedActions_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUdpatedActionsIsMutable(); + udpatedActions_.addAll(other.udpatedActions_); + } + onChanged(); + } + } else { + if (!other.udpatedActions_.isEmpty()) { + if (udpatedActionsBuilder_.isEmpty()) { + udpatedActionsBuilder_.dispose(); + udpatedActionsBuilder_ = null; + udpatedActions_ = other.udpatedActions_; + bitField0_ = (bitField0_ & ~0x00000004); + udpatedActionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUdpatedActionsFieldBuilder() : null; + } else { + udpatedActionsBuilder_.addAllMessages(other.udpatedActions_); + } + } + } + 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 18: { + input.readMessage( + getUpdatedMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureUpdatedSubjectConditionSetIdsIsMutable(); + updatedSubjectConditionSetIds_.add(s); + break; + } // case 26 + case 42: { + io.opentdf.platform.authorization.Action m = + input.readMessage( + io.opentdf.platform.authorization.Action.parser(), + extensionRegistry); + if (udpatedActionsBuilder_ == null) { + ensureUdpatedActionsIsMutable(); + udpatedActions_.add(m); + } else { + udpatedActionsBuilder_.addMessage(m); + } + break; + } // case 42 + 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 updatedMetadata_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updatedMetadataBuilder_; + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return Whether the updatedMetadata field is set. + */ + public boolean hasUpdatedMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return The updatedMetadata. + */ + public io.opentdf.platform.common.MetadataMutable getUpdatedMetadata() { + if (updatedMetadataBuilder_ == null) { + return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + } else { + return updatedMetadataBuilder_.getMessage(); + } + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public Builder setUpdatedMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updatedMetadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updatedMetadata_ = value; + } else { + updatedMetadataBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public Builder setUpdatedMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (updatedMetadataBuilder_ == null) { + updatedMetadata_ = builderForValue.build(); + } else { + updatedMetadataBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public Builder mergeUpdatedMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updatedMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + updatedMetadata_ != null && + updatedMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getUpdatedMetadataBuilder().mergeFrom(value); + } else { + updatedMetadata_ = value; + } + } else { + updatedMetadataBuilder_.mergeFrom(value); + } + if (updatedMetadata_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public Builder clearUpdatedMetadata() { + bitField0_ = (bitField0_ & ~0x00000001); + updatedMetadata_ = null; + if (updatedMetadataBuilder_ != null) { + updatedMetadataBuilder_.dispose(); + updatedMetadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getUpdatedMetadataBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getUpdatedMetadataFieldBuilder().getBuilder(); + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder() { + if (updatedMetadataBuilder_ != null) { + return updatedMetadataBuilder_.getMessageOrBuilder(); + } else { + return updatedMetadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + } + } + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getUpdatedMetadataFieldBuilder() { + if (updatedMetadataBuilder_ == null) { + updatedMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getUpdatedMetadata(), + getParentForChildren(), + isClean()); + updatedMetadata_ = null; + } + return updatedMetadataBuilder_; + } + + private com.google.protobuf.LazyStringArrayList updatedSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureUpdatedSubjectConditionSetIdsIsMutable() { + if (!updatedSubjectConditionSetIds_.isModifiable()) { + updatedSubjectConditionSetIds_ = new com.google.protobuf.LazyStringArrayList(updatedSubjectConditionSetIds_); + } + bitField0_ |= 0x00000002; + } + /** + *
    +     * Replaces entire list of existing SubjectConditionSet ids
    +     * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @return A list containing the updatedSubjectConditionSetIds. + */ + public com.google.protobuf.ProtocolStringList + getUpdatedSubjectConditionSetIdsList() { + updatedSubjectConditionSetIds_.makeImmutable(); + return updatedSubjectConditionSetIds_; + } + /** + *
    +     * Replaces entire list of existing SubjectConditionSet ids
    +     * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @return The count of updatedSubjectConditionSetIds. + */ + public int getUpdatedSubjectConditionSetIdsCount() { + return updatedSubjectConditionSetIds_.size(); + } + /** + *
    +     * Replaces entire list of existing SubjectConditionSet ids
    +     * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param index The index of the element to return. + * @return The updatedSubjectConditionSetIds at the given index. + */ + public java.lang.String getUpdatedSubjectConditionSetIds(int index) { + return updatedSubjectConditionSetIds_.get(index); + } + /** + *
    +     * Replaces entire list of existing SubjectConditionSet ids
    +     * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param index The index of the value to return. + * @return The bytes of the updatedSubjectConditionSetIds at the given index. + */ + public com.google.protobuf.ByteString + getUpdatedSubjectConditionSetIdsBytes(int index) { + return updatedSubjectConditionSetIds_.getByteString(index); + } + /** + *
    +     * Replaces entire list of existing SubjectConditionSet ids
    +     * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param index The index to set the value at. + * @param value The updatedSubjectConditionSetIds to set. + * @return This builder for chaining. + */ + public Builder setUpdatedSubjectConditionSetIds( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUpdatedSubjectConditionSetIdsIsMutable(); + updatedSubjectConditionSetIds_.set(index, value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * Replaces entire list of existing SubjectConditionSet ids
    +     * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param value The updatedSubjectConditionSetIds to add. + * @return This builder for chaining. + */ + public Builder addUpdatedSubjectConditionSetIds( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureUpdatedSubjectConditionSetIdsIsMutable(); + updatedSubjectConditionSetIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * Replaces entire list of existing SubjectConditionSet ids
    +     * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param values The updatedSubjectConditionSetIds to add. + * @return This builder for chaining. + */ + public Builder addAllUpdatedSubjectConditionSetIds( + java.lang.Iterable values) { + ensureUpdatedSubjectConditionSetIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, updatedSubjectConditionSetIds_); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * Replaces entire list of existing SubjectConditionSet ids
    +     * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @return This builder for chaining. + */ + public Builder clearUpdatedSubjectConditionSetIds() { + updatedSubjectConditionSetIds_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; + onChanged(); + return this; + } + /** + *
    +     * Replaces entire list of existing SubjectConditionSet ids
    +     * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param value The bytes of the updatedSubjectConditionSetIds to add. + * @return This builder for chaining. + */ + public Builder addUpdatedSubjectConditionSetIdsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureUpdatedSubjectConditionSetIdsIsMutable(); + updatedSubjectConditionSetIds_.add(value); + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.util.List udpatedActions_ = + java.util.Collections.emptyList(); + private void ensureUdpatedActionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + udpatedActions_ = new java.util.ArrayList(udpatedActions_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> udpatedActionsBuilder_; + + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public java.util.List getUdpatedActionsList() { + if (udpatedActionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(udpatedActions_); + } else { + return udpatedActionsBuilder_.getMessageList(); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public int getUdpatedActionsCount() { + if (udpatedActionsBuilder_ == null) { + return udpatedActions_.size(); + } else { + return udpatedActionsBuilder_.getCount(); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public io.opentdf.platform.authorization.Action getUdpatedActions(int index) { + if (udpatedActionsBuilder_ == null) { + return udpatedActions_.get(index); + } else { + return udpatedActionsBuilder_.getMessage(index); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public Builder setUdpatedActions( + int index, io.opentdf.platform.authorization.Action value) { + if (udpatedActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUdpatedActionsIsMutable(); + udpatedActions_.set(index, value); + onChanged(); + } else { + udpatedActionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public Builder setUdpatedActions( + int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (udpatedActionsBuilder_ == null) { + ensureUdpatedActionsIsMutable(); + udpatedActions_.set(index, builderForValue.build()); + onChanged(); + } else { + udpatedActionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public Builder addUdpatedActions(io.opentdf.platform.authorization.Action value) { + if (udpatedActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUdpatedActionsIsMutable(); + udpatedActions_.add(value); + onChanged(); + } else { + udpatedActionsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public Builder addUdpatedActions( + int index, io.opentdf.platform.authorization.Action value) { + if (udpatedActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUdpatedActionsIsMutable(); + udpatedActions_.add(index, value); + onChanged(); + } else { + udpatedActionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public Builder addUdpatedActions( + io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (udpatedActionsBuilder_ == null) { + ensureUdpatedActionsIsMutable(); + udpatedActions_.add(builderForValue.build()); + onChanged(); + } else { + udpatedActionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public Builder addUdpatedActions( + int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (udpatedActionsBuilder_ == null) { + ensureUdpatedActionsIsMutable(); + udpatedActions_.add(index, builderForValue.build()); + onChanged(); + } else { + udpatedActionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public Builder addAllUdpatedActions( + java.lang.Iterable values) { + if (udpatedActionsBuilder_ == null) { + ensureUdpatedActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, udpatedActions_); + onChanged(); + } else { + udpatedActionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public Builder clearUdpatedActions() { + if (udpatedActionsBuilder_ == null) { + udpatedActions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + udpatedActionsBuilder_.clear(); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public Builder removeUdpatedActions(int index) { + if (udpatedActionsBuilder_ == null) { + ensureUdpatedActionsIsMutable(); + udpatedActions_.remove(index); + onChanged(); + } else { + udpatedActionsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public io.opentdf.platform.authorization.Action.Builder getUdpatedActionsBuilder( + int index) { + return getUdpatedActionsFieldBuilder().getBuilder(index); + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public io.opentdf.platform.authorization.ActionOrBuilder getUdpatedActionsOrBuilder( + int index) { + if (udpatedActionsBuilder_ == null) { + return udpatedActions_.get(index); } else { + return udpatedActionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public java.util.List + getUdpatedActionsOrBuilderList() { + if (udpatedActionsBuilder_ != null) { + return udpatedActionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(udpatedActions_); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public io.opentdf.platform.authorization.Action.Builder addUdpatedActionsBuilder() { + return getUdpatedActionsFieldBuilder().addBuilder( + io.opentdf.platform.authorization.Action.getDefaultInstance()); + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public io.opentdf.platform.authorization.Action.Builder addUdpatedActionsBuilder( + int index) { + return getUdpatedActionsFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.Action.getDefaultInstance()); + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + public java.util.List + getUdpatedActionsBuilderList() { + return getUdpatedActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> + getUdpatedActionsFieldBuilder() { + if (udpatedActionsBuilder_ == null) { + udpatedActionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( + udpatedActions_, + ((bitField0_ & 0x00000004) != 0), + getParentForChildren(), + isClean()); + udpatedActions_ = null; + } + return udpatedActionsBuilder_; + } + @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.SubjectMappingUpdate) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectMappingUpdate) + private static final io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate(); + } + + public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubjectMappingUpdate 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.SubjectMappingUpdate getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java new file mode 100644 index 0000000000..febe22714e --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java @@ -0,0 +1,110 @@ +// 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 SubjectMappingUpdateOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectMappingUpdate) + com.google.protobuf.MessageOrBuilder { + + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return Whether the updatedMetadata field is set. + */ + boolean hasUpdatedMetadata(); + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * @return The updatedMetadata. + */ + io.opentdf.platform.common.MetadataMutable getUpdatedMetadata(); + /** + * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder(); + + /** + *
    +   * Replaces entire list of existing SubjectConditionSet ids
    +   * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @return A list containing the updatedSubjectConditionSetIds. + */ + java.util.List + getUpdatedSubjectConditionSetIdsList(); + /** + *
    +   * Replaces entire list of existing SubjectConditionSet ids
    +   * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @return The count of updatedSubjectConditionSetIds. + */ + int getUpdatedSubjectConditionSetIdsCount(); + /** + *
    +   * Replaces entire list of existing SubjectConditionSet ids
    +   * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param index The index of the element to return. + * @return The updatedSubjectConditionSetIds at the given index. + */ + java.lang.String getUpdatedSubjectConditionSetIds(int index); + /** + *
    +   * Replaces entire list of existing SubjectConditionSet ids
    +   * 
    + * + * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * @param index The index of the value to return. + * @return The bytes of the updatedSubjectConditionSetIds at the given index. + */ + com.google.protobuf.ByteString + getUpdatedSubjectConditionSetIdsBytes(int index); + + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + java.util.List + getUdpatedActionsList(); + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + io.opentdf.platform.authorization.Action getUdpatedActions(int index); + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + int getUdpatedActionsCount(); + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + java.util.List + getUdpatedActionsOrBuilderList(); + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + */ + io.opentdf.platform.authorization.ActionOrBuilder getUdpatedActionsOrBuilder( + int index); +} 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 26020aed18..1a9486c02a 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 @@ -6,8 +6,7 @@ /** *
    - * A Set of subjects described by matching criteria via a list of condition groups.
    - * A Subject Set can be used by multiple Subject Mappings
    + * A collection of Condition Groups
      * 
    * * Protobuf type {@code policy.subjectmapping.SubjectSet} @@ -50,7 +49,7 @@ protected java.lang.Object newInstance( private java.util.List conditionGroups_; /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -61,7 +60,7 @@ public java.util.List } /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -73,7 +72,7 @@ public java.util.List } /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -84,7 +83,7 @@ public int getConditionGroupsCount() { } /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -95,7 +94,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGrou } /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -267,8 +266,7 @@ protected Builder newBuilderForType( } /** *
    -   * A Set of subjects described by matching criteria via a list of condition groups.
    -   * A Subject Set can be used by multiple Subject Mappings
    +   * A collection of Condition Groups
        * 
    * * Protobuf type {@code policy.subjectmapping.SubjectSet} @@ -499,7 +497,7 @@ private void ensureConditionGroupsIsMutable() { /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -513,7 +511,7 @@ public java.util.List } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -527,7 +525,7 @@ public int getConditionGroupsCount() { } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -541,7 +539,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGrou } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -562,7 +560,7 @@ public Builder setConditionGroups( } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -580,7 +578,7 @@ public Builder setConditionGroups( } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -600,7 +598,7 @@ public Builder addConditionGroups(io.opentdf.platform.policy.subjectmapping.Cond } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -621,7 +619,7 @@ public Builder addConditionGroups( } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -639,7 +637,7 @@ public Builder addConditionGroups( } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -657,7 +655,7 @@ public Builder addConditionGroups( } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -676,7 +674,7 @@ public Builder addAllConditionGroups( } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -693,7 +691,7 @@ public Builder clearConditionGroups() { } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -710,7 +708,7 @@ public Builder removeConditionGroups(int index) { } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -721,7 +719,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder getCondi } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -735,7 +733,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getCond } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -750,7 +748,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroupOrBuilder getCond } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -761,7 +759,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder addCondi } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -773,7 +771,7 @@ public io.opentdf.platform.policy.subjectmapping.ConditionGroup.Builder addCondi } /** *
    -     * The conditions groups describing the matching rules for subjects in the set
    +     * multiple Condition Groups are evaluated with AND logic
          * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } 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 a8ef73a1cd..2c817a5c8e 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 @@ -10,7 +10,7 @@ public interface SubjectSetOrBuilder extends /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -19,7 +19,7 @@ public interface SubjectSetOrBuilder extends getConditionGroupsList(); /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -27,7 +27,7 @@ public interface SubjectSetOrBuilder extends io.opentdf.platform.policy.subjectmapping.ConditionGroup getConditionGroups(int index); /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -35,7 +35,7 @@ public interface SubjectSetOrBuilder extends int getConditionGroupsCount(); /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } @@ -44,7 +44,7 @@ public interface SubjectSetOrBuilder extends getConditionGroupsOrBuilderList(); /** *
    -   * The conditions groups describing the matching rules for subjects in the set
    +   * multiple Condition Groups are evaluated with AND logic
        * 
    * * repeated .policy.subjectmapping.ConditionGroup condition_groups = 1 [json_name = "conditionGroups", (.buf.validate.field) = { ... } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java new file mode 100644 index 0000000000..e10b15fb8a --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java @@ -0,0 +1,735 @@ +// 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.UpdateSubjectConditionSetRequest} + */ +public final class UpdateSubjectConditionSetRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectConditionSetRequest) + UpdateSubjectConditionSetRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateSubjectConditionSetRequest.newBuilder() to construct. + private UpdateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateSubjectConditionSetRequest() { + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateSubjectConditionSetRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.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_CONDITION_SET_FIELD_NUMBER = 2; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate subjectConditionSet_; + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance() : subjectConditionSet_; + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance() : subjectConditionSet_; + } + + 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, getSubjectConditionSet()); + } + 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, getSubjectConditionSet()); + } + 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.UpdateSubjectConditionSetRequest)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest) obj; + + if (!getId() + .equals(other.getId())) return false; + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) 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 (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest 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.UpdateSubjectConditionSetRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest 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.UpdateSubjectConditionSetRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest 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.UpdateSubjectConditionSetRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest 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.UpdateSubjectConditionSetRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest 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.UpdateSubjectConditionSetRequest 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.UpdateSubjectConditionSetRequest 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.UpdateSubjectConditionSetRequest 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.UpdateSubjectConditionSetRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectConditionSetRequest) + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + id_ = ""; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest build() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest buildPartial() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.id_ = id_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.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.UpdateSubjectConditionSetRequest) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest other) { + if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest.getDefaultInstance()) return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + 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( + getSubjectConditionSetFieldBuilder().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.SubjectConditionSetUpdate subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder> subjectConditionSetBuilder_; + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000002); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance() : subjectConditionSet_; + } + } + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + @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.UpdateSubjectConditionSetRequest) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectConditionSetRequest) + private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest(); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSubjectConditionSetRequest 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.UpdateSubjectConditionSetRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java new file mode 100644 index 0000000000..b91bdfba2e --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java @@ -0,0 +1,37 @@ +// 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 UpdateSubjectConditionSetRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectConditionSetRequest) + 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.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder getSubjectConditionSetOrBuilder(); +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java new file mode 100644 index 0000000000..f5953386c0 --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java @@ -0,0 +1,599 @@ +// 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.UpdateSubjectConditionSetResponse} + */ +public final class UpdateSubjectConditionSetResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:policy.subjectmapping.UpdateSubjectConditionSetResponse) + UpdateSubjectConditionSetResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateSubjectConditionSetResponse.newBuilder() to construct. + private UpdateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateSubjectConditionSetResponse() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new UpdateSubjectConditionSetResponse(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.Builder.class); + } + + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + + 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, getSubjectConditionSet()); + } + 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, getSubjectConditionSet()); + } + 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.UpdateSubjectConditionSetResponse)) { + return super.equals(obj); + } + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse) obj; + + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) 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 (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse 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.UpdateSubjectConditionSetResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse 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.UpdateSubjectConditionSetResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse 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.UpdateSubjectConditionSetResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse 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.UpdateSubjectConditionSetResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse 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.UpdateSubjectConditionSetResponse 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.UpdateSubjectConditionSetResponse 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.UpdateSubjectConditionSetResponse 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.UpdateSubjectConditionSetResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.UpdateSubjectConditionSetResponse) + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.Builder.class); + } + + // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance(); + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse build() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse buildPartial() { + io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.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.UpdateSubjectConditionSetResponse) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other) { + if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance()) return this; + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); + } + 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( + getSubjectConditionSetFieldBuilder().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.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } else { + return subjectConditionSetBuilder_.getMessage(); + } + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; + } else { + subjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; + } + @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.UpdateSubjectConditionSetResponse) + } + + // @@protoc_insertion_point(class_scope:policy.subjectmapping.UpdateSubjectConditionSetResponse) + private static final io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse(); + } + + public static io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateSubjectConditionSetResponse 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.UpdateSubjectConditionSetResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java new file mode 100644 index 0000000000..59b86ccc3b --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java @@ -0,0 +1,25 @@ +// 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 UpdateSubjectConditionSetResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.UpdateSubjectConditionSetResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. + */ + boolean hasSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); + /** + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); +} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java index 73f4129ebb..26525202b8 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java @@ -81,9 +81,9 @@ public java.lang.String getId() { } public static final int SUBJECT_MAPPING_FIELD_NUMBER = 2; - private io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate subjectMapping_; + private io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate subjectMapping_; /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; * @return Whether the subjectMapping field is set. */ @java.lang.Override @@ -91,19 +91,19 @@ public boolean hasSubjectMapping() { return ((bitField0_ & 0x00000001) != 0); } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; * @return The subjectMapping. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getSubjectMapping() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance() : subjectMapping_; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder getSubjectMappingOrBuilder() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance() : subjectMapping_; } private byte memoizedIsInitialized = -1; @@ -549,31 +549,31 @@ public Builder setIdBytes( return this; } - private io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate subjectMapping_; + private io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate subjectMapping_; private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder> subjectMappingBuilder_; + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder> subjectMappingBuilder_; /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; * @return Whether the subjectMapping field is set. */ public boolean hasSubjectMapping() { return ((bitField0_ & 0x00000002) != 0); } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; * @return The subjectMapping. */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate getSubjectMapping() { + public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getSubjectMapping() { if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance() : subjectMapping_; + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance() : subjectMapping_; } else { return subjectMappingBuilder_.getMessage(); } } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; */ - public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate value) { + public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate value) { if (subjectMappingBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -587,10 +587,10 @@ public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.Subje return this; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; */ public Builder setSubjectMapping( - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder builderForValue) { + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder builderForValue) { if (subjectMappingBuilder_ == null) { subjectMapping_ = builderForValue.build(); } else { @@ -601,13 +601,13 @@ public Builder setSubjectMapping( return this; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate value) { + public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate value) { if (subjectMappingBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance()) { + subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance()) { getSubjectMappingBuilder().mergeFrom(value); } else { subjectMapping_ = value; @@ -622,7 +622,7 @@ public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.Sub return this; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; */ public Builder clearSubjectMapping() { bitField0_ = (bitField0_ & ~0x00000002); @@ -635,33 +635,33 @@ public Builder clearSubjectMapping() { return this; } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder getSubjectMappingBuilder() { + public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder getSubjectMappingBuilder() { bitField0_ |= 0x00000002; onChanged(); return getSubjectMappingFieldBuilder().getBuilder(); } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder getSubjectMappingOrBuilder() { + public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder getSubjectMappingOrBuilder() { if (subjectMappingBuilder_ != null) { return subjectMappingBuilder_.getMessageOrBuilder(); } else { return subjectMapping_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.getDefaultInstance() : subjectMapping_; + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance() : subjectMapping_; } } /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; */ private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder> + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder> getSubjectMappingFieldBuilder() { if (subjectMappingBuilder_ == null) { subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder>( + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder>( getSubjectMapping(), getParentForChildren(), isClean()); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java index 44b716aa9a..504313af16 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java @@ -21,17 +21,17 @@ public interface UpdateSubjectMappingRequestOrBuilder extends getIdBytes(); /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; * @return Whether the subjectMapping field is set. */ boolean hasSubjectMapping(); /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; * @return The subjectMapping. */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdate getSubjectMapping(); + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getSubjectMapping(); /** - * .policy.subjectmapping.SubjectMappingCreateUpdate subject_mapping = 2 [json_name = "subjectMapping", (.buf.validate.field) = { ... } + * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateUpdateOrBuilder getSubjectMappingOrBuilder(); + io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder getSubjectMappingOrBuilder(); } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 6bdbc9fcdb..0ff191f851 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -96,19 +96,20 @@ message Condition { // externally known field name (such as from idP/LDAP) string subject_external_field = 1; - // the operator + // the evaluation operator of relation SubjectMappingOperatorEnum operator = 2 [ (buf.validate.field).enum.defined_only = true, (buf.validate.field).required = true ]; - // list of comparison values for the subject_external_field + // list of comparison values for the subject_external_field, evaluated by the operator repeated string subject_external_values = 3; } -// A Group of conditions with either OR or AND evaluation across the contained conditions +// A collection of Conditions evaluated by the boolean_type provided message ConditionGroup { repeated Condition conditions = 1 [(buf.validate.field).repeated.min_items = 1]; + // the boolean evaluation type across the conditions ConditionBooleanTypeEnum boolean_type = 2 [ (buf.validate.field).enum.defined_only = true, @@ -116,13 +117,27 @@ 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 +// A collection of Condition Groups message SubjectSet { - // The conditions groups describing the matching rules for subjects in the set + // multiple Condition Groups are evaluated with AND logic repeated ConditionGroup condition_groups = 1 [(buf.validate.field).repeated.min_items = 1]; } +// A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet +// are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple +// Subject Mappings / Attribute Values and is an independent unit. +message SubjectConditionSet { + string id = 1; + + // an optional name for ease of reference + string name = 2; + + common.Metadata metadata = 3; + + // multiple Subject Sets are evaluated with AND logic + repeated SubjectSet subject_sets = 4 [(buf.validate.field).repeated.min_items = 1]; +} + /* Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination @@ -131,7 +146,7 @@ message SubjectSet { { "id": "someid", "attribute_value": {example_one_attribute_value...}, - "subject_sets": [{subject_set_1},{subject_set_2}] + "subject_condition_sets": [{subject_set_1},{subject_set_2}] "actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] } */ @@ -140,11 +155,11 @@ message SubjectMapping { common.Metadata metadata = 2; - // Attribute Value to be mapped to; aka: "The Entity Entitlement Attribute" + // the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" policy.attributes.Value attribute_value = 3; - // the subjects included in this mapping - repeated SubjectSet subject_sets = 4; + // the reusable SubjectConditionSets mapped to the given Attribute Value + repeated SubjectConditionSet subject_condition_sets = 4; // The actions permitted by subjects in this mapping repeated authorization.Action actions = 5; @@ -164,18 +179,9 @@ message MatchSubjectMappingsResponse { repeated SubjectMapping subject_mappings = 1; } -message SubjectMappingCreateUpdate { - common.MetadataMutable metadata = 1; - - // Attribute Value to be mapped to - string attribute_value_id = 2; - - // 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; -} +/* + Subject Mappings CRUD Operations +*/ message GetSubjectMappingRequest { string id = 1 [(buf.validate.field).required = true]; @@ -189,16 +195,40 @@ message ListSubjectMappingsResponse { repeated SubjectMapping subject_mappings = 1; } +message SubjectMappingCreate{ + common.MetadataMutable metadata = 1; + + // Attribute Value to be mapped to + string attribute_value_id = 2; + + // Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets) + repeated string existing_subject_condition_set_ids = 3; + + // Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided) + repeated SubjectConditionSet new_subject_condition_sets = 4; + + // The actions permitted by subjects in this mapping + repeated authorization.Action actions = 5; +} message CreateSubjectMappingRequest { - SubjectMappingCreateUpdate subject_mapping = 1 [(buf.validate.field).required = true]; + SubjectMappingCreate subject_mapping = 1; } message CreateSubjectMappingResponse { SubjectMapping subject_mapping = 1; } +message SubjectMappingUpdate { + common.MetadataMutable updated_metadata = 2; + + // Replaces entire list of existing SubjectConditionSet ids + repeated string updated_subject_condition_set_ids = 3; + + // Replaces entire list of actions permitted by subjects + repeated authorization.Action udpated_actions = 5; +} message UpdateSubjectMappingRequest { string id = 1 [(buf.validate.field).required = true]; - SubjectMappingCreateUpdate subject_mapping = 2 [(buf.validate.field).required = true]; + SubjectMappingUpdate subject_mapping = 2; } message UpdateSubjectMappingResponse { SubjectMapping subject_mapping = 1; @@ -211,6 +241,62 @@ message DeleteSubjectMappingResponse { SubjectMapping subject_mapping = 1; } +/** + SubjectConditionSet CRUD operations +*/ + +message GetSubjectConditionSetRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message GetSubjectConditionSetResponse { + SubjectConditionSet subject_condition_set = 1; + // contextualized Subject Mappings associated with this SubjectConditionSet + repeated SubjectMapping associated_subject_mappings = 2; +} + +message ListSubjectConditionSetsRequest {} +message ListSubjectConditionSetsResponse { + repeated SubjectConditionSet subject_condition_sets = 1; +} + +message SubjectConditionSetCreate { + common.MetadataMutable metadata = 1; + + // an optional name for ease of reference + string name = 2; + + // multiple Subject Sets are evaluated with AND logic + repeated SubjectSet subject_sets = 3 [(buf.validate.field).repeated.min_items = 1]; +} +message CreateSubjectConditionSetRequest { + SubjectConditionSetCreate subject_condition_set = 1; +} +message CreateSubjectConditionSetResponse { + SubjectConditionSet subject_condition_set = 1; +} + +message SubjectConditionSetUpdate { + common.MetadataMutable updated_metadata = 2; + + // Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions + repeated SubjectSet updated_subject_sets = 3 [(buf.validate.field).repeated.min_items = 1]; +} +message UpdateSubjectConditionSetRequest { + string id = 1 [(buf.validate.field).required = true]; + SubjectConditionSetUpdate subject_condition_set = 2; +} +message UpdateSubjectConditionSetResponse { + SubjectConditionSet subject_condition_set = 1; +} + +message DeleteSubjectConditionSetRequest { + string id = 1 [(buf.validate.field).required = true]; +} +message DeleteSubjectConditionSetResponse { + SubjectConditionSet subject_condition_set = 1; +} + + service SubjectMappingService { // Find matching Subject Mappings for a given Subject @@ -245,4 +331,31 @@ service SubjectMappingService { rpc DeleteSubjectMapping(DeleteSubjectMappingRequest) returns (DeleteSubjectMappingResponse) { option (google.api.http) = {delete: "/subject-mappings/{id}"}; } + + rpc ListSubjectConditionSets(ListSubjectConditionSetsRequest) returns (ListSubjectConditionSetsResponse) { + option (google.api.http) = {get: "/subject-condition-sets"}; + } + + rpc GetSubjectConditionSet(GetSubjectConditionSetRequest) returns (GetSubjectConditionSetResponse) { + option (google.api.http) = {get: "/subject-condition-sets/{id}"}; + } + + rpc CreateSubjectConditionSet(CreateSubjectConditionSetRequest) returns (CreateSubjectConditionSetResponse) { + option (google.api.http) = { + post: "/subject-condition-sets" + body: "subject_condition_set" + }; + } + + rpc UpdateSubjectConditionSet(UpdateSubjectConditionSetRequest) returns (UpdateSubjectConditionSetResponse) { + option (google.api.http) = { + patch: "/subject-condition-sets/{id}" + body: "subject_condition_set" + }; + } + + rpc DeleteSubjectConditionSet(DeleteSubjectConditionSetRequest) returns (DeleteSubjectConditionSetResponse) { + option (google.api.http) = {delete: "/subject-condition-sets/{id}"}; + } + } From 8d9129c5f16be7f50eef6230aba0084e3b24579f Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Fri, 1 Mar 2024 15:04:26 -0500 Subject: [PATCH 03/39] store ACTIONS as JSONB instead of VARCHAR array to support oneof standard/custom actions in protos and unify fixtures to that schema --- docs/grpc/index.html | 2 +- .../subjectmapping/subject_mapping.swagger.json | 2 +- internal/fixtures/fixtures.go | 14 ++++++++++++-- internal/fixtures/fixtures.yaml | 6 +++--- .../20240228000000_add_subject_condition_sets.sql | 2 +- .../go/policy/subjectmapping/subject_mapping.pb.go | 2 +- .../policy/subjectmapping/SubjectMapping.java | 4 ++-- .../policy/subjectmapping/subject_mapping.proto | 2 +- 8 files changed, 22 insertions(+), 12 deletions(-) diff --git a/docs/grpc/index.html b/docs/grpc/index.html index e31c0ba902..cd4ba3f677 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -5807,7 +5807,7 @@

    SubjectConditionSetUpda

    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_condition_sets": [{subject_set_1},{subject_set_2}]

    "actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_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_condition_sets": [{subject_set_1},{subject_set_2}]

    "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}]

    }

    diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 510be539b5..13f59b8727 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -758,7 +758,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_condition_sets\": [{subject_set_1},{subject_set_2}]\n\"actions\": [\"STANDARD_ACTION_TRANSMIT\", \"STANDARD_ACTION_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_condition_sets\": [{subject_set_1},{subject_set_2}]\n\"actions\": [{\"standard\": \"STANDARD_ACTION_DECRYPT\"}\", {\"standard\": \"STANDARD_ACTION_TRANSMIT\"}]\n}", "title": "Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination" }, "subjectmappingSubjectMappingCreate": { diff --git a/internal/fixtures/fixtures.go b/internal/fixtures/fixtures.go index 25a5fedc7e..a916ba3e07 100644 --- a/internal/fixtures/fixtures.go +++ b/internal/fixtures/fixtures.go @@ -55,7 +55,10 @@ type FixtureDataAttributeValueKeyAccessServer struct { type FixtureDataSubjectMapping struct { Id string `yaml:"id"` AttributeValueId string `yaml:"attribute_value_id"` - Actions []string `yaml:"actions"` + Actions []struct{ + Standard string `yaml:"standard" json:"standard,omitempty"` + Custom string `yaml:"custom" json:"custom,omitempty"` + } `yaml:"actions"` SubjectConditionSetPivotIds []string `yaml:"subject_condition_set_pivot_ids"` } @@ -304,10 +307,17 @@ func (f *Fixtures) provisionAttributeValues() int64 { func (f *Fixtures) provisionSubjectMappings() int64 { values := make([][]string, 0, len(fixtureData.SubjectMappings.Data)) for _, d := range fixtureData.SubjectMappings.Data { + var actionsJSON []byte + actionsJSON, err := json.Marshal(d.Actions) + if err != nil { + slog.Error("⛔️ 📦 issue with subject mapping actions JSON - check fixtures.yaml for issues") + panic("issue with subject mapping actions JSON") + } + values = append(values, []string{ f.db.StringWrap(d.Id), f.db.UUIDWrap(d.AttributeValueId), - f.db.StringArrayWrap(d.Actions), + f.db.StringWrap(string(actionsJSON)), f.db.UUIDArrayWrap(d.SubjectConditionSetPivotIds), }) } diff --git a/internal/fixtures/fixtures.yaml b/internal/fixtures/fixtures.yaml index eec910fadb..e2edcd38b9 100644 --- a/internal/fixtures/fixtures.yaml +++ b/internal/fixtures/fixtures.yaml @@ -187,7 +187,7 @@ subject_mappings: id: 812fab35-9aa4-4e73-bf22-c96638d58ea4 attribute_value_id: 74babca6-016f-4f3e-a99b-4e46ea8d0fd8 actions: - - DECRYPT + - standard: STANDARD_ACTION_DECRYPT subject_condition_set_pivot_ids: # subject_mapping_subject_attribute1__pivot__subject_condition_set1 - da97fc49-dc96-499a-8f8c-c14f8a7954b9 @@ -196,8 +196,8 @@ subject_mappings: id: e6a3f940-e24f-4383-8763-718a1a304948 attribute_value_id: 2fe8dea1-3555-498c-afe9-99724f35f3d3 actions: - - TRANSMIT - - DECRYPT + - standard: STANDARD_ACTION_TRANSMIT + - standard: STANDARD_ACTION_DECRYPT subject_condition_set_pivot_ids: # subject_mapping_subject_attribute2__pivot__subject_condition_set2: - c114c393-bde5-4015-9c7f-a9679a83ae91 diff --git a/migrations/20240228000000_add_subject_condition_sets.sql b/migrations/20240228000000_add_subject_condition_sets.sql index 92d1ddaad2..cc5ea3d8d3 100644 --- a/migrations/20240228000000_add_subject_condition_sets.sql +++ b/migrations/20240228000000_add_subject_condition_sets.sql @@ -15,7 +15,7 @@ CREATE TABLE IF NOT EXISTS subject_mapping_condition_set_pivot ( 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[]; +ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_pivot_ids UUID[], ADD COLUMN actions JSONB; WITH subject_mappings_migration_data AS ( SELECT diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 1c576ac80d..b1dd3b10e5 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -398,7 +398,7 @@ func (x *SubjectConditionSet) GetSubjectSets() []*SubjectSet { // "id": "someid", // "attribute_value": {example_one_attribute_value...}, // "subject_condition_sets": [{subject_set_1},{subject_set_2}] -// "actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] +// "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] // } type SubjectMapping struct { state protoimpl.MessageState 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 4f704217d3..e6f68c570e 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_condition_sets": [{subject_set_1},{subject_set_2}] - *"actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] + *"actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] *} * * @@ -507,7 +507,7 @@ protected Builder newBuilderForType( *"id": "someid", *"attribute_value": {example_one_attribute_value...}, *"subject_condition_sets": [{subject_set_1},{subject_set_2}] - *"actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] + *"actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] *} * * diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 0ff191f851..21e94033b5 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -147,7 +147,7 @@ message SubjectConditionSet { "id": "someid", "attribute_value": {example_one_attribute_value...}, "subject_condition_sets": [{subject_set_1},{subject_set_2}] - "actions": ["STANDARD_ACTION_TRANSMIT", "STANDARD_ACTION_DECRYPT"] + "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] } */ message SubjectMapping { From 5c1e3edece8c669eded489eabdc3cfdbbea2e882 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 4 Mar 2024 17:25:23 -0500 Subject: [PATCH 04/39] checkpoint after schema relation update to remove pivot table and utilize one to many relation --- docs/grpc/index.html | 39 +- .../subject_mapping.swagger.json | 49 +- internal/db/db.go | 3 - internal/fixtures/fixtures.go | 75 +- internal/fixtures/fixtures.yaml | 42 +- ...40304000000_add_subject_condition_sets.md} | 6 +- ...0304000000_add_subject_condition_sets.sql} | 37 +- .../subjectmapping/subject_mapping.pb.go | 755 +++++++++--------- .../SubjectConditionSetUpdate.java | 200 ++++- .../SubjectConditionSetUpdateOrBuilder.java | 20 + .../policy/subjectmapping/SubjectMapping.java | 452 +++-------- .../subjectmapping/SubjectMappingCreate.java | 717 +++++------------ .../SubjectMappingCreateOrBuilder.java | 76 +- .../SubjectMappingOrBuilder.java | 39 +- .../subjectmapping/SubjectMappingProto.java | 299 +++---- .../subjectmapping/SubjectMappingUpdate.java | 739 ++++++++--------- .../SubjectMappingUpdateOrBuilder.java | 73 +- .../UpdateSubjectMappingResponse.java | 10 + services/policy/db/subject_mappings.go | 525 ++++++++++-- .../subjectmapping/subject_mapping.proto | 25 +- 20 files changed, 2029 insertions(+), 2152 deletions(-) rename migrations/{20240228000000_add_subject_condition_sets.md => 20240304000000_add_subject_condition_sets.md} (96%) rename migrations/{20240228000000_add_subject_condition_sets.sql => 20240304000000_add_subject_condition_sets.sql} (72%) diff --git a/docs/grpc/index.html b/docs/grpc/index.html index cd4ba3f677..d3ec2f66ee 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -5785,6 +5785,13 @@

    SubjectConditionSetUpda

    + + + + + + + @@ -5838,10 +5845,10 @@

    SubjectMapping

    - + - - + + @@ -5883,17 +5890,17 @@

    SubjectMappingCreate

    - + - - + + - - - - + + + + @@ -5921,21 +5928,21 @@

    SubjectMappingUpdate

    - + - + - - + + - + @@ -6059,7 +6066,7 @@

    UpdateSubjectMappingR

    UpdateSubjectMappingResponse

    -

    +

    `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}`

    '{"subject_mapping":{//everything}}'

    updated_namestring

    an optional name for ease of reference

    updated_metadata common.MetadataMutable
    subject_condition_setssubject_condition_set SubjectConditionSetrepeated

    the reusable SubjectConditionSets mapped to the given Attribute Value

    the reusable SubjectConditionSet mapped to the given Attribute Value

    existing_subject_condition_set_idsexisting_subject_condition_set_id stringrepeated

    Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)

    Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)

    new_subject_condition_setsSubjectConditionSetrepeated

    Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)

    new_subject_condition_setSubjectConditionSetCreate

    Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)

    updated_metadataupdate_metadata common.MetadataMutable

    updated_subject_condition_set_idsupdate_subject_condition_set_id stringrepeated

    Replaces entire list of existing SubjectConditionSet ids

    Replaces the existing SubjectConditionSet id with a new one

    udpated_actionsupdate_actions authorization.Action repeated

    Replaces entire list of actions permitted by subjects

    diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 13f59b8727..b984f98faa 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -715,6 +715,10 @@ "subjectmappingSubjectConditionSetUpdate": { "type": "object", "properties": { + "updatedName": { + "type": "string", + "title": "an optional name for ease of reference" + }, "updatedMetadata": { "$ref": "#/definitions/commonMetadataMutable" }, @@ -741,13 +745,9 @@ "$ref": "#/definitions/policyattributesValue", "title": "the Attribute Value mapped to; aka: \"The Entity Entitlement Attribute\"" }, - "subjectConditionSets": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/subjectmappingSubjectConditionSet" - }, - "title": "the reusable SubjectConditionSets mapped to the given Attribute Value" + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSet", + "title": "the reusable SubjectConditionSet mapped to the given Attribute Value" }, "actions": { "type": "array", @@ -771,20 +771,13 @@ "type": "string", "title": "Attribute Value to be mapped to" }, - "existingSubjectConditionSetIds": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)" + "existingSubjectConditionSetId": { + "type": "string", + "title": "Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)" }, - "newSubjectConditionSets": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/subjectmappingSubjectConditionSet" - }, - "title": "Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)" + "newSubjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSetCreate", + "title": "Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)" }, "actions": { "type": "array", @@ -809,17 +802,14 @@ "subjectmappingSubjectMappingUpdate": { "type": "object", "properties": { - "updatedMetadata": { + "updateMetadata": { "$ref": "#/definitions/commonMetadataMutable" }, - "updatedSubjectConditionSetIds": { - "type": "array", - "items": { - "type": "string" - }, - "title": "Replaces entire list of existing SubjectConditionSet ids" + "updateSubjectConditionSetId": { + "type": "string", + "title": "Replaces the existing SubjectConditionSet id with a new one" }, - "udpatedActions": { + "updateActions": { "type": "array", "items": { "type": "object", @@ -857,7 +847,8 @@ "subjectMapping": { "$ref": "#/definitions/subjectmappingSubjectMapping" } - } + }, + "title": "`{\"subject_mapping\":{\"updated_metadata\": {\"labels\": {\"name\": \"new-name\"}}}}`\n'{\"subject_mapping\":{//everything}}'" } } } diff --git a/internal/db/db.go b/internal/db/db.go index b971d35137..d4a457dfa5 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -22,7 +22,6 @@ var ( TableAttributeValueKeyAccessGrants = "attribute_value_key_access_grants" TableResourceMappings = "resource_mappings" TableSubjectMappings = "subject_mappings" - TableSubjectMappingConditionSetPivot = "subject_mapping_condition_set_pivot" TableSubjectConditionSet = "subject_condition_set" ) @@ -36,7 +35,6 @@ var Tables struct { AttributeValueKeyAccessGrants Table ResourceMappings Table SubjectMappings Table - SubjectMappingConditionSetPivot Table SubjectConditionSet Table } @@ -113,7 +111,6 @@ 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{ diff --git a/internal/fixtures/fixtures.go b/internal/fixtures/fixtures.go index a916ba3e07..24de7fa990 100644 --- a/internal/fixtures/fixtures.go +++ b/internal/fixtures/fixtures.go @@ -53,18 +53,12 @@ type FixtureDataAttributeValueKeyAccessServer struct { } type FixtureDataSubjectMapping struct { - Id string `yaml:"id"` - AttributeValueId string `yaml:"attribute_value_id"` - Actions []struct{ + Id string `yaml:"id"` + AttributeValueId string `yaml:"attribute_value_id"` + Actions []struct { Standard string `yaml:"standard" json:"standard,omitempty"` Custom string `yaml:"custom" json:"custom,omitempty"` } `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"` } @@ -119,10 +113,6 @@ 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"` @@ -222,12 +212,10 @@ func (f *Fixtures) Provision() { a := f.provisionAttribute() slog.Info("📦 provisioning attribute value data") 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 subject mapping data") + sM := f.provisionSubjectMappings() slog.Info("📦 provisioning resource mapping data") rM := f.provisionResourceMappings() slog.Info("📦 provisioning kas registry data") @@ -242,7 +230,6 @@ 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), @@ -304,38 +291,6 @@ func (f *Fixtures) provisionAttributeValues() int64 { return f.provision(fixtureData.AttributeValues.Metadata.TableName, fixtureData.AttributeValues.Metadata.Columns, values) } -func (f *Fixtures) provisionSubjectMappings() int64 { - values := make([][]string, 0, len(fixtureData.SubjectMappings.Data)) - for _, d := range fixtureData.SubjectMappings.Data { - var actionsJSON []byte - actionsJSON, err := json.Marshal(d.Actions) - if err != nil { - slog.Error("⛔️ 📦 issue with subject mapping actions JSON - check fixtures.yaml for issues") - panic("issue with subject mapping actions JSON") - } - - values = append(values, []string{ - f.db.StringWrap(d.Id), - f.db.UUIDWrap(d.AttributeValueId), - f.db.StringWrap(string(actionsJSON)), - 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 { @@ -355,6 +310,26 @@ func (f *Fixtures) provisionSubjectConditionSet() int64 { return f.provision(fixtureData.SubjectConditionSet.Metadata.TableName, fixtureData.SubjectConditionSet.Metadata.Columns, values) } +func (f *Fixtures) provisionSubjectMappings() int64 { + values := make([][]string, 0, len(fixtureData.SubjectMappings.Data)) + for _, d := range fixtureData.SubjectMappings.Data { + var actionsJSON []byte + actionsJSON, err := json.Marshal(d.Actions) + if err != nil { + slog.Error("⛔️ 📦 issue with subject mapping actions JSON - check fixtures.yaml for issues") + panic("issue with subject mapping actions JSON") + } + + values = append(values, []string{ + f.db.StringWrap(d.Id), + f.db.UUIDWrap(d.AttributeValueId), + f.db.UUIDWrap(d.SubjectConditionSetId), + f.db.StringWrap(string(actionsJSON)), + }) + } + return f.provision(fixtureData.SubjectMappings.Metadata.TableName, fixtureData.SubjectMappings.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 e2edcd38b9..d0aa00d3d2 100644 --- a/internal/fixtures/fixtures.yaml +++ b/internal/fixtures/fixtures.yaml @@ -172,7 +172,7 @@ attribute_value_key_access_servers: key_access_server_id: e36640a6-61c5-4d4c-a45b-0e0a26d1c45f ## -# Subject Mappings < pivot > Subject Condition Sets +# Subject Mappings -> 1 Group of Subject Condition Sets ## subject_mappings: metadata: @@ -180,50 +180,34 @@ subject_mappings: columns: - id - attribute_value_id + - subject_condition_set_id - 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 + # subject_condition_set1 + subject_condition_set_id: b3903282-06f9-41a4-924a-7b8eb43dffe0 actions: - standard: STANDARD_ACTION_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 + # subject_condition_set2 + subject_condition_set_id: 798aacd2-abaf-4623-975e-3bb8ca43e318 actions: - standard: STANDARD_ACTION_TRANSMIT - standard: STANDARD_ACTION_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_mapping_subject_attribute3: + id: 9d06c757-06b9-4713-8fbd-5ef007b1afe2 + attribute_value_id: 74babca6-016f-4f3e-a99b-4e46ea8d0fd8 + # subject_condition_set3 subject_condition_set_id: eaf866c0-327f-4826-846a-5041c3c22f06 + actions: + - standard: STANDARD_ACTION_TRANSMIT + - custom: custom_action_1 subject_condition_set: metadata: diff --git a/migrations/20240228000000_add_subject_condition_sets.md b/migrations/20240304000000_add_subject_condition_sets.md similarity index 96% rename from migrations/20240228000000_add_subject_condition_sets.md rename to migrations/20240304000000_add_subject_condition_sets.md index 5f5bba2ece..a7e659ae73 100644 --- a/migrations/20240228000000_add_subject_condition_sets.md +++ b/migrations/20240304000000_add_subject_condition_sets.md @@ -63,7 +63,7 @@ erDiagram ResourceMapping }o--o{ AttributeValue: relates SubjectMapping }|--|| AttributeValue: has - SubjectMapping }|--|{ SubjectConditionSet: "has by pivot table" + SubjectMapping }|--|| SubjectConditionSet: "has" Namespace { uuid id PK @@ -111,8 +111,8 @@ erDiagram SubjectMapping { uuid id PK uuid attribute_value_id FK - varchar[] subject_mapping_condition_set_pivot_ids "pivot table (not pictured) constrains many-to-many relationship" - varchar[] actions + uuid[] subject_condition_set_id FK "subject condition sets are reusable" + jsonb actions jsonb metadata } diff --git a/migrations/20240228000000_add_subject_condition_sets.sql b/migrations/20240304000000_add_subject_condition_sets.sql similarity index 72% rename from migrations/20240228000000_add_subject_condition_sets.sql rename to migrations/20240304000000_add_subject_condition_sets.sql index cc5ea3d8d3..46cf08813f 100644 --- a/migrations/20240228000000_add_subject_condition_sets.sql +++ b/migrations/20240304000000_add_subject_condition_sets.sql @@ -8,14 +8,7 @@ CREATE TABLE IF NOT EXISTS subject_condition_set ( 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, - 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 JSONB; +ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_id UUID, ADD COLUMN actions JSONB; WITH subject_mappings_migration_data AS ( SELECT @@ -42,31 +35,25 @@ WITH subject_mappings_migration_data AS ( ) ) ) AS condition_json, - id AS sm_id + id AS sm_id, + gen_random_uuid() AS subject_condition_set_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 + FROM subject_mappings_migration_data ) -- 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 +SET subject_condition_set_id = ( + SELECT subject_condition_set_id + FROM subject_mappings_migration_data + WHERE subject_mappings.id = subject_mappings_migration_data.sm_id ); -ALTER TABLE subject_mapping_condition_set_pivot ADD FOREIGN KEY (subject_condition_set_id) REFERENCES subject_condition_set(id) ON DELETE CASCADE; +ALTER TABLE subject_mappings 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: { @@ -117,12 +104,10 @@ SET operator = subject_mappings_migration_data.operator, 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; +WHERE subject_mappings.subject_condition_set_id = subject_mappings_migration_data.set_id; -ALTER TABLE IF EXISTS subject_mappings DROP COLUMN subject_condition_set_pivot_ids, DROP COLUMN actions; +ALTER TABLE IF EXISTS subject_mappings DROP COLUMN subject_condition_set_id, 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'); diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index b1dd3b10e5..b311f341b4 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -409,8 +409,8 @@ type SubjectMapping struct { Metadata *common.Metadata `protobuf:"bytes,2,opt,name=metadata,proto3" json:"metadata,omitempty"` // the Attribute Value 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 reusable SubjectConditionSets mapped to the given Attribute Value - SubjectConditionSets []*SubjectConditionSet `protobuf:"bytes,4,rep,name=subject_condition_sets,json=subjectConditionSets,proto3" json:"subject_condition_sets,omitempty"` + // the reusable SubjectConditionSet mapped to the given Attribute Value + SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,4,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` // The actions permitted by subjects in this mapping Actions []*authorization.Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"` } @@ -468,9 +468,9 @@ func (x *SubjectMapping) GetAttributeValue() *attributes.Value { return nil } -func (x *SubjectMapping) GetSubjectConditionSets() []*SubjectConditionSet { +func (x *SubjectMapping) GetSubjectConditionSet() *SubjectConditionSet { if x != nil { - return x.SubjectConditionSets + return x.SubjectConditionSet } return nil } @@ -812,10 +812,10 @@ type SubjectMappingCreate 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"` - // Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets) - ExistingSubjectConditionSetIds []string `protobuf:"bytes,3,rep,name=existing_subject_condition_set_ids,json=existingSubjectConditionSetIds,proto3" json:"existing_subject_condition_set_ids,omitempty"` - // Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided) - NewSubjectConditionSets []*SubjectConditionSet `protobuf:"bytes,4,rep,name=new_subject_condition_sets,json=newSubjectConditionSets,proto3" json:"new_subject_condition_sets,omitempty"` + // Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set) + ExistingSubjectConditionSetId string `protobuf:"bytes,3,opt,name=existing_subject_condition_set_id,json=existingSubjectConditionSetId,proto3" json:"existing_subject_condition_set_id,omitempty"` + // Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided) + NewSubjectConditionSet *SubjectConditionSetCreate `protobuf:"bytes,4,opt,name=new_subject_condition_set,json=newSubjectConditionSet,proto3" json:"new_subject_condition_set,omitempty"` // The actions permitted by subjects in this mapping Actions []*authorization.Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"` } @@ -866,16 +866,16 @@ func (x *SubjectMappingCreate) GetAttributeValueId() string { return "" } -func (x *SubjectMappingCreate) GetExistingSubjectConditionSetIds() []string { +func (x *SubjectMappingCreate) GetExistingSubjectConditionSetId() string { if x != nil { - return x.ExistingSubjectConditionSetIds + return x.ExistingSubjectConditionSetId } - return nil + return "" } -func (x *SubjectMappingCreate) GetNewSubjectConditionSets() []*SubjectConditionSet { +func (x *SubjectMappingCreate) GetNewSubjectConditionSet() *SubjectConditionSetCreate { if x != nil { - return x.NewSubjectConditionSets + return x.NewSubjectConditionSet } return nil } @@ -986,11 +986,11 @@ type SubjectMappingUpdate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - UpdatedMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=updated_metadata,json=updatedMetadata,proto3" json:"updated_metadata,omitempty"` - // Replaces entire list of existing SubjectConditionSet ids - UpdatedSubjectConditionSetIds []string `protobuf:"bytes,3,rep,name=updated_subject_condition_set_ids,json=updatedSubjectConditionSetIds,proto3" json:"updated_subject_condition_set_ids,omitempty"` + UpdateMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=update_metadata,json=updateMetadata,proto3" json:"update_metadata,omitempty"` + // Replaces the existing SubjectConditionSet id with a new one + UpdateSubjectConditionSetId string `protobuf:"bytes,3,opt,name=update_subject_condition_set_id,json=updateSubjectConditionSetId,proto3" json:"update_subject_condition_set_id,omitempty"` // Replaces entire list of actions permitted by subjects - UdpatedActions []*authorization.Action `protobuf:"bytes,5,rep,name=udpated_actions,json=udpatedActions,proto3" json:"udpated_actions,omitempty"` + UpdateActions []*authorization.Action `protobuf:"bytes,5,rep,name=update_actions,json=updateActions,proto3" json:"update_actions,omitempty"` } func (x *SubjectMappingUpdate) Reset() { @@ -1025,23 +1025,23 @@ func (*SubjectMappingUpdate) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{15} } -func (x *SubjectMappingUpdate) GetUpdatedMetadata() *common.MetadataMutable { +func (x *SubjectMappingUpdate) GetUpdateMetadata() *common.MetadataMutable { if x != nil { - return x.UpdatedMetadata + return x.UpdateMetadata } return nil } -func (x *SubjectMappingUpdate) GetUpdatedSubjectConditionSetIds() []string { +func (x *SubjectMappingUpdate) GetUpdateSubjectConditionSetId() string { if x != nil { - return x.UpdatedSubjectConditionSetIds + return x.UpdateSubjectConditionSetId } - return nil + return "" } -func (x *SubjectMappingUpdate) GetUdpatedActions() []*authorization.Action { +func (x *SubjectMappingUpdate) GetUpdateActions() []*authorization.Action { if x != nil { - return x.UdpatedActions + return x.UpdateActions } return nil } @@ -1101,6 +1101,8 @@ func (x *UpdateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingUpdate return nil } +// `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}` +// '{"subject_mapping":{//everything}}' type UpdateSubjectMappingResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1594,6 +1596,8 @@ type SubjectConditionSetUpdate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // an optional name for ease of reference + UpdatedName string `protobuf:"bytes,1,opt,name=updated_name,json=updatedName,proto3" json:"updated_name,omitempty"` UpdatedMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=updated_metadata,json=updatedMetadata,proto3" json:"updated_metadata,omitempty"` // Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions UpdatedSubjectSets []*SubjectSet `protobuf:"bytes,3,rep,name=updated_subject_sets,json=updatedSubjectSets,proto3" json:"updated_subject_sets,omitempty"` @@ -1631,6 +1635,13 @@ func (*SubjectConditionSetUpdate) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{27} } +func (x *SubjectConditionSetUpdate) GetUpdatedName() string { + if x != nil { + return x.UpdatedName + } + return "" +} + func (x *SubjectConditionSetUpdate) GetUpdatedMetadata() *common.MetadataMutable { if x != nil { return x.UpdatedMetadata @@ -1903,7 +1914,7 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa4, 0x02, 0x0a, 0x0e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa2, 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, @@ -1912,71 +1923,71 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 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, 0x60, 0x0a, 0x16, 0x73, 0x75, 0x62, + 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x65, 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, - 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, + 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 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, 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, 0x0f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 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, + 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, 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, 0xdf, 0x02, 0x0a, 0x14, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x72, - 0x65, 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, 0x4a, 0x0a, 0x22, 0x65, 0x78, 0x69, 0x73, 0x74, - 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x1e, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x49, 0x64, 0x73, 0x12, 0x67, 0x0a, 0x1a, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x52, 0x17, 0x6e, 0x65, 0x77, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x07, + 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, 0xe1, 0x02, 0x0a, 0x14, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x72, 0x65, 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, 0x48, 0x0a, 0x21, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x1d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, + 0x6b, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6e, 0x65, 0x77, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 0x73, 0x0a, @@ -1994,51 +2005,141 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 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, 0xe4, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x02, 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, 0x0f, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x48, 0x0a, 0x21, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x1d, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x73, 0x12, 0x3e, 0x0a, 0x0f, 0x75, 0x64, 0x70, - 0x61, 0x74, 0x65, 0x64, 0x5f, 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, 0x0e, 0x75, 0x64, 0x70, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8b, 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, 0x54, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 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, + 0x6e, 0x67, 0x22, 0xdc, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 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, 0x0e, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, + 0x1f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x8b, 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, 0x54, 0x0a, 0x0f, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2b, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 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, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, + 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, + 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 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, - 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, 0x37, - 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, + 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, + 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x60, 0x0a, 0x16, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, + 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, + 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, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0xe1, 0x01, 0x0a, 0x19, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x10, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x02, 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, + 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x5d, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x12, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, + 0xa0, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x64, 0x0a, 0x15, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, + 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, @@ -2046,253 +2147,165 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x61, 0x73, - 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 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, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, - 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x19, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 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, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x12, 0x4e, 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, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, - 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, 0x01, - 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x22, 0xbe, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, - 0x5f, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, - 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x53, 0x65, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x30, 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, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, - 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, - 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 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, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, - 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, + 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, 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, 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, 0xa4, 0x0f, 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, + 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x52, 0x10, 0x02, 0x32, 0xa4, 0x0f, 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, 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, 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, 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, 0x12, 0xac, 0x01, 0x0a, - 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 0x2e, 0x70, 0x6f, 0x6c, 0x69, + 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, - 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, + 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, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, - 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xc6, 0x01, 0x0a, 0x19, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x30, 0x3a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, - 0x74, 0x73, 0x12, 0xcb, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x15, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x65, 0x74, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, + 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, 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, 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, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xc6, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x15, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x65, 0x74, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xcb, 0x01, + 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x32, 0x1c, 0x2f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, - 0x74, 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, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 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 ( @@ -2359,7 +2372,7 @@ var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 4, // 5: policy.subjectmapping.SubjectConditionSet.subject_sets:type_name -> policy.subjectmapping.SubjectSet 34, // 6: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata 35, // 7: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value - 5, // 8: policy.subjectmapping.SubjectMapping.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 5, // 8: policy.subjectmapping.SubjectMapping.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet 36, // 9: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action 37, // 10: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct 7, // 11: policy.subjectmapping.MatchSubjectMappingsRequest.subject:type_name -> policy.subjectmapping.Subject @@ -2367,12 +2380,12 @@ var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 6, // 13: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping 6, // 14: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping 38, // 15: policy.subjectmapping.SubjectMappingCreate.metadata:type_name -> common.MetadataMutable - 5, // 16: policy.subjectmapping.SubjectMappingCreate.new_subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 26, // 16: policy.subjectmapping.SubjectMappingCreate.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate 36, // 17: policy.subjectmapping.SubjectMappingCreate.actions:type_name -> authorization.Action 14, // 18: policy.subjectmapping.CreateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingCreate 6, // 19: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 38, // 20: policy.subjectmapping.SubjectMappingUpdate.updated_metadata:type_name -> common.MetadataMutable - 36, // 21: policy.subjectmapping.SubjectMappingUpdate.udpated_actions:type_name -> authorization.Action + 38, // 20: policy.subjectmapping.SubjectMappingUpdate.update_metadata:type_name -> common.MetadataMutable + 36, // 21: policy.subjectmapping.SubjectMappingUpdate.update_actions:type_name -> authorization.Action 17, // 22: policy.subjectmapping.UpdateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingUpdate 6, // 23: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping 6, // 24: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java index c4123e1d71..75a34ce455 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java @@ -17,6 +17,7 @@ private SubjectConditionSetUpdate(com.google.protobuf.GeneratedMessageV3.Builder super(builder); } private SubjectConditionSetUpdate() { + updatedName_ = ""; updatedSubjectSets_ = java.util.Collections.emptyList(); } @@ -41,6 +42,53 @@ protected java.lang.Object newInstance( } private int bitField0_; + public static final int UPDATED_NAME_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object updatedName_ = ""; + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string updated_name = 1 [json_name = "updatedName"]; + * @return The updatedName. + */ + @java.lang.Override + public java.lang.String getUpdatedName() { + java.lang.Object ref = updatedName_; + 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(); + updatedName_ = s; + return s; + } + } + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string updated_name = 1 [json_name = "updatedName"]; + * @return The bytes for updatedName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpdatedNameBytes() { + java.lang.Object ref = updatedName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updatedName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int UPDATED_METADATA_FIELD_NUMBER = 2; private io.opentdf.platform.common.MetadataMutable updatedMetadata_; /** @@ -142,6 +190,9 @@ 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(updatedName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, updatedName_); + } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getUpdatedMetadata()); } @@ -157,6 +208,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updatedName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, updatedName_); + } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getUpdatedMetadata()); @@ -180,6 +234,8 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate other = (io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate) obj; + if (!getUpdatedName() + .equals(other.getUpdatedName())) return false; if (hasUpdatedMetadata() != other.hasUpdatedMetadata()) return false; if (hasUpdatedMetadata()) { if (!getUpdatedMetadata() @@ -198,6 +254,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + UPDATED_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUpdatedName().hashCode(); if (hasUpdatedMetadata()) { hash = (37 * hash) + UPDATED_METADATA_FIELD_NUMBER; hash = (53 * hash) + getUpdatedMetadata().hashCode(); @@ -344,6 +402,7 @@ private void maybeForceBuilderInitialization() { public Builder clear() { super.clear(); bitField0_ = 0; + updatedName_ = ""; updatedMetadata_ = null; if (updatedMetadataBuilder_ != null) { updatedMetadataBuilder_.dispose(); @@ -355,7 +414,7 @@ public Builder clear() { updatedSubjectSets_ = null; updatedSubjectSetsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -390,9 +449,9 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate build private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result) { if (updatedSubjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { updatedSubjectSets_ = java.util.Collections.unmodifiableList(updatedSubjectSets_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } result.updatedSubjectSets_ = updatedSubjectSets_; } else { @@ -402,8 +461,11 @@ private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmappin private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { + result.updatedName_ = updatedName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { result.updatedMetadata_ = updatedMetadataBuilder_ == null ? updatedMetadata_ : updatedMetadataBuilder_.build(); @@ -456,6 +518,11 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate other) { if (other == io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance()) return this; + if (!other.getUpdatedName().isEmpty()) { + updatedName_ = other.updatedName_; + bitField0_ |= 0x00000001; + onChanged(); + } if (other.hasUpdatedMetadata()) { mergeUpdatedMetadata(other.getUpdatedMetadata()); } @@ -463,7 +530,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectCondit if (!other.updatedSubjectSets_.isEmpty()) { if (updatedSubjectSets_.isEmpty()) { updatedSubjectSets_ = other.updatedSubjectSets_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureUpdatedSubjectSetsIsMutable(); updatedSubjectSets_.addAll(other.updatedSubjectSets_); @@ -476,7 +543,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectCondit updatedSubjectSetsBuilder_.dispose(); updatedSubjectSetsBuilder_ = null; updatedSubjectSets_ = other.updatedSubjectSets_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); updatedSubjectSetsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getUpdatedSubjectSetsFieldBuilder() : null; @@ -511,11 +578,16 @@ public Builder mergeFrom( case 0: done = true; break; + case 10: { + updatedName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 case 18: { input.readMessage( getUpdatedMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; break; } // case 18 case 26: { @@ -548,6 +620,98 @@ public Builder mergeFrom( } private int bitField0_; + private java.lang.Object updatedName_ = ""; + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string updated_name = 1 [json_name = "updatedName"]; + * @return The updatedName. + */ + public java.lang.String getUpdatedName() { + java.lang.Object ref = updatedName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updatedName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string updated_name = 1 [json_name = "updatedName"]; + * @return The bytes for updatedName. + */ + public com.google.protobuf.ByteString + getUpdatedNameBytes() { + java.lang.Object ref = updatedName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updatedName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string updated_name = 1 [json_name = "updatedName"]; + * @param value The updatedName to set. + * @return This builder for chaining. + */ + public Builder setUpdatedName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + updatedName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string updated_name = 1 [json_name = "updatedName"]; + * @return This builder for chaining. + */ + public Builder clearUpdatedName() { + updatedName_ = getDefaultInstance().getUpdatedName(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string updated_name = 1 [json_name = "updatedName"]; + * @param value The bytes for updatedName to set. + * @return This builder for chaining. + */ + public Builder setUpdatedNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + updatedName_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + private io.opentdf.platform.common.MetadataMutable updatedMetadata_; private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updatedMetadataBuilder_; @@ -556,7 +720,7 @@ public Builder mergeFrom( * @return Whether the updatedMetadata field is set. */ public boolean hasUpdatedMetadata() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; @@ -581,7 +745,7 @@ public Builder setUpdatedMetadata(io.opentdf.platform.common.MetadataMutable val } else { updatedMetadataBuilder_.setMessage(value); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -595,7 +759,7 @@ public Builder setUpdatedMetadata( } else { updatedMetadataBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -604,7 +768,7 @@ public Builder setUpdatedMetadata( */ public Builder mergeUpdatedMetadata(io.opentdf.platform.common.MetadataMutable value) { if (updatedMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && + if (((bitField0_ & 0x00000002) != 0) && updatedMetadata_ != null && updatedMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { getUpdatedMetadataBuilder().mergeFrom(value); @@ -615,7 +779,7 @@ public Builder mergeUpdatedMetadata(io.opentdf.platform.common.MetadataMutable v updatedMetadataBuilder_.mergeFrom(value); } if (updatedMetadata_ != null) { - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; onChanged(); } return this; @@ -624,7 +788,7 @@ public Builder mergeUpdatedMetadata(io.opentdf.platform.common.MetadataMutable v * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; */ public Builder clearUpdatedMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); updatedMetadata_ = null; if (updatedMetadataBuilder_ != null) { updatedMetadataBuilder_.dispose(); @@ -637,7 +801,7 @@ public Builder clearUpdatedMetadata() { * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; */ public io.opentdf.platform.common.MetadataMutable.Builder getUpdatedMetadataBuilder() { - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; onChanged(); return getUpdatedMetadataFieldBuilder().getBuilder(); } @@ -672,9 +836,9 @@ public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrB private java.util.List updatedSubjectSets_ = java.util.Collections.emptyList(); private void ensureUpdatedSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { updatedSubjectSets_ = new java.util.ArrayList(updatedSubjectSets_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; } } @@ -868,7 +1032,7 @@ public Builder addAllUpdatedSubjectSets( public Builder clearUpdatedSubjectSets() { if (updatedSubjectSetsBuilder_ == null) { updatedSubjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { updatedSubjectSetsBuilder_.clear(); @@ -973,7 +1137,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdatedSu updatedSubjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( updatedSubjectSets_, - ((bitField0_ & 0x00000002) != 0), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); updatedSubjectSets_ = null; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java index 7b3810501c..f7e3d91f59 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java @@ -8,6 +8,26 @@ public interface SubjectConditionSetUpdateOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectConditionSetUpdate) com.google.protobuf.MessageOrBuilder { + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string updated_name = 1 [json_name = "updatedName"]; + * @return The updatedName. + */ + java.lang.String getUpdatedName(); + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string updated_name = 1 [json_name = "updatedName"]; + * @return The bytes for updatedName. + */ + com.google.protobuf.ByteString + getUpdatedNameBytes(); + /** * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; * @return Whether the updatedMetadata field is set. 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 e6f68c570e..6a81890a1b 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 @@ -32,7 +32,6 @@ private SubjectMapping(com.google.protobuf.GeneratedMessageV3.Builder builder } private SubjectMapping() { id_ = ""; - subjectConditionSets_ = java.util.Collections.emptyList(); actions_ = java.util.Collections.emptyList(); } @@ -160,65 +159,42 @@ public io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrB return attributeValue_ == null ? io.opentdf.platform.policy.attributes.Value.getDefaultInstance() : attributeValue_; } - public static final int SUBJECT_CONDITION_SETS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List subjectConditionSets_; - /** - *
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - @java.lang.Override - public java.util.List getSubjectConditionSetsList() { - return subjectConditionSets_; - } + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 4; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; /** *
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    +   * the reusable SubjectConditionSet mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ @java.lang.Override - public java.util.List - getSubjectConditionSetsOrBuilderList() { - return subjectConditionSets_; + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000004) != 0); } /** *
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    +   * the reusable SubjectConditionSet mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. */ @java.lang.Override - public int getSubjectConditionSetsCount() { - return subjectConditionSets_.size(); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } /** *
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    +   * the reusable SubjectConditionSet mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSets(int index) { - return subjectConditionSets_.get(index); - } - /** - *
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( - int index) { - return subjectConditionSets_.get(index); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } public static final int ACTIONS_FIELD_NUMBER = 5; @@ -305,8 +281,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(3, getAttributeValue()); } - for (int i = 0; i < subjectConditionSets_.size(); i++) { - output.writeMessage(4, subjectConditionSets_.get(i)); + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(4, getSubjectConditionSet()); } for (int i = 0; i < actions_.size(); i++) { output.writeMessage(5, actions_.get(i)); @@ -331,9 +307,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getAttributeValue()); } - for (int i = 0; i < subjectConditionSets_.size(); i++) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, subjectConditionSets_.get(i)); + .computeMessageSize(4, getSubjectConditionSet()); } for (int i = 0; i < actions_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -366,8 +342,11 @@ public boolean equals(final java.lang.Object obj) { if (!getAttributeValue() .equals(other.getAttributeValue())) return false; } - if (!getSubjectConditionSetsList() - .equals(other.getSubjectConditionSetsList())) return false; + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } if (!getActionsList() .equals(other.getActionsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -391,9 +370,9 @@ public int hashCode() { hash = (37 * hash) + ATTRIBUTE_VALUE_FIELD_NUMBER; hash = (53 * hash) + getAttributeValue().hashCode(); } - if (getSubjectConditionSetsCount() > 0) { - hash = (37 * hash) + SUBJECT_CONDITION_SETS_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSetsList().hashCode(); + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); } if (getActionsCount() > 0) { hash = (37 * hash) + ACTIONS_FIELD_NUMBER; @@ -545,7 +524,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { getMetadataFieldBuilder(); getAttributeValueFieldBuilder(); - getSubjectConditionSetsFieldBuilder(); + getSubjectConditionSetFieldBuilder(); getActionsFieldBuilder(); } } @@ -564,13 +543,11 @@ public Builder clear() { attributeValueBuilder_.dispose(); attributeValueBuilder_ = null; } - if (subjectConditionSetsBuilder_ == null) { - subjectConditionSets_ = java.util.Collections.emptyList(); - } else { - subjectConditionSets_ = null; - subjectConditionSetsBuilder_.clear(); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000008); if (actionsBuilder_ == null) { actions_ = java.util.Collections.emptyList(); } else { @@ -611,15 +588,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMapping buildPartial() { } private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMapping result) { - if (subjectConditionSetsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - subjectConditionSets_ = java.util.Collections.unmodifiableList(subjectConditionSets_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.subjectConditionSets_ = subjectConditionSets_; - } else { - result.subjectConditionSets_ = subjectConditionSetsBuilder_.build(); - } if (actionsBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { actions_ = java.util.Collections.unmodifiableList(actions_); @@ -649,6 +617,12 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMapp : attributeValueBuilder_.build(); to_bitField0_ |= 0x00000002; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000004; + } result.bitField0_ |= to_bitField0_; } @@ -707,31 +681,8 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappin if (other.hasAttributeValue()) { mergeAttributeValue(other.getAttributeValue()); } - if (subjectConditionSetsBuilder_ == null) { - if (!other.subjectConditionSets_.isEmpty()) { - if (subjectConditionSets_.isEmpty()) { - subjectConditionSets_ = other.subjectConditionSets_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.addAll(other.subjectConditionSets_); - } - onChanged(); - } - } else { - if (!other.subjectConditionSets_.isEmpty()) { - if (subjectConditionSetsBuilder_.isEmpty()) { - subjectConditionSetsBuilder_.dispose(); - subjectConditionSetsBuilder_ = null; - subjectConditionSets_ = other.subjectConditionSets_; - bitField0_ = (bitField0_ & ~0x00000008); - subjectConditionSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getSubjectConditionSetsFieldBuilder() : null; - } else { - subjectConditionSetsBuilder_.addAllMessages(other.subjectConditionSets_); - } - } + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); } if (actionsBuilder_ == null) { if (!other.actions_.isEmpty()) { @@ -805,16 +756,10 @@ public Builder mergeFrom( break; } // case 26 case 34: { - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet m = - input.readMessage( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.parser(), - extensionRegistry); - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(m); - } else { - subjectConditionSetsBuilder_.addMessage(m); - } + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; break; } // case 34 case 42: { @@ -1197,316 +1142,161 @@ public io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrB return attributeValueBuilder_; } - private java.util.List subjectConditionSets_ = - java.util.Collections.emptyList(); - private void ensureSubjectConditionSetsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - subjectConditionSets_ = new java.util.ArrayList(subjectConditionSets_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetsBuilder_; - - /** - *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - public java.util.List getSubjectConditionSetsList() { - if (subjectConditionSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(subjectConditionSets_); - } else { - return subjectConditionSetsBuilder_.getMessageList(); - } - } - /** - *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - public int getSubjectConditionSetsCount() { - if (subjectConditionSetsBuilder_ == null) { - return subjectConditionSets_.size(); - } else { - return subjectConditionSetsBuilder_.getCount(); - } - } - /** - *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSets(int index) { - if (subjectConditionSetsBuilder_ == null) { - return subjectConditionSets_.get(index); - } else { - return subjectConditionSetsBuilder_.getMessage(index); - } - } - /** - *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - public Builder setSubjectConditionSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (subjectConditionSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.set(index, value); - onChanged(); - } else { - subjectConditionSetsBuilder_.setMessage(index, value); - } - return this; - } + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; /** *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    +     * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ - public Builder setSubjectConditionSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.set(index, builderForValue.build()); - onChanged(); - } else { - subjectConditionSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000008) != 0); } /** *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    +     * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. */ - public Builder addSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (subjectConditionSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(value); - onChanged(); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } else { - subjectConditionSetsBuilder_.addMessage(value); + return subjectConditionSetBuilder_.getMessage(); } - return this; } /** *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    +     * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; */ - public Builder addSubjectConditionSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (subjectConditionSetsBuilder_ == null) { + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(index, value); - onChanged(); + subjectConditionSet_ = value; } else { - subjectConditionSetsBuilder_.addMessage(index, value); + subjectConditionSetBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } /** *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    +     * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; */ - public Builder addSubjectConditionSets( + public Builder setSubjectConditionSet( io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(builderForValue.build()); - onChanged(); - } else { - subjectConditionSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - public Builder addSubjectConditionSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.add(index, builderForValue.build()); - onChanged(); + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); } else { - subjectConditionSetsBuilder_.addMessage(index, builderForValue.build()); + subjectConditionSetBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } /** *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    +     * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; */ - public Builder addAllSubjectConditionSets( - java.lang.Iterable values) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, subjectConditionSets_); - onChanged(); + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } } else { - subjectConditionSetsBuilder_.addAllMessages(values); + subjectConditionSetBuilder_.mergeFrom(value); } - return this; - } - /** - *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - public Builder clearSubjectConditionSets() { - if (subjectConditionSetsBuilder_ == null) { - subjectConditionSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000008; onChanged(); - } else { - subjectConditionSetsBuilder_.clear(); } return this; } /** *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    +     * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; */ - public Builder removeSubjectConditionSets(int index) { - if (subjectConditionSetsBuilder_ == null) { - ensureSubjectConditionSetsIsMutable(); - subjectConditionSets_.remove(index); - onChanged(); - } else { - subjectConditionSetsBuilder_.remove(index); + public Builder clearSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000008); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; } + onChanged(); return this; } /** *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    +     * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetsBuilder( - int index) { - return getSubjectConditionSetsFieldBuilder().getBuilder(index); - } - /** - *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( - int index) { - if (subjectConditionSetsBuilder_ == null) { - return subjectConditionSets_.get(index); } else { - return subjectConditionSetsBuilder_.getMessageOrBuilder(index); - } + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getSubjectConditionSetFieldBuilder().getBuilder(); } /** *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    +     * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; */ - public java.util.List - getSubjectConditionSetsOrBuilderList() { - if (subjectConditionSetsBuilder_ != null) { - return subjectConditionSetsBuilder_.getMessageOrBuilderList(); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(subjectConditionSets_); + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } } /** *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addSubjectConditionSetsBuilder() { - return getSubjectConditionSetsFieldBuilder().addBuilder( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); - } - /** - *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addSubjectConditionSetsBuilder( - int index) { - return getSubjectConditionSetsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); - } - /** - *
    -     * the reusable SubjectConditionSets mapped to the given Attribute Value
    +     * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; */ - public java.util.List - getSubjectConditionSetsBuilderList() { - return getSubjectConditionSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< + private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> - getSubjectConditionSetsFieldBuilder() { - if (subjectConditionSetsBuilder_ == null) { - subjectConditionSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( - subjectConditionSets_, - ((bitField0_ & 0x00000008) != 0), + getSubjectConditionSet(), getParentForChildren(), isClean()); - subjectConditionSets_ = null; + subjectConditionSet_ = null; } - return subjectConditionSetsBuilder_; + return subjectConditionSetBuilder_; } private java.util.List actions_ = diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java index 72f1f96e42..e951cd1672 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java @@ -18,9 +18,7 @@ private SubjectMappingCreate(com.google.protobuf.GeneratedMessageV3.Builder b } private SubjectMappingCreate() { attributeValueId_ = ""; - existingSubjectConditionSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - newSubjectConditionSets_ = java.util.Collections.emptyList(); + existingSubjectConditionSetId_ = ""; actions_ = java.util.Collections.emptyList(); } @@ -118,118 +116,89 @@ public java.lang.String getAttributeValueId() { } } - public static final int EXISTING_SUBJECT_CONDITION_SET_IDS_FIELD_NUMBER = 3; + public static final int EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3; @SuppressWarnings("serial") - private com.google.protobuf.LazyStringArrayList existingSubjectConditionSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); + private volatile java.lang.Object existingSubjectConditionSetId_ = ""; /** *
    -   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
        * 
    * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @return A list containing the existingSubjectConditionSetIds. - */ - public com.google.protobuf.ProtocolStringList - getExistingSubjectConditionSetIdsList() { - return existingSubjectConditionSetIds_; - } - /** - *
    -   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    -   * 
    - * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @return The count of existingSubjectConditionSetIds. - */ - public int getExistingSubjectConditionSetIdsCount() { - return existingSubjectConditionSetIds_.size(); - } - /** - *
    -   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    -   * 
    - * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param index The index of the element to return. - * @return The existingSubjectConditionSetIds at the given index. - */ - public java.lang.String getExistingSubjectConditionSetIds(int index) { - return existingSubjectConditionSetIds_.get(index); - } - /** - *
    -   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    -   * 
    - * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param index The index of the value to return. - * @return The bytes of the existingSubjectConditionSetIds at the given index. - */ - public com.google.protobuf.ByteString - getExistingSubjectConditionSetIdsBytes(int index) { - return existingSubjectConditionSetIds_.getByteString(index); - } - - public static final int NEW_SUBJECT_CONDITION_SETS_FIELD_NUMBER = 4; - @SuppressWarnings("serial") - private java.util.List newSubjectConditionSets_; - /** - *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. */ @java.lang.Override - public java.util.List getNewSubjectConditionSetsList() { - return newSubjectConditionSets_; + public java.lang.String getExistingSubjectConditionSetId() { + java.lang.Object ref = existingSubjectConditionSetId_; + 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(); + existingSubjectConditionSetId_ = s; + return s; + } } /** *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. */ @java.lang.Override - public java.util.List - getNewSubjectConditionSetsOrBuilderList() { - return newSubjectConditionSets_; + public com.google.protobuf.ByteString + getExistingSubjectConditionSetIdBytes() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + existingSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } + + public static final int NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER = 4; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; /** *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. */ @java.lang.Override - public int getNewSubjectConditionSetsCount() { - return newSubjectConditionSets_.size(); + public boolean hasNewSubjectConditionSet() { + return ((bitField0_ & 0x00000002) != 0); } /** *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getNewSubjectConditionSets(int index) { - return newSubjectConditionSets_.get(index); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; } /** *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getNewSubjectConditionSetsOrBuilder( - int index) { - return newSubjectConditionSets_.get(index); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; } public static final int ACTIONS_FIELD_NUMBER = 5; @@ -313,11 +282,11 @@ 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 < existingSubjectConditionSetIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, existingSubjectConditionSetIds_.getRaw(i)); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, existingSubjectConditionSetId_); } - for (int i = 0; i < newSubjectConditionSets_.size(); i++) { - output.writeMessage(4, newSubjectConditionSets_.get(i)); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getNewSubjectConditionSet()); } for (int i = 0; i < actions_.size(); i++) { output.writeMessage(5, actions_.get(i)); @@ -338,17 +307,12 @@ 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 < existingSubjectConditionSetIds_.size(); i++) { - dataSize += computeStringSizeNoTag(existingSubjectConditionSetIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getExistingSubjectConditionSetIdsList().size(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, existingSubjectConditionSetId_); } - for (int i = 0; i < newSubjectConditionSets_.size(); i++) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, newSubjectConditionSets_.get(i)); + .computeMessageSize(4, getNewSubjectConditionSet()); } for (int i = 0; i < actions_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -376,10 +340,13 @@ public boolean equals(final java.lang.Object obj) { } if (!getAttributeValueId() .equals(other.getAttributeValueId())) return false; - if (!getExistingSubjectConditionSetIdsList() - .equals(other.getExistingSubjectConditionSetIdsList())) return false; - if (!getNewSubjectConditionSetsList() - .equals(other.getNewSubjectConditionSetsList())) return false; + if (!getExistingSubjectConditionSetId() + .equals(other.getExistingSubjectConditionSetId())) return false; + if (hasNewSubjectConditionSet() != other.hasNewSubjectConditionSet()) return false; + if (hasNewSubjectConditionSet()) { + if (!getNewSubjectConditionSet() + .equals(other.getNewSubjectConditionSet())) return false; + } if (!getActionsList() .equals(other.getActionsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -399,13 +366,11 @@ public int hashCode() { } hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; hash = (53 * hash) + getAttributeValueId().hashCode(); - if (getExistingSubjectConditionSetIdsCount() > 0) { - hash = (37 * hash) + EXISTING_SUBJECT_CONDITION_SET_IDS_FIELD_NUMBER; - hash = (53 * hash) + getExistingSubjectConditionSetIdsList().hashCode(); - } - if (getNewSubjectConditionSetsCount() > 0) { - hash = (37 * hash) + NEW_SUBJECT_CONDITION_SETS_FIELD_NUMBER; - hash = (53 * hash) + getNewSubjectConditionSetsList().hashCode(); + hash = (37 * hash) + EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getExistingSubjectConditionSetId().hashCode(); + if (hasNewSubjectConditionSet()) { + hash = (37 * hash) + NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getNewSubjectConditionSet().hashCode(); } if (getActionsCount() > 0) { hash = (37 * hash) + ACTIONS_FIELD_NUMBER; @@ -542,7 +507,7 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getMetadataFieldBuilder(); - getNewSubjectConditionSetsFieldBuilder(); + getNewSubjectConditionSetFieldBuilder(); getActionsFieldBuilder(); } } @@ -556,15 +521,12 @@ public Builder clear() { metadataBuilder_ = null; } attributeValueId_ = ""; - existingSubjectConditionSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - if (newSubjectConditionSetsBuilder_ == null) { - newSubjectConditionSets_ = java.util.Collections.emptyList(); - } else { - newSubjectConditionSets_ = null; - newSubjectConditionSetsBuilder_.clear(); + existingSubjectConditionSetId_ = ""; + newSubjectConditionSet_ = null; + if (newSubjectConditionSetBuilder_ != null) { + newSubjectConditionSetBuilder_.dispose(); + newSubjectConditionSetBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000008); if (actionsBuilder_ == null) { actions_ = java.util.Collections.emptyList(); } else { @@ -605,15 +567,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate buildParti } private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate result) { - if (newSubjectConditionSetsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - newSubjectConditionSets_ = java.util.Collections.unmodifiableList(newSubjectConditionSets_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.newSubjectConditionSets_ = newSubjectConditionSets_; - } else { - result.newSubjectConditionSets_ = newSubjectConditionSetsBuilder_.build(); - } if (actionsBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { actions_ = java.util.Collections.unmodifiableList(actions_); @@ -638,8 +591,13 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMapp result.attributeValueId_ = attributeValueId_; } if (((from_bitField0_ & 0x00000004) != 0)) { - existingSubjectConditionSetIds_.makeImmutable(); - result.existingSubjectConditionSetIds_ = existingSubjectConditionSetIds_; + result.existingSubjectConditionSetId_ = existingSubjectConditionSetId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.newSubjectConditionSet_ = newSubjectConditionSetBuilder_ == null + ? newSubjectConditionSet_ + : newSubjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @@ -696,41 +654,13 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappin bitField0_ |= 0x00000002; onChanged(); } - if (!other.existingSubjectConditionSetIds_.isEmpty()) { - if (existingSubjectConditionSetIds_.isEmpty()) { - existingSubjectConditionSetIds_ = other.existingSubjectConditionSetIds_; - bitField0_ |= 0x00000004; - } else { - ensureExistingSubjectConditionSetIdsIsMutable(); - existingSubjectConditionSetIds_.addAll(other.existingSubjectConditionSetIds_); - } + if (!other.getExistingSubjectConditionSetId().isEmpty()) { + existingSubjectConditionSetId_ = other.existingSubjectConditionSetId_; + bitField0_ |= 0x00000004; onChanged(); } - if (newSubjectConditionSetsBuilder_ == null) { - if (!other.newSubjectConditionSets_.isEmpty()) { - if (newSubjectConditionSets_.isEmpty()) { - newSubjectConditionSets_ = other.newSubjectConditionSets_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureNewSubjectConditionSetsIsMutable(); - newSubjectConditionSets_.addAll(other.newSubjectConditionSets_); - } - onChanged(); - } - } else { - if (!other.newSubjectConditionSets_.isEmpty()) { - if (newSubjectConditionSetsBuilder_.isEmpty()) { - newSubjectConditionSetsBuilder_.dispose(); - newSubjectConditionSetsBuilder_ = null; - newSubjectConditionSets_ = other.newSubjectConditionSets_; - bitField0_ = (bitField0_ & ~0x00000008); - newSubjectConditionSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getNewSubjectConditionSetsFieldBuilder() : null; - } else { - newSubjectConditionSetsBuilder_.addAllMessages(other.newSubjectConditionSets_); - } - } + if (other.hasNewSubjectConditionSet()) { + mergeNewSubjectConditionSet(other.getNewSubjectConditionSet()); } if (actionsBuilder_ == null) { if (!other.actions_.isEmpty()) { @@ -797,22 +727,15 @@ public Builder mergeFrom( break; } // case 18 case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureExistingSubjectConditionSetIdsIsMutable(); - existingSubjectConditionSetIds_.add(s); + existingSubjectConditionSetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; break; } // case 26 case 34: { - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet m = - input.readMessage( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.parser(), - extensionRegistry); - if (newSubjectConditionSetsBuilder_ == null) { - ensureNewSubjectConditionSetsIsMutable(); - newSubjectConditionSets_.add(m); - } else { - newSubjectConditionSetsBuilder_.addMessage(m); - } + input.readMessage( + getNewSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; break; } // case 34 case 42: { @@ -1058,463 +981,253 @@ public Builder setAttributeValueIdBytes( return this; } - private com.google.protobuf.LazyStringArrayList existingSubjectConditionSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureExistingSubjectConditionSetIdsIsMutable() { - if (!existingSubjectConditionSetIds_.isModifiable()) { - existingSubjectConditionSetIds_ = new com.google.protobuf.LazyStringArrayList(existingSubjectConditionSetIds_); - } - bitField0_ |= 0x00000004; - } - /** - *
    -     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    -     * 
    - * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @return A list containing the existingSubjectConditionSetIds. - */ - public com.google.protobuf.ProtocolStringList - getExistingSubjectConditionSetIdsList() { - existingSubjectConditionSetIds_.makeImmutable(); - return existingSubjectConditionSetIds_; - } + private java.lang.Object existingSubjectConditionSetId_ = ""; /** *
    -     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
          * 
    * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @return The count of existingSubjectConditionSetIds. + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. */ - public int getExistingSubjectConditionSetIdsCount() { - return existingSubjectConditionSetIds_.size(); - } - /** - *
    -     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    -     * 
    - * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param index The index of the element to return. - * @return The existingSubjectConditionSetIds at the given index. - */ - public java.lang.String getExistingSubjectConditionSetIds(int index) { - return existingSubjectConditionSetIds_.get(index); + public java.lang.String getExistingSubjectConditionSetId() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + existingSubjectConditionSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** *
    -     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
          * 
    * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param index The index of the value to return. - * @return The bytes of the existingSubjectConditionSetIds at the given index. + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. */ public com.google.protobuf.ByteString - getExistingSubjectConditionSetIdsBytes(int index) { - return existingSubjectConditionSetIds_.getByteString(index); - } - /** - *
    -     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    -     * 
    - * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param index The index to set the value at. - * @param value The existingSubjectConditionSetIds to set. - * @return This builder for chaining. - */ - public Builder setExistingSubjectConditionSetIds( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureExistingSubjectConditionSetIdsIsMutable(); - existingSubjectConditionSetIds_.set(index, value); - bitField0_ |= 0x00000004; - onChanged(); - return this; + getExistingSubjectConditionSetIdBytes() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + existingSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** *
    -     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
          * 
    * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param value The existingSubjectConditionSetIds to add. + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @param value The existingSubjectConditionSetId to set. * @return This builder for chaining. */ - public Builder addExistingSubjectConditionSetIds( + public Builder setExistingSubjectConditionSetId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureExistingSubjectConditionSetIdsIsMutable(); - existingSubjectConditionSetIds_.add(value); + existingSubjectConditionSetId_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
    -     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
          * 
    * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param values The existingSubjectConditionSetIds to add. + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; * @return This builder for chaining. */ - public Builder addAllExistingSubjectConditionSetIds( - java.lang.Iterable values) { - ensureExistingSubjectConditionSetIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, existingSubjectConditionSetIds_); - bitField0_ |= 0x00000004; + public Builder clearExistingSubjectConditionSetId() { + existingSubjectConditionSetId_ = getDefaultInstance().getExistingSubjectConditionSetId(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** *
    -     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
          * 
    * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @param value The bytes for existingSubjectConditionSetId to set. * @return This builder for chaining. */ - public Builder clearExistingSubjectConditionSetIds() { - existingSubjectConditionSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004);; - onChanged(); - return this; - } - /** - *
    -     * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    -     * 
    - * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param value The bytes of the existingSubjectConditionSetIds to add. - * @return This builder for chaining. - */ - public Builder addExistingSubjectConditionSetIdsBytes( + public Builder setExistingSubjectConditionSetIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureExistingSubjectConditionSetIdsIsMutable(); - existingSubjectConditionSetIds_.add(value); + existingSubjectConditionSetId_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } - private java.util.List newSubjectConditionSets_ = - java.util.Collections.emptyList(); - private void ensureNewSubjectConditionSetsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - newSubjectConditionSets_ = new java.util.ArrayList(newSubjectConditionSets_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> newSubjectConditionSetsBuilder_; - - /** - *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - public java.util.List getNewSubjectConditionSetsList() { - if (newSubjectConditionSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(newSubjectConditionSets_); - } else { - return newSubjectConditionSetsBuilder_.getMessageList(); - } - } + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> newSubjectConditionSetBuilder_; /** *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. */ - public int getNewSubjectConditionSetsCount() { - if (newSubjectConditionSetsBuilder_ == null) { - return newSubjectConditionSets_.size(); - } else { - return newSubjectConditionSetsBuilder_.getCount(); - } + public boolean hasNewSubjectConditionSet() { + return ((bitField0_ & 0x00000008) != 0); } /** *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getNewSubjectConditionSets(int index) { - if (newSubjectConditionSetsBuilder_ == null) { - return newSubjectConditionSets_.get(index); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { + if (newSubjectConditionSetBuilder_ == null) { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; } else { - return newSubjectConditionSetsBuilder_.getMessage(index); + return newSubjectConditionSetBuilder_.getMessage(); } } /** *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; */ - public Builder setNewSubjectConditionSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (newSubjectConditionSetsBuilder_ == null) { + public Builder setNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (newSubjectConditionSetBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureNewSubjectConditionSetsIsMutable(); - newSubjectConditionSets_.set(index, value); - onChanged(); - } else { - newSubjectConditionSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - public Builder setNewSubjectConditionSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { - if (newSubjectConditionSetsBuilder_ == null) { - ensureNewSubjectConditionSetsIsMutable(); - newSubjectConditionSets_.set(index, builderForValue.build()); - onChanged(); + newSubjectConditionSet_ = value; } else { - newSubjectConditionSetsBuilder_.setMessage(index, builderForValue.build()); + newSubjectConditionSetBuilder_.setMessage(value); } + bitField0_ |= 0x00000008; + onChanged(); return this; } /** *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; */ - public Builder addNewSubjectConditionSets(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (newSubjectConditionSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureNewSubjectConditionSetsIsMutable(); - newSubjectConditionSets_.add(value); - onChanged(); + public Builder setNewSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { + if (newSubjectConditionSetBuilder_ == null) { + newSubjectConditionSet_ = builderForValue.build(); } else { - newSubjectConditionSetsBuilder_.addMessage(value); + newSubjectConditionSetBuilder_.setMessage(builderForValue.build()); } + bitField0_ |= 0x00000008; + onChanged(); return this; } /** *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; */ - public Builder addNewSubjectConditionSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (newSubjectConditionSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); + public Builder mergeNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (newSubjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + newSubjectConditionSet_ != null && + newSubjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { + getNewSubjectConditionSetBuilder().mergeFrom(value); + } else { + newSubjectConditionSet_ = value; } - ensureNewSubjectConditionSetsIsMutable(); - newSubjectConditionSets_.add(index, value); - onChanged(); - } else { - newSubjectConditionSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - public Builder addNewSubjectConditionSets( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { - if (newSubjectConditionSetsBuilder_ == null) { - ensureNewSubjectConditionSetsIsMutable(); - newSubjectConditionSets_.add(builderForValue.build()); - onChanged(); - } else { - newSubjectConditionSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - public Builder addNewSubjectConditionSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { - if (newSubjectConditionSetsBuilder_ == null) { - ensureNewSubjectConditionSetsIsMutable(); - newSubjectConditionSets_.add(index, builderForValue.build()); - onChanged(); } else { - newSubjectConditionSetsBuilder_.addMessage(index, builderForValue.build()); + newSubjectConditionSetBuilder_.mergeFrom(value); } - return this; - } - /** - *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - public Builder addAllNewSubjectConditionSets( - java.lang.Iterable values) { - if (newSubjectConditionSetsBuilder_ == null) { - ensureNewSubjectConditionSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, newSubjectConditionSets_); - onChanged(); - } else { - newSubjectConditionSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - public Builder clearNewSubjectConditionSets() { - if (newSubjectConditionSetsBuilder_ == null) { - newSubjectConditionSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + if (newSubjectConditionSet_ != null) { + bitField0_ |= 0x00000008; onChanged(); - } else { - newSubjectConditionSetsBuilder_.clear(); } return this; } /** *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; */ - public Builder removeNewSubjectConditionSets(int index) { - if (newSubjectConditionSetsBuilder_ == null) { - ensureNewSubjectConditionSetsIsMutable(); - newSubjectConditionSets_.remove(index); - onChanged(); - } else { - newSubjectConditionSetsBuilder_.remove(index); + public Builder clearNewSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000008); + newSubjectConditionSet_ = null; + if (newSubjectConditionSetBuilder_ != null) { + newSubjectConditionSetBuilder_.dispose(); + newSubjectConditionSetBuilder_ = null; } + onChanged(); return this; } /** *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getNewSubjectConditionSetsBuilder( - int index) { - return getNewSubjectConditionSetsFieldBuilder().getBuilder(index); - } - /** - *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getNewSubjectConditionSetsOrBuilder( - int index) { - if (newSubjectConditionSetsBuilder_ == null) { - return newSubjectConditionSets_.get(index); } else { - return newSubjectConditionSetsBuilder_.getMessageOrBuilder(index); - } + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getNewSubjectConditionSetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNewSubjectConditionSetFieldBuilder().getBuilder(); } /** *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; */ - public java.util.List - getNewSubjectConditionSetsOrBuilderList() { - if (newSubjectConditionSetsBuilder_ != null) { - return newSubjectConditionSetsBuilder_.getMessageOrBuilderList(); + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { + if (newSubjectConditionSetBuilder_ != null) { + return newSubjectConditionSetBuilder_.getMessageOrBuilder(); } else { - return java.util.Collections.unmodifiableList(newSubjectConditionSets_); + return newSubjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; } } /** *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
          * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addNewSubjectConditionSetsBuilder() { - return getNewSubjectConditionSetsFieldBuilder().addBuilder( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); - } - /** - *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder addNewSubjectConditionSetsBuilder( - int index) { - return getNewSubjectConditionSetsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()); - } - /** - *
    -     * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - public java.util.List - getNewSubjectConditionSetsBuilderList() { - return getNewSubjectConditionSetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> - getNewSubjectConditionSetsFieldBuilder() { - if (newSubjectConditionSetsBuilder_ == null) { - newSubjectConditionSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( - newSubjectConditionSets_, - ((bitField0_ & 0x00000008) != 0), + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> + getNewSubjectConditionSetFieldBuilder() { + if (newSubjectConditionSetBuilder_ == null) { + newSubjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( + getNewSubjectConditionSet(), getParentForChildren(), isClean()); - newSubjectConditionSets_ = null; + newSubjectConditionSet_ = null; } - return newSubjectConditionSetsBuilder_; + return newSubjectConditionSetBuilder_; } private java.util.List actions_ = diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java index 23a0cfe994..a487edc192 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java @@ -45,88 +45,50 @@ public interface SubjectMappingCreateOrBuilder extends /** *
    -   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
        * 
    * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @return A list containing the existingSubjectConditionSetIds. + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. */ - java.util.List - getExistingSubjectConditionSetIdsList(); + java.lang.String getExistingSubjectConditionSetId(); /** *
    -   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    +   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
        * 
    * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @return The count of existingSubjectConditionSetIds. - */ - int getExistingSubjectConditionSetIdsCount(); - /** - *
    -   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    -   * 
    - * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param index The index of the element to return. - * @return The existingSubjectConditionSetIds at the given index. - */ - java.lang.String getExistingSubjectConditionSetIds(int index); - /** - *
    -   * Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets)
    -   * 
    - * - * repeated string existing_subject_condition_set_ids = 3 [json_name = "existingSubjectConditionSetIds"]; - * @param index The index of the value to return. - * @return The bytes of the existingSubjectConditionSetIds at the given index. + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. */ com.google.protobuf.ByteString - getExistingSubjectConditionSetIdsBytes(int index); + getExistingSubjectConditionSetIdBytes(); /** *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. */ - java.util.List - getNewSubjectConditionSetsList(); + boolean hasNewSubjectConditionSet(); /** *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getNewSubjectConditionSets(int index); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet(); /** *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; */ - int getNewSubjectConditionSetsCount(); - /** - *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - java.util.List - getNewSubjectConditionSetsOrBuilderList(); - /** - *
    -   * Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided)
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet new_subject_condition_sets = 4 [json_name = "newSubjectConditionSets"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getNewSubjectConditionSetsOrBuilder( - int index); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder(); /** *
    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 9e221fd759..a0d1420380 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
    @@ -64,47 +64,30 @@ public interface SubjectMappingOrBuilder extends
     
       /**
        * 
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    +   * the reusable SubjectConditionSet mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ - java.util.List - getSubjectConditionSetsList(); + boolean hasSubjectConditionSet(); /** *
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    +   * the reusable SubjectConditionSet mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSets(int index); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); /** *
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    +   * the reusable SubjectConditionSet mapped to the given Attribute Value
        * 
    * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; */ - int getSubjectConditionSetsCount(); - /** - *
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - java.util.List - getSubjectConditionSetsOrBuilderList(); - /** - *
    -   * the reusable SubjectConditionSets mapped to the given Attribute Value
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectConditionSet subject_condition_sets = 4 [json_name = "subjectConditionSets"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetsOrBuilder( - int index); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); /** *
    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 a352dc951c..3732dc400c 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
    @@ -207,163 +207,164 @@ public static void registerAllExtensions(
           "\002id\022\022\n\004name\030\002 \001(\tR\004name\022,\n\010metadata\030\003 \001(" +
           "\0132\020.common.MetadataR\010metadata\022N\n\014subject" +
           "_sets\030\004 \003(\0132!.policy.subjectmapping.Subj" +
    -      "ectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\244\002\n\016Subjec" +
    +      "ectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\242\002\n\016Subjec" +
           "tMapping\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010metadata\030\002 \001" +
           "(\0132\020.common.MetadataR\010metadata\022A\n\017attrib" +
           "ute_value\030\003 \001(\0132\030.policy.attributes.Valu" +
    -      "eR\016attributeValue\022`\n\026subject_condition_s" +
    -      "ets\030\004 \003(\0132*.policy.subjectmapping.Subjec" +
    -      "tConditionSetR\024subjectConditionSets\022/\n\007a" +
    -      "ctions\030\005 \003(\0132\025.authorization.ActionR\007act" +
    -      "ions\"B\n\007Subject\0227\n\nattributes\030\001 \001(\0132\027.go" +
    -      "ogle.protobuf.StructR\nattributes\"W\n\033Matc" +
    -      "hSubjectMappingsRequest\0228\n\007subject\030\001 \001(\013" +
    -      "2\036.policy.subjectmapping.SubjectR\007subjec" +
    -      "t\"p\n\034MatchSubjectMappingsResponse\022P\n\020sub" +
    -      "ject_mappings\030\001 \003(\0132%.policy.subjectmapp" +
    -      "ing.SubjectMappingR\017subjectMappings\"2\n\030G" +
    -      "etSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003" +
    -      "\310\001\001R\002id\"k\n\031GetSubjectMappingResponse\022N\n\017" +
    -      "subject_mapping\030\001 \001(\0132%.policy.subjectma" +
    -      "pping.SubjectMappingR\016subjectMapping\"\034\n\032" +
    -      "ListSubjectMappingsRequest\"o\n\033ListSubjec" +
    -      "tMappingsResponse\022P\n\020subject_mappings\030\001 " +
    -      "\003(\0132%.policy.subjectmapping.SubjectMappi" +
    -      "ngR\017subjectMappings\"\337\002\n\024SubjectMappingCr" +
    -      "eate\0223\n\010metadata\030\001 \001(\0132\027.common.Metadata" +
    -      "MutableR\010metadata\022,\n\022attribute_value_id\030" +
    -      "\002 \001(\tR\020attributeValueId\022J\n\"existing_subj" +
    -      "ect_condition_set_ids\030\003 \003(\tR\036existingSub" +
    -      "jectConditionSetIds\022g\n\032new_subject_condi" +
    -      "tion_sets\030\004 \003(\0132*.policy.subjectmapping." +
    -      "SubjectConditionSetR\027newSubjectCondition" +
    -      "Sets\022/\n\007actions\030\005 \003(\0132\025.authorization.Ac" +
    +      "eR\016attributeValue\022^\n\025subject_condition_s" +
    +      "et\030\004 \001(\0132*.policy.subjectmapping.Subject" +
    +      "ConditionSetR\023subjectConditionSet\022/\n\007act" +
    +      "ions\030\005 \003(\0132\025.authorization.ActionR\007actio" +
    +      "ns\"B\n\007Subject\0227\n\nattributes\030\001 \001(\0132\027.goog" +
    +      "le.protobuf.StructR\nattributes\"W\n\033MatchS" +
    +      "ubjectMappingsRequest\0228\n\007subject\030\001 \001(\0132\036" +
    +      ".policy.subjectmapping.SubjectR\007subject\"" +
    +      "p\n\034MatchSubjectMappingsResponse\022P\n\020subje" +
    +      "ct_mappings\030\001 \003(\0132%.policy.subjectmappin" +
    +      "g.SubjectMappingR\017subjectMappings\"2\n\030Get" +
    +      "SubjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001" +
    +      "\001R\002id\"k\n\031GetSubjectMappingResponse\022N\n\017su" +
    +      "bject_mapping\030\001 \001(\0132%.policy.subjectmapp" +
    +      "ing.SubjectMappingR\016subjectMapping\"\034\n\032Li" +
    +      "stSubjectMappingsRequest\"o\n\033ListSubjectM" +
    +      "appingsResponse\022P\n\020subject_mappings\030\001 \003(" +
    +      "\0132%.policy.subjectmapping.SubjectMapping" +
    +      "R\017subjectMappings\"\341\002\n\024SubjectMappingCrea" +
    +      "te\0223\n\010metadata\030\001 \001(\0132\027.common.MetadataMu" +
    +      "tableR\010metadata\022,\n\022attribute_value_id\030\002 " +
    +      "\001(\tR\020attributeValueId\022H\n!existing_subjec" +
    +      "t_condition_set_id\030\003 \001(\tR\035existingSubjec" +
    +      "tConditionSetId\022k\n\031new_subject_condition" +
    +      "_set\030\004 \001(\01320.policy.subjectmapping.Subje" +
    +      "ctConditionSetCreateR\026newSubjectConditio" +
    +      "nSet\022/\n\007actions\030\005 \003(\0132\025.authorization.Ac" +
           "tionR\007actions\"s\n\033CreateSubjectMappingReq" +
           "uest\022T\n\017subject_mapping\030\001 \001(\0132+.policy.s" +
           "ubjectmapping.SubjectMappingCreateR\016subj" +
           "ectMapping\"n\n\034CreateSubjectMappingRespon" +
           "se\022N\n\017subject_mapping\030\001 \001(\0132%.policy.sub" +
           "jectmapping.SubjectMappingR\016subjectMappi" +
    -      "ng\"\344\001\n\024SubjectMappingUpdate\022B\n\020updated_m" +
    -      "etadata\030\002 \001(\0132\027.common.MetadataMutableR\017" +
    -      "updatedMetadata\022H\n!updated_subject_condi" +
    -      "tion_set_ids\030\003 \003(\tR\035updatedSubjectCondit" +
    -      "ionSetIds\022>\n\017udpated_actions\030\005 \003(\0132\025.aut" +
    -      "horization.ActionR\016udpatedActions\"\213\001\n\033Up" +
    -      "dateSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272" +
    -      "H\003\310\001\001R\002id\022T\n\017subject_mapping\030\002 \001(\0132+.pol" +
    -      "icy.subjectmapping.SubjectMappingUpdateR" +
    -      "\016subjectMapping\"n\n\034UpdateSubjectMappingR" +
    -      "esponse\022N\n\017subject_mapping\030\001 \001(\0132%.polic" +
    -      "y.subjectmapping.SubjectMappingR\016subject" +
    -      "Mapping\"5\n\033DeleteSubjectMappingRequest\022\026" +
    -      "\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectM" +
    -      "appingResponse\022N\n\017subject_mapping\030\001 \001(\0132" +
    -      "%.policy.subjectmapping.SubjectMappingR\016" +
    -      "subjectMapping\"7\n\035GetSubjectConditionSet" +
    -      "Request\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetS" +
    +      "ng\"\334\001\n\024SubjectMappingUpdate\022@\n\017update_me" +
    +      "tadata\030\002 \001(\0132\027.common.MetadataMutableR\016u" +
    +      "pdateMetadata\022D\n\037update_subject_conditio" +
    +      "n_set_id\030\003 \001(\tR\033updateSubjectConditionSe" +
    +      "tId\022<\n\016update_actions\030\005 \003(\0132\025.authorizat" +
    +      "ion.ActionR\rupdateActions\"\213\001\n\033UpdateSubj" +
    +      "ectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002i" +
    +      "d\022T\n\017subject_mapping\030\002 \001(\0132+.policy.subj" +
    +      "ectmapping.SubjectMappingUpdateR\016subject" +
    +      "Mapping\"n\n\034UpdateSubjectMappingResponse\022" +
    +      "N\n\017subject_mapping\030\001 \001(\0132%.policy.subjec" +
    +      "tmapping.SubjectMappingR\016subjectMapping\"" +
    +      "5\n\033DeleteSubjectMappingRequest\022\026\n\002id\030\001 \001" +
    +      "(\tB\006\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectMappingRe" +
    +      "sponse\022N\n\017subject_mapping\030\001 \001(\0132%.policy" +
    +      ".subjectmapping.SubjectMappingR\016subjectM" +
    +      "apping\"7\n\035GetSubjectConditionSetRequest\022" +
    +      "\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetSubjectCo" +
    +      "nditionSetResponse\022^\n\025subject_condition_" +
    +      "set\030\001 \001(\0132*.policy.subjectmapping.Subjec" +
    +      "tConditionSetR\023subjectConditionSet\022e\n\033as" +
    +      "sociated_subject_mappings\030\002 \003(\0132%.policy" +
    +      ".subjectmapping.SubjectMappingR\031associat" +
    +      "edSubjectMappings\"!\n\037ListSubjectConditio" +
    +      "nSetsRequest\"\204\001\n ListSubjectConditionSet" +
    +      "sResponse\022`\n\026subject_condition_sets\030\001 \003(" +
    +      "\0132*.policy.subjectmapping.SubjectConditi" +
    +      "onSetR\024subjectConditionSets\"\264\001\n\031SubjectC" +
    +      "onditionSetCreate\0223\n\010metadata\030\001 \001(\0132\027.co" +
    +      "mmon.MetadataMutableR\010metadata\022\022\n\004name\030\002" +
    +      " \001(\tR\004name\022N\n\014subject_sets\030\003 \003(\0132!.polic" +
    +      "y.subjectmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013s" +
    +      "ubjectSets\"\210\001\n CreateSubjectConditionSet" +
    +      "Request\022d\n\025subject_condition_set\030\001 \001(\01320" +
    +      ".policy.subjectmapping.SubjectConditionS" +
    +      "etCreateR\023subjectConditionSet\"\203\001\n!Create" +
    +      "SubjectConditionSetResponse\022^\n\025subject_c" +
    +      "ondition_set\030\001 \001(\0132*.policy.subjectmappi" +
    +      "ng.SubjectConditionSetR\023subjectCondition" +
    +      "Set\"\341\001\n\031SubjectConditionSetUpdate\022!\n\014upd" +
    +      "ated_name\030\001 \001(\tR\013updatedName\022B\n\020updated_" +
    +      "metadata\030\002 \001(\0132\027.common.MetadataMutableR" +
    +      "\017updatedMetadata\022]\n\024updated_subject_sets" +
    +      "\030\003 \003(\0132!.policy.subjectmapping.SubjectSe" +
    +      "tB\010\272H\005\222\001\002\010\001R\022updatedSubjectSets\"\240\001\n Upda" +
    +      "teSubjectConditionSetRequest\022\026\n\002id\030\001 \001(\t" +
    +      "B\006\272H\003\310\001\001R\002id\022d\n\025subject_condition_set\030\002 " +
    +      "\001(\01320.policy.subjectmapping.SubjectCondi" +
    +      "tionSetUpdateR\023subjectConditionSet\"\203\001\n!U" +
    +      "pdateSubjectConditionSetResponse\022^\n\025subj" +
    +      "ect_condition_set\030\001 \001(\0132*.policy.subject" +
    +      "mapping.SubjectConditionSetR\023subjectCond" +
    +      "itionSet\":\n DeleteSubjectConditionSetReq" +
    +      "uest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\203\001\n!DeleteS" +
           "ubjectConditionSetResponse\022^\n\025subject_co" +
           "ndition_set\030\001 \001(\0132*.policy.subjectmappin" +
           "g.SubjectConditionSetR\023subjectConditionS" +
    -      "et\022e\n\033associated_subject_mappings\030\002 \003(\0132" +
    -      "%.policy.subjectmapping.SubjectMappingR\031" +
    -      "associatedSubjectMappings\"!\n\037ListSubject" +
    -      "ConditionSetsRequest\"\204\001\n ListSubjectCond" +
    -      "itionSetsResponse\022`\n\026subject_condition_s" +
    -      "ets\030\001 \003(\0132*.policy.subjectmapping.Subjec" +
    -      "tConditionSetR\024subjectConditionSets\"\264\001\n\031" +
    -      "SubjectConditionSetCreate\0223\n\010metadata\030\001 " +
    -      "\001(\0132\027.common.MetadataMutableR\010metadata\022\022" +
    -      "\n\004name\030\002 \001(\tR\004name\022N\n\014subject_sets\030\003 \003(\013" +
    -      "2!.policy.subjectmapping.SubjectSetB\010\272H\005" +
    -      "\222\001\002\010\001R\013subjectSets\"\210\001\n CreateSubjectCond" +
    -      "itionSetRequest\022d\n\025subject_condition_set" +
    -      "\030\001 \001(\01320.policy.subjectmapping.SubjectCo" +
    -      "nditionSetCreateR\023subjectConditionSet\"\203\001" +
    -      "\n!CreateSubjectConditionSetResponse\022^\n\025s" +
    -      "ubject_condition_set\030\001 \001(\0132*.policy.subj" +
    -      "ectmapping.SubjectConditionSetR\023subjectC" +
    -      "onditionSet\"\276\001\n\031SubjectConditionSetUpdat" +
    -      "e\022B\n\020updated_metadata\030\002 \001(\0132\027.common.Met" +
    -      "adataMutableR\017updatedMetadata\022]\n\024updated" +
    -      "_subject_sets\030\003 \003(\0132!.policy.subjectmapp" +
    -      "ing.SubjectSetB\010\272H\005\222\001\002\010\001R\022updatedSubject" +
    -      "Sets\"\240\001\n UpdateSubjectConditionSetReques" +
    -      "t\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022d\n\025subject_con" +
    -      "dition_set\030\002 \001(\01320.policy.subjectmapping" +
    -      ".SubjectConditionSetUpdateR\023subjectCondi" +
    -      "tionSet\"\203\001\n!UpdateSubjectConditionSetRes" +
    -      "ponse\022^\n\025subject_condition_set\030\001 \001(\0132*.p" +
    -      "olicy.subjectmapping.SubjectConditionSet" +
    -      "R\023subjectConditionSet\":\n DeleteSubjectCo" +
    -      "nditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002i" +
    -      "d\"\203\001\n!DeleteSubjectConditionSetResponse\022" +
    -      "^\n\025subject_condition_set\030\001 \001(\0132*.policy." +
    -      "subjectmapping.SubjectConditionSetR\023subj" +
    -      "ectConditionSet*\233\001\n\032SubjectMappingOperat" +
    -      "orEnum\022-\n)SUBJECT_MAPPING_OPERATOR_ENUM_" +
    -      "UNSPECIFIED\020\000\022$\n SUBJECT_MAPPING_OPERATO" +
    -      "R_ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_" +
    -      "ENUM_NOT_IN\020\002*\220\001\n\030ConditionBooleanTypeEn" +
    -      "um\022+\n\'CONDITION_BOOLEAN_TYPE_ENUM_UNSPEC" +
    -      "IFIED\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_ENUM_A" +
    -      "ND\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_OR\020\002" +
    -      "2\244\017\n\025SubjectMappingService\022\251\001\n\024MatchSubj" +
    -      "ectMappings\0222.policy.subjectmapping.Matc" +
    -      "hSubjectMappingsRequest\0323.policy.subject" +
    -      "mapping.MatchSubjectMappingsResponse\"(\202\323" +
    -      "\344\223\002\"\"\027/subject-mappings/match:\007subject\022\227" +
    -      "\001\n\023ListSubjectMappings\0221.policy.subjectm" +
    -      "apping.ListSubjectMappingsRequest\0322.poli" +
    -      "cy.subjectmapping.ListSubjectMappingsRes" +
    -      "ponse\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021Get" +
    -      "SubjectMapping\022/.policy.subjectmapping.G" +
    -      "etSubjectMappingRequest\0320.policy.subject" +
    -      "mapping.GetSubjectMappingResponse\"\036\202\323\344\223\002" +
    -      "\030\022\026/subject-mappings/{id}\022\253\001\n\024CreateSubj" +
    -      "ectMapping\0222.policy.subjectmapping.Creat" +
    -      "eSubjectMappingRequest\0323.policy.subjectm" +
    -      "apping.CreateSubjectMappingResponse\"*\202\323\344" +
    -      "\223\002$\"\021/subject-mappings:\017subject_mapping\022" +
    -      "\260\001\n\024UpdateSubjectMapping\0222.policy.subjec" +
    -      "tmapping.UpdateSubjectMappingRequest\0323.p" +
    -      "olicy.subjectmapping.UpdateSubjectMappin" +
    -      "gResponse\"/\202\323\344\223\002)\"\026/subject-mappings/{id" +
    -      "}:\017subject_mapping\022\237\001\n\024DeleteSubjectMapp" +
    -      "ing\0222.policy.subjectmapping.DeleteSubjec" +
    -      "tMappingRequest\0323.policy.subjectmapping." +
    -      "DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030*\026/s" +
    -      "ubject-mappings/{id}\022\254\001\n\030ListSubjectCond" +
    -      "itionSets\0226.policy.subjectmapping.ListSu" +
    -      "bjectConditionSetsRequest\0327.policy.subje" +
    -      "ctmapping.ListSubjectConditionSetsRespon" +
    -      "se\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022\253\001\n\026" +
    -      "GetSubjectConditionSet\0224.policy.subjectm" +
    -      "apping.GetSubjectConditionSetRequest\0325.p" +
    -      "olicy.subjectmapping.GetSubjectCondition" +
    -      "SetResponse\"$\202\323\344\223\002\036\022\034/subject-condition-" +
    -      "sets/{id}\022\306\001\n\031CreateSubjectConditionSet\022" +
    -      "7.policy.subjectmapping.CreateSubjectCon" +
    -      "ditionSetRequest\0328.policy.subjectmapping" +
    -      ".CreateSubjectConditionSetResponse\"6\202\323\344\223" +
    -      "\0020\"\027/subject-condition-sets:\025subject_con" +
    -      "dition_set\022\313\001\n\031UpdateSubjectConditionSet" +
    -      "\0227.policy.subjectmapping.UpdateSubjectCo" +
    -      "nditionSetRequest\0328.policy.subjectmappin" +
    -      "g.UpdateSubjectConditionSetResponse\";\202\323\344" +
    -      "\223\00252\034/subject-condition-sets/{id}:\025subje" +
    -      "ct_condition_set\022\264\001\n\031DeleteSubjectCondit" +
    -      "ionSet\0227.policy.subjectmapping.DeleteSub" +
    -      "jectConditionSetRequest\0328.policy.subject" +
    -      "mapping.DeleteSubjectConditionSetRespons" +
    -      "e\"$\202\323\344\223\002\036*\034/subject-condition-sets/{id}B" +
    -      "\364\001\n)io.opentdf.platform.policy.subjectma" +
    -      "ppingB\023SubjectMappingProtoP\001Z=github.com" +
    -      "/opentdf/platform/protocol/go/policy/sub" +
    -      "jectmapping\242\002\003PSX\252\002\025Policy.Subjectmappin" +
    -      "g\312\002\025Policy\\Subjectmapping\342\002!Policy\\Subje" +
    -      "ctmapping\\GPBMetadata\352\002\026Policy::Subjectm" +
    -      "appingb\006proto3"
    +      "et*\233\001\n\032SubjectMappingOperatorEnum\022-\n)SUB" +
    +      "JECT_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\'CONDITI" +
    +      "ON_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022#\n\037CO" +
    +      "NDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036CONDI" +
    +      "TION_BOOLEAN_TYPE_ENUM_OR\020\0022\244\017\n\025SubjectM" +
    +      "appingService\022\251\001\n\024MatchSubjectMappings\0222" +
    +      ".policy.subjectmapping.MatchSubjectMappi" +
    +      "ngsRequest\0323.policy.subjectmapping.Match" +
    +      "SubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/subjec" +
    +      "t-mappings/match:\007subject\022\227\001\n\023ListSubjec" +
    +      "tMappings\0221.policy.subjectmapping.ListSu" +
    +      "bjectMappingsRequest\0322.policy.subjectmap" +
    +      "ping.ListSubjectMappingsResponse\"\031\202\323\344\223\002\023" +
    +      "\022\021/subject-mappings\022\226\001\n\021GetSubjectMappin" +
    +      "g\022/.policy.subjectmapping.GetSubjectMapp" +
    +      "ingRequest\0320.policy.subjectmapping.GetSu" +
    +      "bjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subject-m" +
    +      "appings/{id}\022\253\001\n\024CreateSubjectMapping\0222." +
    +      "policy.subjectmapping.CreateSubjectMappi" +
    +      "ngRequest\0323.policy.subjectmapping.Create" +
    +      "SubjectMappingResponse\"*\202\323\344\223\002$\"\021/subject" +
    +      "-mappings:\017subject_mapping\022\260\001\n\024UpdateSub" +
    +      "jectMapping\0222.policy.subjectmapping.Upda" +
    +      "teSubjectMappingRequest\0323.policy.subject" +
    +      "mapping.UpdateSubjectMappingResponse\"/\202\323" +
    +      "\344\223\002)\"\026/subject-mappings/{id}:\017subject_ma" +
    +      "pping\022\237\001\n\024DeleteSubjectMapping\0222.policy." +
    +      "subjectmapping.DeleteSubjectMappingReque" +
    +      "st\0323.policy.subjectmapping.DeleteSubject" +
    +      "MappingResponse\"\036\202\323\344\223\002\030*\026/subject-mappin" +
    +      "gs/{id}\022\254\001\n\030ListSubjectConditionSets\0226.p" +
    +      "olicy.subjectmapping.ListSubjectConditio" +
    +      "nSetsRequest\0327.policy.subjectmapping.Lis" +
    +      "tSubjectConditionSetsResponse\"\037\202\323\344\223\002\031\022\027/" +
    +      "subject-condition-sets\022\253\001\n\026GetSubjectCon" +
    +      "ditionSet\0224.policy.subjectmapping.GetSub" +
    +      "jectConditionSetRequest\0325.policy.subject" +
    +      "mapping.GetSubjectConditionSetResponse\"$" +
    +      "\202\323\344\223\002\036\022\034/subject-condition-sets/{id}\022\306\001\n" +
    +      "\031CreateSubjectConditionSet\0227.policy.subj" +
    +      "ectmapping.CreateSubjectConditionSetRequ" +
    +      "est\0328.policy.subjectmapping.CreateSubjec" +
    +      "tConditionSetResponse\"6\202\323\344\223\0020\"\027/subject-" +
    +      "condition-sets:\025subject_condition_set\022\313\001" +
    +      "\n\031UpdateSubjectConditionSet\0227.policy.sub" +
    +      "jectmapping.UpdateSubjectConditionSetReq" +
    +      "uest\0328.policy.subjectmapping.UpdateSubje" +
    +      "ctConditionSetResponse\";\202\323\344\223\00252\034/subject" +
    +      "-condition-sets/{id}:\025subject_condition_" +
    +      "set\022\264\001\n\031DeleteSubjectConditionSet\0227.poli" +
    +      "cy.subjectmapping.DeleteSubjectCondition" +
    +      "SetRequest\0328.policy.subjectmapping.Delet" +
    +      "eSubjectConditionSetResponse\"$\202\323\344\223\002\036*\034/s" +
    +      "ubject-condition-sets/{id}B\364\001\n)io.opentd" +
    +      "f.platform.policy.subjectmappingB\023Subjec" +
    +      "tMappingProtoP\001Z=github.com/opentdf/plat" +
    +      "form/protocol/go/policy/subjectmapping\242\002" +
    +      "\003PSX\252\002\025Policy.Subjectmapping\312\002\025Policy\\Su" +
    +      "bjectmapping\342\002!Policy\\Subjectmapping\\GPB" +
    +      "Metadata\352\002\026Policy::Subjectmappingb\006proto" +
    +      "3"
         };
         descriptor = com.google.protobuf.Descriptors.FileDescriptor
           .internalBuildGeneratedFileFrom(descriptorData,
    @@ -404,7 +405,7 @@ public static void registerAllExtensions(
         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", "SubjectConditionSets", "Actions", });
    +        new java.lang.String[] { "Id", "Metadata", "AttributeValue", "SubjectConditionSet", "Actions", });
         internal_static_policy_subjectmapping_Subject_descriptor =
           getDescriptor().getMessageTypes().get(5);
         internal_static_policy_subjectmapping_Subject_fieldAccessorTable = new
    @@ -452,7 +453,7 @@ public static void registerAllExtensions(
         internal_static_policy_subjectmapping_SubjectMappingCreate_fieldAccessorTable = new
           com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor,
    -        new java.lang.String[] { "Metadata", "AttributeValueId", "ExistingSubjectConditionSetIds", "NewSubjectConditionSets", "Actions", });
    +        new java.lang.String[] { "Metadata", "AttributeValueId", "ExistingSubjectConditionSetId", "NewSubjectConditionSet", "Actions", });
         internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor =
           getDescriptor().getMessageTypes().get(13);
         internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable = new
    @@ -470,7 +471,7 @@ public static void registerAllExtensions(
         internal_static_policy_subjectmapping_SubjectMappingUpdate_fieldAccessorTable = new
           com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor,
    -        new java.lang.String[] { "UpdatedMetadata", "UpdatedSubjectConditionSetIds", "UdpatedActions", });
    +        new java.lang.String[] { "UpdateMetadata", "UpdateSubjectConditionSetId", "UpdateActions", });
         internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor =
           getDescriptor().getMessageTypes().get(16);
         internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable = new
    @@ -542,7 +543,7 @@ public static void registerAllExtensions(
         internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable = new
           com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
             internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor,
    -        new java.lang.String[] { "UpdatedMetadata", "UpdatedSubjectSets", });
    +        new java.lang.String[] { "UpdatedName", "UpdatedMetadata", "UpdatedSubjectSets", });
         internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor =
           getDescriptor().getMessageTypes().get(28);
         internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new
    diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java
    index 2f80b3e51c..5eda1b27a9 100644
    --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java
    +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java
    @@ -17,9 +17,8 @@ private SubjectMappingUpdate(com.google.protobuf.GeneratedMessageV3.Builder b
         super(builder);
       }
       private SubjectMappingUpdate() {
    -    updatedSubjectConditionSetIds_ =
    -        com.google.protobuf.LazyStringArrayList.emptyList();
    -    udpatedActions_ = java.util.Collections.emptyList();
    +    updateSubjectConditionSetId_ = "";
    +    updateActions_ = java.util.Collections.emptyList();
       }
     
       @java.lang.Override
    @@ -43,144 +42,138 @@ protected java.lang.Object newInstance(
       }
     
       private int bitField0_;
    -  public static final int UPDATED_METADATA_FIELD_NUMBER = 2;
    -  private io.opentdf.platform.common.MetadataMutable updatedMetadata_;
    +  public static final int UPDATE_METADATA_FIELD_NUMBER = 2;
    +  private io.opentdf.platform.common.MetadataMutable updateMetadata_;
       /**
    -   * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"];
    -   * @return Whether the updatedMetadata field is set.
    +   * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"];
    +   * @return Whether the updateMetadata field is set.
        */
       @java.lang.Override
    -  public boolean hasUpdatedMetadata() {
    +  public boolean hasUpdateMetadata() {
         return ((bitField0_ & 0x00000001) != 0);
       }
       /**
    -   * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"];
    -   * @return The updatedMetadata.
    +   * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"];
    +   * @return The updateMetadata.
        */
       @java.lang.Override
    -  public io.opentdf.platform.common.MetadataMutable getUpdatedMetadata() {
    -    return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_;
    +  public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() {
    +    return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_;
       }
       /**
    -   * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"];
    +   * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"];
        */
       @java.lang.Override
    -  public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder() {
    -    return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_;
    +  public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() {
    +    return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_;
       }
     
    -  public static final int UPDATED_SUBJECT_CONDITION_SET_IDS_FIELD_NUMBER = 3;
    +  public static final int UPDATE_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3;
       @SuppressWarnings("serial")
    -  private com.google.protobuf.LazyStringArrayList updatedSubjectConditionSetIds_ =
    -      com.google.protobuf.LazyStringArrayList.emptyList();
    +  private volatile java.lang.Object updateSubjectConditionSetId_ = "";
       /**
        * 
    -   * Replaces entire list of existing SubjectConditionSet ids
    +   * Replaces the existing SubjectConditionSet id with a new one
        * 
    * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @return A list containing the updatedSubjectConditionSetIds. + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The updateSubjectConditionSetId. */ - public com.google.protobuf.ProtocolStringList - getUpdatedSubjectConditionSetIdsList() { - return updatedSubjectConditionSetIds_; - } - /** - *
    -   * Replaces entire list of existing SubjectConditionSet ids
    -   * 
    - * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @return The count of updatedSubjectConditionSetIds. - */ - public int getUpdatedSubjectConditionSetIdsCount() { - return updatedSubjectConditionSetIds_.size(); - } - /** - *
    -   * Replaces entire list of existing SubjectConditionSet ids
    -   * 
    - * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param index The index of the element to return. - * @return The updatedSubjectConditionSetIds at the given index. - */ - public java.lang.String getUpdatedSubjectConditionSetIds(int index) { - return updatedSubjectConditionSetIds_.get(index); + @java.lang.Override + public java.lang.String getUpdateSubjectConditionSetId() { + java.lang.Object ref = updateSubjectConditionSetId_; + 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(); + updateSubjectConditionSetId_ = s; + return s; + } } /** *
    -   * Replaces entire list of existing SubjectConditionSet ids
    +   * Replaces the existing SubjectConditionSet id with a new one
        * 
    * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param index The index of the value to return. - * @return The bytes of the updatedSubjectConditionSetIds at the given index. + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The bytes for updateSubjectConditionSetId. */ + @java.lang.Override public com.google.protobuf.ByteString - getUpdatedSubjectConditionSetIdsBytes(int index) { - return updatedSubjectConditionSetIds_.getByteString(index); + getUpdateSubjectConditionSetIdBytes() { + java.lang.Object ref = updateSubjectConditionSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } - public static final int UDPATED_ACTIONS_FIELD_NUMBER = 5; + public static final int UPDATE_ACTIONS_FIELD_NUMBER = 5; @SuppressWarnings("serial") - private java.util.List udpatedActions_; + private java.util.List updateActions_; /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ @java.lang.Override - public java.util.List getUdpatedActionsList() { - return udpatedActions_; + public java.util.List getUpdateActionsList() { + return updateActions_; } /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ @java.lang.Override public java.util.List - getUdpatedActionsOrBuilderList() { - return udpatedActions_; + getUpdateActionsOrBuilderList() { + return updateActions_; } /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ @java.lang.Override - public int getUdpatedActionsCount() { - return udpatedActions_.size(); + public int getUpdateActionsCount() { + return updateActions_.size(); } /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ @java.lang.Override - public io.opentdf.platform.authorization.Action getUdpatedActions(int index) { - return udpatedActions_.get(index); + public io.opentdf.platform.authorization.Action getUpdateActions(int index) { + return updateActions_.get(index); } /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ @java.lang.Override - public io.opentdf.platform.authorization.ActionOrBuilder getUdpatedActionsOrBuilder( + public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( int index) { - return udpatedActions_.get(index); + return updateActions_.get(index); } private byte memoizedIsInitialized = -1; @@ -198,13 +191,13 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getUpdatedMetadata()); + output.writeMessage(2, getUpdateMetadata()); } - for (int i = 0; i < updatedSubjectConditionSetIds_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, updatedSubjectConditionSetIds_.getRaw(i)); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateSubjectConditionSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, updateSubjectConditionSetId_); } - for (int i = 0; i < udpatedActions_.size(); i++) { - output.writeMessage(5, udpatedActions_.get(i)); + for (int i = 0; i < updateActions_.size(); i++) { + output.writeMessage(5, updateActions_.get(i)); } getUnknownFields().writeTo(output); } @@ -217,19 +210,14 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdatedMetadata()); + .computeMessageSize(2, getUpdateMetadata()); } - { - int dataSize = 0; - for (int i = 0; i < updatedSubjectConditionSetIds_.size(); i++) { - dataSize += computeStringSizeNoTag(updatedSubjectConditionSetIds_.getRaw(i)); - } - size += dataSize; - size += 1 * getUpdatedSubjectConditionSetIdsList().size(); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateSubjectConditionSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, updateSubjectConditionSetId_); } - for (int i = 0; i < udpatedActions_.size(); i++) { + for (int i = 0; i < updateActions_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, udpatedActions_.get(i)); + .computeMessageSize(5, updateActions_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -246,15 +234,15 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate other = (io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate) obj; - if (hasUpdatedMetadata() != other.hasUpdatedMetadata()) return false; - if (hasUpdatedMetadata()) { - if (!getUpdatedMetadata() - .equals(other.getUpdatedMetadata())) return false; - } - if (!getUpdatedSubjectConditionSetIdsList() - .equals(other.getUpdatedSubjectConditionSetIdsList())) return false; - if (!getUdpatedActionsList() - .equals(other.getUdpatedActionsList())) return false; + if (hasUpdateMetadata() != other.hasUpdateMetadata()) return false; + if (hasUpdateMetadata()) { + if (!getUpdateMetadata() + .equals(other.getUpdateMetadata())) return false; + } + if (!getUpdateSubjectConditionSetId() + .equals(other.getUpdateSubjectConditionSetId())) return false; + if (!getUpdateActionsList() + .equals(other.getUpdateActionsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -266,17 +254,15 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasUpdatedMetadata()) { - hash = (37 * hash) + UPDATED_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUpdatedMetadata().hashCode(); + if (hasUpdateMetadata()) { + hash = (37 * hash) + UPDATE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMetadata().hashCode(); } - if (getUpdatedSubjectConditionSetIdsCount() > 0) { - hash = (37 * hash) + UPDATED_SUBJECT_CONDITION_SET_IDS_FIELD_NUMBER; - hash = (53 * hash) + getUpdatedSubjectConditionSetIdsList().hashCode(); - } - if (getUdpatedActionsCount() > 0) { - hash = (37 * hash) + UDPATED_ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getUdpatedActionsList().hashCode(); + hash = (37 * hash) + UPDATE_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getUpdateSubjectConditionSetId().hashCode(); + if (getUpdateActionsCount() > 0) { + hash = (37 * hash) + UPDATE_ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getUpdateActionsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -408,26 +394,25 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getUpdatedMetadataFieldBuilder(); - getUdpatedActionsFieldBuilder(); + getUpdateMetadataFieldBuilder(); + getUpdateActionsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - updatedMetadata_ = null; - if (updatedMetadataBuilder_ != null) { - updatedMetadataBuilder_.dispose(); - updatedMetadataBuilder_ = null; + updateMetadata_ = null; + if (updateMetadataBuilder_ != null) { + updateMetadataBuilder_.dispose(); + updateMetadataBuilder_ = null; } - updatedSubjectConditionSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - if (udpatedActionsBuilder_ == null) { - udpatedActions_ = java.util.Collections.emptyList(); + updateSubjectConditionSetId_ = ""; + if (updateActionsBuilder_ == null) { + updateActions_ = java.util.Collections.emptyList(); } else { - udpatedActions_ = null; - udpatedActionsBuilder_.clear(); + updateActions_ = null; + updateActionsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; @@ -463,14 +448,14 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate buildParti } private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate result) { - if (udpatedActionsBuilder_ == null) { + if (updateActionsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { - udpatedActions_ = java.util.Collections.unmodifiableList(udpatedActions_); + updateActions_ = java.util.Collections.unmodifiableList(updateActions_); bitField0_ = (bitField0_ & ~0x00000004); } - result.udpatedActions_ = udpatedActions_; + result.updateActions_ = updateActions_; } else { - result.udpatedActions_ = udpatedActionsBuilder_.build(); + result.updateActions_ = updateActionsBuilder_.build(); } } @@ -478,14 +463,13 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMapp int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.updatedMetadata_ = updatedMetadataBuilder_ == null - ? updatedMetadata_ - : updatedMetadataBuilder_.build(); + result.updateMetadata_ = updateMetadataBuilder_ == null + ? updateMetadata_ + : updateMetadataBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000002) != 0)) { - updatedSubjectConditionSetIds_.makeImmutable(); - result.updatedSubjectConditionSetIds_ = updatedSubjectConditionSetIds_; + result.updateSubjectConditionSetId_ = updateSubjectConditionSetId_; } result.bitField0_ |= to_bitField0_; } @@ -534,42 +518,37 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate other) { if (other == io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance()) return this; - if (other.hasUpdatedMetadata()) { - mergeUpdatedMetadata(other.getUpdatedMetadata()); + if (other.hasUpdateMetadata()) { + mergeUpdateMetadata(other.getUpdateMetadata()); } - if (!other.updatedSubjectConditionSetIds_.isEmpty()) { - if (updatedSubjectConditionSetIds_.isEmpty()) { - updatedSubjectConditionSetIds_ = other.updatedSubjectConditionSetIds_; - bitField0_ |= 0x00000002; - } else { - ensureUpdatedSubjectConditionSetIdsIsMutable(); - updatedSubjectConditionSetIds_.addAll(other.updatedSubjectConditionSetIds_); - } + if (!other.getUpdateSubjectConditionSetId().isEmpty()) { + updateSubjectConditionSetId_ = other.updateSubjectConditionSetId_; + bitField0_ |= 0x00000002; onChanged(); } - if (udpatedActionsBuilder_ == null) { - if (!other.udpatedActions_.isEmpty()) { - if (udpatedActions_.isEmpty()) { - udpatedActions_ = other.udpatedActions_; + if (updateActionsBuilder_ == null) { + if (!other.updateActions_.isEmpty()) { + if (updateActions_.isEmpty()) { + updateActions_ = other.updateActions_; bitField0_ = (bitField0_ & ~0x00000004); } else { - ensureUdpatedActionsIsMutable(); - udpatedActions_.addAll(other.udpatedActions_); + ensureUpdateActionsIsMutable(); + updateActions_.addAll(other.updateActions_); } onChanged(); } } else { - if (!other.udpatedActions_.isEmpty()) { - if (udpatedActionsBuilder_.isEmpty()) { - udpatedActionsBuilder_.dispose(); - udpatedActionsBuilder_ = null; - udpatedActions_ = other.udpatedActions_; + if (!other.updateActions_.isEmpty()) { + if (updateActionsBuilder_.isEmpty()) { + updateActionsBuilder_.dispose(); + updateActionsBuilder_ = null; + updateActions_ = other.updateActions_; bitField0_ = (bitField0_ & ~0x00000004); - udpatedActionsBuilder_ = + updateActionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getUdpatedActionsFieldBuilder() : null; + getUpdateActionsFieldBuilder() : null; } else { - udpatedActionsBuilder_.addAllMessages(other.udpatedActions_); + updateActionsBuilder_.addAllMessages(other.updateActions_); } } } @@ -601,15 +580,14 @@ public Builder mergeFrom( break; case 18: { input.readMessage( - getUpdatedMetadataFieldBuilder().getBuilder(), + getUpdateMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 18 case 26: { - java.lang.String s = input.readStringRequireUtf8(); - ensureUpdatedSubjectConditionSetIdsIsMutable(); - updatedSubjectConditionSetIds_.add(s); + updateSubjectConditionSetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; break; } // case 26 case 42: { @@ -617,11 +595,11 @@ public Builder mergeFrom( input.readMessage( io.opentdf.platform.authorization.Action.parser(), extensionRegistry); - if (udpatedActionsBuilder_ == null) { - ensureUdpatedActionsIsMutable(); - udpatedActions_.add(m); + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.add(m); } else { - udpatedActionsBuilder_.addMessage(m); + updateActionsBuilder_.addMessage(m); } break; } // case 42 @@ -642,298 +620,243 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.common.MetadataMutable updatedMetadata_; + private io.opentdf.platform.common.MetadataMutable updateMetadata_; private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updatedMetadataBuilder_; + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updateMetadataBuilder_; /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return Whether the updatedMetadata field is set. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return Whether the updateMetadata field is set. */ - public boolean hasUpdatedMetadata() { + public boolean hasUpdateMetadata() { return ((bitField0_ & 0x00000001) != 0); } /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return The updatedMetadata. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return The updateMetadata. */ - public io.opentdf.platform.common.MetadataMutable getUpdatedMetadata() { - if (updatedMetadataBuilder_ == null) { - return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { + if (updateMetadataBuilder_ == null) { + return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } else { - return updatedMetadataBuilder_.getMessage(); + return updateMetadataBuilder_.getMessage(); } } /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public Builder setUpdatedMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updatedMetadataBuilder_ == null) { + public Builder setUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updateMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - updatedMetadata_ = value; + updateMetadata_ = value; } else { - updatedMetadataBuilder_.setMessage(value); + updateMetadataBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public Builder setUpdatedMetadata( + public Builder setUpdateMetadata( io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (updatedMetadataBuilder_ == null) { - updatedMetadata_ = builderForValue.build(); + if (updateMetadataBuilder_ == null) { + updateMetadata_ = builderForValue.build(); } else { - updatedMetadataBuilder_.setMessage(builderForValue.build()); + updateMetadataBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public Builder mergeUpdatedMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updatedMetadataBuilder_ == null) { + public Builder mergeUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updateMetadataBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && - updatedMetadata_ != null && - updatedMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getUpdatedMetadataBuilder().mergeFrom(value); + updateMetadata_ != null && + updateMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getUpdateMetadataBuilder().mergeFrom(value); } else { - updatedMetadata_ = value; + updateMetadata_ = value; } } else { - updatedMetadataBuilder_.mergeFrom(value); + updateMetadataBuilder_.mergeFrom(value); } - if (updatedMetadata_ != null) { + if (updateMetadata_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public Builder clearUpdatedMetadata() { + public Builder clearUpdateMetadata() { bitField0_ = (bitField0_ & ~0x00000001); - updatedMetadata_ = null; - if (updatedMetadataBuilder_ != null) { - updatedMetadataBuilder_.dispose(); - updatedMetadataBuilder_ = null; + updateMetadata_ = null; + if (updateMetadataBuilder_ != null) { + updateMetadataBuilder_.dispose(); + updateMetadataBuilder_ = null; } onChanged(); return this; } /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public io.opentdf.platform.common.MetadataMutable.Builder getUpdatedMetadataBuilder() { + public io.opentdf.platform.common.MetadataMutable.Builder getUpdateMetadataBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getUpdatedMetadataFieldBuilder().getBuilder(); + return getUpdateMetadataFieldBuilder().getBuilder(); } /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder() { - if (updatedMetadataBuilder_ != null) { - return updatedMetadataBuilder_.getMessageOrBuilder(); + public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { + if (updateMetadataBuilder_ != null) { + return updateMetadataBuilder_.getMessageOrBuilder(); } else { - return updatedMetadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; + return updateMetadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } } /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getUpdatedMetadataFieldBuilder() { - if (updatedMetadataBuilder_ == null) { - updatedMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + getUpdateMetadataFieldBuilder() { + if (updateMetadataBuilder_ == null) { + updateMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getUpdatedMetadata(), + getUpdateMetadata(), getParentForChildren(), isClean()); - updatedMetadata_ = null; + updateMetadata_ = null; } - return updatedMetadataBuilder_; + return updateMetadataBuilder_; } - private com.google.protobuf.LazyStringArrayList updatedSubjectConditionSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - private void ensureUpdatedSubjectConditionSetIdsIsMutable() { - if (!updatedSubjectConditionSetIds_.isModifiable()) { - updatedSubjectConditionSetIds_ = new com.google.protobuf.LazyStringArrayList(updatedSubjectConditionSetIds_); - } - bitField0_ |= 0x00000002; - } - /** - *
    -     * Replaces entire list of existing SubjectConditionSet ids
    -     * 
    - * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @return A list containing the updatedSubjectConditionSetIds. - */ - public com.google.protobuf.ProtocolStringList - getUpdatedSubjectConditionSetIdsList() { - updatedSubjectConditionSetIds_.makeImmutable(); - return updatedSubjectConditionSetIds_; - } - /** - *
    -     * Replaces entire list of existing SubjectConditionSet ids
    -     * 
    - * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @return The count of updatedSubjectConditionSetIds. - */ - public int getUpdatedSubjectConditionSetIdsCount() { - return updatedSubjectConditionSetIds_.size(); - } + private java.lang.Object updateSubjectConditionSetId_ = ""; /** *
    -     * Replaces entire list of existing SubjectConditionSet ids
    +     * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param index The index of the element to return. - * @return The updatedSubjectConditionSetIds at the given index. + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The updateSubjectConditionSetId. */ - public java.lang.String getUpdatedSubjectConditionSetIds(int index) { - return updatedSubjectConditionSetIds_.get(index); + public java.lang.String getUpdateSubjectConditionSetId() { + java.lang.Object ref = updateSubjectConditionSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateSubjectConditionSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** *
    -     * Replaces entire list of existing SubjectConditionSet ids
    +     * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param index The index of the value to return. - * @return The bytes of the updatedSubjectConditionSetIds at the given index. + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The bytes for updateSubjectConditionSetId. */ public com.google.protobuf.ByteString - getUpdatedSubjectConditionSetIdsBytes(int index) { - return updatedSubjectConditionSetIds_.getByteString(index); - } - /** - *
    -     * Replaces entire list of existing SubjectConditionSet ids
    -     * 
    - * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param index The index to set the value at. - * @param value The updatedSubjectConditionSetIds to set. - * @return This builder for chaining. - */ - public Builder setUpdatedSubjectConditionSetIds( - int index, java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - ensureUpdatedSubjectConditionSetIdsIsMutable(); - updatedSubjectConditionSetIds_.set(index, value); - bitField0_ |= 0x00000002; - onChanged(); - return this; + getUpdateSubjectConditionSetIdBytes() { + java.lang.Object ref = updateSubjectConditionSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** *
    -     * Replaces entire list of existing SubjectConditionSet ids
    +     * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param value The updatedSubjectConditionSetIds to add. + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @param value The updateSubjectConditionSetId to set. * @return This builder for chaining. */ - public Builder addUpdatedSubjectConditionSetIds( + public Builder setUpdateSubjectConditionSetId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureUpdatedSubjectConditionSetIdsIsMutable(); - updatedSubjectConditionSetIds_.add(value); - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
    -     * Replaces entire list of existing SubjectConditionSet ids
    -     * 
    - * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param values The updatedSubjectConditionSetIds to add. - * @return This builder for chaining. - */ - public Builder addAllUpdatedSubjectConditionSetIds( - java.lang.Iterable values) { - ensureUpdatedSubjectConditionSetIdsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, updatedSubjectConditionSetIds_); + updateSubjectConditionSetId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
    -     * Replaces entire list of existing SubjectConditionSet ids
    +     * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; * @return This builder for chaining. */ - public Builder clearUpdatedSubjectConditionSetIds() { - updatedSubjectConditionSetIds_ = - com.google.protobuf.LazyStringArrayList.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002);; + public Builder clearUpdateSubjectConditionSetId() { + updateSubjectConditionSetId_ = getDefaultInstance().getUpdateSubjectConditionSetId(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
    -     * Replaces entire list of existing SubjectConditionSet ids
    +     * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param value The bytes of the updatedSubjectConditionSetIds to add. + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @param value The bytes for updateSubjectConditionSetId to set. * @return This builder for chaining. */ - public Builder addUpdatedSubjectConditionSetIdsBytes( + public Builder setUpdateSubjectConditionSetIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - ensureUpdatedSubjectConditionSetIdsIsMutable(); - updatedSubjectConditionSetIds_.add(value); + updateSubjectConditionSetId_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } - private java.util.List udpatedActions_ = + private java.util.List updateActions_ = java.util.Collections.emptyList(); - private void ensureUdpatedActionsIsMutable() { + private void ensureUpdateActionsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { - udpatedActions_ = new java.util.ArrayList(udpatedActions_); + updateActions_ = new java.util.ArrayList(updateActions_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> udpatedActionsBuilder_; + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> updateActionsBuilder_; /** *
          * Replaces entire list of actions permitted by subjects
          * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public java.util.List getUdpatedActionsList() { - if (udpatedActionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(udpatedActions_); + public java.util.List getUpdateActionsList() { + if (updateActionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(updateActions_); } else { - return udpatedActionsBuilder_.getMessageList(); + return updateActionsBuilder_.getMessageList(); } } /** @@ -941,13 +864,13 @@ public java.util.List getUdpatedAction * Replaces entire list of actions permitted by subjects *
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public int getUdpatedActionsCount() { - if (udpatedActionsBuilder_ == null) { - return udpatedActions_.size(); + public int getUpdateActionsCount() { + if (updateActionsBuilder_ == null) { + return updateActions_.size(); } else { - return udpatedActionsBuilder_.getCount(); + return updateActionsBuilder_.getCount(); } } /** @@ -955,13 +878,13 @@ public int getUdpatedActionsCount() { * Replaces entire list of actions permitted by subjects *
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public io.opentdf.platform.authorization.Action getUdpatedActions(int index) { - if (udpatedActionsBuilder_ == null) { - return udpatedActions_.get(index); + public io.opentdf.platform.authorization.Action getUpdateActions(int index) { + if (updateActionsBuilder_ == null) { + return updateActions_.get(index); } else { - return udpatedActionsBuilder_.getMessage(index); + return updateActionsBuilder_.getMessage(index); } } /** @@ -969,19 +892,19 @@ public io.opentdf.platform.authorization.Action getUdpatedActions(int index) { * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public Builder setUdpatedActions( + public Builder setUpdateActions( int index, io.opentdf.platform.authorization.Action value) { - if (udpatedActionsBuilder_ == null) { + if (updateActionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUdpatedActionsIsMutable(); - udpatedActions_.set(index, value); + ensureUpdateActionsIsMutable(); + updateActions_.set(index, value); onChanged(); } else { - udpatedActionsBuilder_.setMessage(index, value); + updateActionsBuilder_.setMessage(index, value); } return this; } @@ -990,16 +913,16 @@ public Builder setUdpatedActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public Builder setUdpatedActions( + public Builder setUpdateActions( int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (udpatedActionsBuilder_ == null) { - ensureUdpatedActionsIsMutable(); - udpatedActions_.set(index, builderForValue.build()); + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.set(index, builderForValue.build()); onChanged(); } else { - udpatedActionsBuilder_.setMessage(index, builderForValue.build()); + updateActionsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -1008,18 +931,18 @@ public Builder setUdpatedActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public Builder addUdpatedActions(io.opentdf.platform.authorization.Action value) { - if (udpatedActionsBuilder_ == null) { + public Builder addUpdateActions(io.opentdf.platform.authorization.Action value) { + if (updateActionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUdpatedActionsIsMutable(); - udpatedActions_.add(value); + ensureUpdateActionsIsMutable(); + updateActions_.add(value); onChanged(); } else { - udpatedActionsBuilder_.addMessage(value); + updateActionsBuilder_.addMessage(value); } return this; } @@ -1028,19 +951,19 @@ public Builder addUdpatedActions(io.opentdf.platform.authorization.Action value) * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public Builder addUdpatedActions( + public Builder addUpdateActions( int index, io.opentdf.platform.authorization.Action value) { - if (udpatedActionsBuilder_ == null) { + if (updateActionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUdpatedActionsIsMutable(); - udpatedActions_.add(index, value); + ensureUpdateActionsIsMutable(); + updateActions_.add(index, value); onChanged(); } else { - udpatedActionsBuilder_.addMessage(index, value); + updateActionsBuilder_.addMessage(index, value); } return this; } @@ -1049,16 +972,16 @@ public Builder addUdpatedActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public Builder addUdpatedActions( + public Builder addUpdateActions( io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (udpatedActionsBuilder_ == null) { - ensureUdpatedActionsIsMutable(); - udpatedActions_.add(builderForValue.build()); + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.add(builderForValue.build()); onChanged(); } else { - udpatedActionsBuilder_.addMessage(builderForValue.build()); + updateActionsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -1067,16 +990,16 @@ public Builder addUdpatedActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public Builder addUdpatedActions( + public Builder addUpdateActions( int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (udpatedActionsBuilder_ == null) { - ensureUdpatedActionsIsMutable(); - udpatedActions_.add(index, builderForValue.build()); + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.add(index, builderForValue.build()); onChanged(); } else { - udpatedActionsBuilder_.addMessage(index, builderForValue.build()); + updateActionsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -1085,17 +1008,17 @@ public Builder addUdpatedActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public Builder addAllUdpatedActions( + public Builder addAllUpdateActions( java.lang.Iterable values) { - if (udpatedActionsBuilder_ == null) { - ensureUdpatedActionsIsMutable(); + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, udpatedActions_); + values, updateActions_); onChanged(); } else { - udpatedActionsBuilder_.addAllMessages(values); + updateActionsBuilder_.addAllMessages(values); } return this; } @@ -1104,15 +1027,15 @@ public Builder addAllUdpatedActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public Builder clearUdpatedActions() { - if (udpatedActionsBuilder_ == null) { - udpatedActions_ = java.util.Collections.emptyList(); + public Builder clearUpdateActions() { + if (updateActionsBuilder_ == null) { + updateActions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { - udpatedActionsBuilder_.clear(); + updateActionsBuilder_.clear(); } return this; } @@ -1121,15 +1044,15 @@ public Builder clearUdpatedActions() { * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public Builder removeUdpatedActions(int index) { - if (udpatedActionsBuilder_ == null) { - ensureUdpatedActionsIsMutable(); - udpatedActions_.remove(index); + public Builder removeUpdateActions(int index) { + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.remove(index); onChanged(); } else { - udpatedActionsBuilder_.remove(index); + updateActionsBuilder_.remove(index); } return this; } @@ -1138,24 +1061,24 @@ public Builder removeUdpatedActions(int index) { * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public io.opentdf.platform.authorization.Action.Builder getUdpatedActionsBuilder( + public io.opentdf.platform.authorization.Action.Builder getUpdateActionsBuilder( int index) { - return getUdpatedActionsFieldBuilder().getBuilder(index); + return getUpdateActionsFieldBuilder().getBuilder(index); } /** *
          * Replaces entire list of actions permitted by subjects
          * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public io.opentdf.platform.authorization.ActionOrBuilder getUdpatedActionsOrBuilder( + public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( int index) { - if (udpatedActionsBuilder_ == null) { - return udpatedActions_.get(index); } else { - return udpatedActionsBuilder_.getMessageOrBuilder(index); + if (updateActionsBuilder_ == null) { + return updateActions_.get(index); } else { + return updateActionsBuilder_.getMessageOrBuilder(index); } } /** @@ -1163,14 +1086,14 @@ public io.opentdf.platform.authorization.ActionOrBuilder getUdpatedActionsOrBuil * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ public java.util.List - getUdpatedActionsOrBuilderList() { - if (udpatedActionsBuilder_ != null) { - return udpatedActionsBuilder_.getMessageOrBuilderList(); + getUpdateActionsOrBuilderList() { + if (updateActionsBuilder_ != null) { + return updateActionsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(udpatedActions_); + return java.util.Collections.unmodifiableList(updateActions_); } } /** @@ -1178,10 +1101,10 @@ public io.opentdf.platform.authorization.ActionOrBuilder getUdpatedActionsOrBuil * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public io.opentdf.platform.authorization.Action.Builder addUdpatedActionsBuilder() { - return getUdpatedActionsFieldBuilder().addBuilder( + public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder() { + return getUpdateActionsFieldBuilder().addBuilder( io.opentdf.platform.authorization.Action.getDefaultInstance()); } /** @@ -1189,11 +1112,11 @@ public io.opentdf.platform.authorization.Action.Builder addUdpatedActionsBuilder * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - public io.opentdf.platform.authorization.Action.Builder addUdpatedActionsBuilder( + public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder( int index) { - return getUdpatedActionsFieldBuilder().addBuilder( + return getUpdateActionsFieldBuilder().addBuilder( index, io.opentdf.platform.authorization.Action.getDefaultInstance()); } /** @@ -1201,25 +1124,25 @@ public io.opentdf.platform.authorization.Action.Builder addUdpatedActionsBuilder * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ public java.util.List - getUdpatedActionsBuilderList() { - return getUdpatedActionsFieldBuilder().getBuilderList(); + getUpdateActionsBuilderList() { + return getUpdateActionsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> - getUdpatedActionsFieldBuilder() { - if (udpatedActionsBuilder_ == null) { - udpatedActionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + getUpdateActionsFieldBuilder() { + if (updateActionsBuilder_ == null) { + updateActionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( - udpatedActions_, + updateActions_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - udpatedActions_ = null; + updateActions_ = null; } - return udpatedActionsBuilder_; + return updateActionsBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java index febe22714e..7dddbc0155 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java @@ -9,102 +9,81 @@ public interface SubjectMappingUpdateOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return Whether the updatedMetadata field is set. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return Whether the updateMetadata field is set. */ - boolean hasUpdatedMetadata(); + boolean hasUpdateMetadata(); /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return The updatedMetadata. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return The updateMetadata. */ - io.opentdf.platform.common.MetadataMutable getUpdatedMetadata(); + io.opentdf.platform.common.MetadataMutable getUpdateMetadata(); /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder(); + io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder(); /** *
    -   * Replaces entire list of existing SubjectConditionSet ids
    +   * Replaces the existing SubjectConditionSet id with a new one
        * 
    * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @return A list containing the updatedSubjectConditionSetIds. + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The updateSubjectConditionSetId. */ - java.util.List - getUpdatedSubjectConditionSetIdsList(); + java.lang.String getUpdateSubjectConditionSetId(); /** *
    -   * Replaces entire list of existing SubjectConditionSet ids
    +   * Replaces the existing SubjectConditionSet id with a new one
        * 
    * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @return The count of updatedSubjectConditionSetIds. - */ - int getUpdatedSubjectConditionSetIdsCount(); - /** - *
    -   * Replaces entire list of existing SubjectConditionSet ids
    -   * 
    - * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param index The index of the element to return. - * @return The updatedSubjectConditionSetIds at the given index. - */ - java.lang.String getUpdatedSubjectConditionSetIds(int index); - /** - *
    -   * Replaces entire list of existing SubjectConditionSet ids
    -   * 
    - * - * repeated string updated_subject_condition_set_ids = 3 [json_name = "updatedSubjectConditionSetIds"]; - * @param index The index of the value to return. - * @return The bytes of the updatedSubjectConditionSetIds at the given index. + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The bytes for updateSubjectConditionSetId. */ com.google.protobuf.ByteString - getUpdatedSubjectConditionSetIdsBytes(int index); + getUpdateSubjectConditionSetIdBytes(); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ java.util.List - getUdpatedActionsList(); + getUpdateActionsList(); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - io.opentdf.platform.authorization.Action getUdpatedActions(int index); + io.opentdf.platform.authorization.Action getUpdateActions(int index); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - int getUdpatedActionsCount(); + int getUpdateActionsCount(); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ java.util.List - getUdpatedActionsOrBuilderList(); + getUpdateActionsOrBuilderList(); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action udpated_actions = 5 [json_name = "udpatedActions"]; + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; */ - io.opentdf.platform.authorization.ActionOrBuilder getUdpatedActionsOrBuilder( + io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( int index); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java index 2450db3e20..58e18d3d78 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java @@ -5,6 +5,11 @@ package io.opentdf.platform.policy.subjectmapping; /** + *
    + * `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}`
    + * '{"subject_mapping":{//everything}}'
    + * 
    + * * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingResponse} */ public final class UpdateSubjectMappingResponse extends @@ -229,6 +234,11 @@ protected Builder newBuilderForType( return builder; } /** + *
    +   * `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}`
    +   * '{"subject_mapping":{//everything}}'
    +   * 
    + * * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingResponse} */ public static final class Builder extends diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 94aecdb056..f4733bdc52 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -2,7 +2,9 @@ package db import ( "context" - "strings" + "encoding/json" + "errors" + "fmt" "github.com/opentdf/platform/protocol/go/authorization" @@ -15,52 +17,164 @@ import ( "google.golang.org/protobuf/encoding/protojson" ) -var SubjectMappingOperatorEnumPrefix = "SUBJECT_MAPPING_OPERATOR_ENUM_" +func MarshalSubjectSetsIntoCondition(subjectSet []*subjectmapping.SubjectSet) ([]byte, error) { + var raw []json.RawMessage + for _, ss := range subjectSet { + b, err := protojson.Marshal(ss) + if err != nil { + return nil, err + } + raw = append(raw, b) + } + return json.Marshal(raw) +} + +func UnmarshalSubjectSetsFromCondition(condition []byte) ([]*subjectmapping.SubjectSet, error) { + var raw []json.RawMessage + if err := json.Unmarshal(condition, &raw); err != nil { + return nil, err + } + + var subjectSets []*subjectmapping.SubjectSet + for _, r := range raw { + var ss subjectmapping.SubjectSet + if err := protojson.Unmarshal(r, &ss); err != nil { + return nil, err + } + subjectSets = append(subjectSets, &ss) + } + return subjectSets, nil +} + +func MarshalActionsProto(actions []*authorization.Action) ([]byte, error) { + var raw []json.RawMessage + for _, a := range actions { + b, err := protojson.Marshal(a) + if err != nil { + return nil, err + } + raw = append(raw, b) + } + return json.Marshal(raw) +} + +func UnmarshalActionsProto(actions []byte) ([]*authorization.Action, error) { + var raw []json.RawMessage + if err := json.Unmarshal(actions, &raw); err != nil { + return nil, err + } + + var actionsProto []*authorization.Action + for _, r := range raw { + var a authorization.Action + if err := protojson.Unmarshal(r, &a); err != nil { + return nil, err + } + actionsProto = append(actionsProto, &a) + } + return actionsProto, nil +} -func subjectMappingOperatorEnumTransformIn(value string) string { - return strings.TrimPrefix(value, SubjectMappingOperatorEnumPrefix) +func subjectConditionSetSelect() sq.SelectBuilder { + t := db.Tables.SubjectConditionSet + return db.NewStatementBuilder().Select( + t.Field("id"), + t.Field("name"), + t.Field("metadata"), + t.Field("condition"), + ) } -func subjectMappingOperatorEnumTransformOut(value string) subjectmapping.SubjectMappingOperatorEnum { - return subjectmapping.SubjectMappingOperatorEnum(subjectmapping.SubjectMappingOperatorEnum_value[SubjectMappingOperatorEnumPrefix+value]) +func subjectConditionSetHydrateItem(row pgx.Row) (*subjectmapping.SubjectConditionSet, error) { + var ( + id string + name string + metadata []byte + condition []byte + ) + + err := row.Scan( + &id, + &name, + &metadata, + &condition, + ) + if err != nil { + return nil, db.WrapIfKnownInvalidQueryErr(err) + } + + // TODO: do we actually need this check here? Add an integration test for it. + if condition == nil { + return nil, errors.Join(db.ErrNotNullViolation, fmt.Errorf("condition not found for subject condition set %s", id)) + } + m := &common.Metadata{} + if metadata != nil { + if err := protojson.Unmarshal(metadata, m); err != nil { + return nil, err + } + } + + ss, err := UnmarshalSubjectSetsFromCondition(condition) + if err != nil { + return nil, err + } + + return &subjectmapping.SubjectConditionSet{ + Id: id, + Name: name, + SubjectSets: ss, + Metadata: m, + }, nil +} + +func subjectConditionSetHydrateList(rows pgx.Rows) ([]*subjectmapping.SubjectConditionSet, error) { + list := make([]*subjectmapping.SubjectConditionSet, 0) + for rows.Next() { + s, err := subjectConditionSetHydrateItem(rows) + if err != nil { + return nil, err + } + list = append(list, s) + } + return list, nil } func subjectMappingSelect() sq.SelectBuilder { t := db.Tables.SubjectMappings aT := db.Tables.AttributeValues + ssT := db.Tables.SubjectConditionSet + return db.NewStatementBuilder().Select( t.Field("id"), - t.Field("operator"), - t.Field("subject_attribute"), - t.Field("subject_attribute_values"), + t.Field("actions"), t.Field("metadata"), + ssT.Field("condition"), "JSON_BUILD_OBJECT("+ "'id', "+aT.Field("id")+", "+ - "'value', "+aT.Field("value")+","+ + "'value', "+aT.Field("value")+", "+ "'members', "+aT.Field("members")+ ") AS attribute_value", ). - LeftJoin(aT.Name() + " ON " + t.Field("id") + " = " + t.Field("id")). + LeftJoin(aT.Name() + " ON " + t.Field("attribute_value_id") + " = " + aT.Field("id")). + LeftJoin(ssT.Name() + " ON " + ssT.Field("id") + " = " + t.Field("subject_condition_set_id")). GroupBy(t.Field("id")). GroupBy(aT.Field("id")) } func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, error) { var ( - id string - operator string - subjectAttribute string - subjectAttributeValues []string - metadataJson []byte - attributeValueJson []byte + id string + actions []byte + metadataJson []byte + smConditionSetsJson []byte + attributeValueJson []byte ) err := row.Scan( &id, - &operator, - &subjectAttribute, - &subjectAttributeValues, + &actions, &metadataJson, + &smConditionSetsJson, &attributeValueJson, ) if err != nil { @@ -81,20 +195,26 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err } } + a, err := UnmarshalActionsProto(actions) + if err != nil { + return nil, err + } + s := &subjectmapping.SubjectMapping{ Id: id, Metadata: m, AttributeValue: v, - SubjectSets: make([]*subjectmapping.SubjectSet, 0), - Actions: make([]*authorization.Action, 0), + // FIXME + SubjectConditionSet: &subjectmapping.SubjectConditionSet{}, + Actions: a, } // FIXME // add operator s.Actions = append(s.Actions, &authorization.Action{}) // add subjectAttributeValues - s.SubjectSets = append(s.SubjectSets, &subjectmapping.SubjectSet{ - ConditionGroups: make([]*subjectmapping.ConditionGroup, 0), - }) + // s.SubjectSets = append(s.SubjectSets, &subjectmapping.SubjectSet{ + // ConditionGroups: make([]*subjectmapping.ConditionGroup, 0), + // }) return s, nil } @@ -111,44 +231,278 @@ func subjectMappingHydrateList(rows pgx.Rows) ([]*subjectmapping.SubjectMapping, return list, nil } -/// -/// SubjectMapping CRUD -/// +func createSubjectConditionSetSql(subSets []*subjectmapping.SubjectSet, metadataJSON []byte, name string) (string, []interface{}, error) { + t := db.Tables.SubjectConditionSet + conditionJSON, err := MarshalSubjectSetsIntoCondition(subSets) + if err != nil { + return "", nil, err + } + + columns := []string{"condition", "metadata"} + values := []interface{}{conditionJSON, metadataJSON} + if name != "" { + columns = append(columns, "name") + values = append(values, name) + } + return db.NewStatementBuilder(). + Insert(t.Name()). + Columns(columns...). + Values(values...). + Suffix("RETURNING \"id\""). + ToSql() +} + +func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjectmapping.SubjectConditionSetCreate) (*subjectmapping.SubjectConditionSet, error) { + metadataJSON, m, err := db.MarshalCreateMetadata(s.Metadata) + new := &subjectmapping.SubjectConditionSet{ + Name: s.Name, + SubjectSets: s.SubjectSets, + Metadata: m, + } + + sql, args, err := createSubjectConditionSetSql(s.SubjectSets, metadataJSON, s.Name) + if err != nil { + return nil, err + } + + var id string + r, err := c.QueryRow(ctx, sql, args, err) + if err != nil { + return nil, err + } + if err = r.Scan(&id); err != nil { + return nil, db.WrapIfKnownInvalidQueryErr(err) + } + new.Id = id + return new, nil +} + +func getSubjectConditionSetSql(id string, name string) (string, []interface{}, error) { + t := db.Tables.SubjectConditionSet + sb := subjectConditionSetSelect(). + From(t.Name()) + + if id != "" { + sb = sb.Where(sq.Eq{t.Field("id"): id}) + } + if name != "" { + sb = sb.Where(sq.Eq{t.Field("name"): name}) + } + return sb. + ToSql() +} + +func (c PolicyDbClient) GetSubjectConditionSet(ctx context.Context, id string, name string) (*subjectmapping.SubjectConditionSet, error) { + sql, args, err := getSubjectConditionSetSql(id, name) + if err != nil { + return nil, err + } + + row, err := c.QueryRow(ctx, sql, args, err) + if err != nil { + return nil, err + } + + return subjectConditionSetHydrateItem(row) +} + +func listSubjectConditionSetsSql() (string, []interface{}, error) { + t := db.Tables.SubjectConditionSet + return subjectConditionSetSelect(). + From(t.Name()). + ToSql() +} + +func (c PolicyDbClient) ListSubjectConditionSets(ctx context.Context) ([]*subjectmapping.SubjectConditionSet, error) { + sql, args, err := listSubjectConditionSetsSql() + if err != nil { + return nil, err + } + + rows, err := c.Query(ctx, sql, args, err) + if err != nil { + return nil, err + } + + return subjectConditionSetHydrateList(rows) +} + +func updateSubjectConditionSetSql(id string, name string, metadata []byte, condition []byte) (string, []interface{}, error) { + t := db.Tables.SubjectConditionSet + + sb := db.NewStatementBuilder(). + Update(t.Name()) + + if name != "" { + sb = sb.Set("name", name) + } + + if metadata != nil { + sb = sb.Set("metadata", metadata) + } + + if condition != nil { + sb = sb.Set("condition", condition) + } + return sb. + Where(sq.Eq{"id": id}). + ToSql() +} + +func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string, s *subjectmapping.SubjectConditionSetUpdate) (*subjectmapping.SubjectConditionSet, error) { + var ( + prev *subjectmapping.SubjectConditionSet + err error + metadataJSON []byte + subjectSets []*subjectmapping.SubjectSet + condition []byte + ) + + prev, err = c.GetSubjectConditionSet(ctx, id, "") + if err != nil { + return nil, err + } + + metadataJSON, m, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdatedMetadata) -func createSubjectMappingSql(attribute_value_id string, operator string, subject_attribute string, subject_attribute_values []string, metadata []byte) (string, []interface{}, error) { + if s.UpdatedSubjectSets != nil { + subjectSets = s.UpdatedSubjectSets + condition, err = MarshalSubjectSetsIntoCondition(subjectSets) + if err != nil { + return nil, err + } + } + + sql, args, err := updateSubjectConditionSetSql( + id, + s.UpdatedName, + metadataJSON, + condition, + ) + if err != nil { + return nil, err + } + + if err := c.Exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return &subjectmapping.SubjectConditionSet{ + Id: id, + Name: s.UpdatedName, + SubjectSets: subjectSets, + Metadata: m, + }, nil +} + +func deleteSubjectConditionSetSql(id string) (string, []interface{}, error) { + t := db.Tables.SubjectConditionSet + return db.NewStatementBuilder(). + Delete(t.Name()). + Where(sq.Eq{"id": id}). + ToSql() +} + +func (c PolicyDbClient) DeleteSubjectConditionSet(ctx context.Context, id string) (*subjectmapping.SubjectConditionSet, error) { + prev, err := c.GetSubjectConditionSet(ctx, id, "") + if err != nil { + return nil, err + } + + sql, args, err := deleteSubjectConditionSetSql(id) + if err != nil { + return nil, err + } + + if err := c.Exec(ctx, sql, args, err); err != nil { + return nil, err + } + + return prev, nil +} + +// func insertSubjectMappingToConditionSetPivotsSql(smId string, scsIds []string) string { +// t := db.Tables.SubjectMappingConditionSetPivot +// sql := "INSERT INTO " + t.Name() + " (" + t.Field("subject_mapping_id") + ", " + t.Field("subject_condition_set_id") + ") " + +// "VALUES " +// for _, scsId := range scsIds { +// sql += "('" + smId + "', '" + scsId + "')" +// } +// return sql + "RETURNING \"id\", " + t.Field("subject_condition_set_id") + ", " + t.Field("subject_mapping_id") +// } + +// func createSubjectMappingToConditionSetPivotsSql(smId string, scsIds []string) string { +// subQuery := insertSubjectMappingToConditionSetPivotsSql(smId, scsIds) +// t := db.Tables.SubjectMappingConditionSetPivot +// // build the WITH clause evaluation in a string as squirrel doesn't seem to support CTEs +// return `BEGIN; +// WITH new_pivots AS ( +// ` + subQuery + ` +// ) +// UPDATE ` + t.Name() + ` +// SET ` + t.Field("subject_mapping_condition_set_pivot_ids") + `= ( +// SELECT ARRAY_AGG(new_pivots.id) +// FROM new_pivots +// ) +// WHERE ` + t.Field("subject_mapping_id") + ` = '` + smId + `' +// RETURNING ` + t.Field("subject_mapping_condition_set_pivot_ids") + `; +// COMMIT; +// ` +// } + +// func (c PolicyDbClient) CreatePivotSubjectMappingToConditionSets(ctx context.Context, smId string, scsIds []string) ([]string, error) { +// sql := insertSubjectMappingToConditionSetPivotsSql(smId, scsIds) + +// row, err := c.QueryRow(ctx, sql, nil, nil) +// if err != nil { +// return nil, err +// } + +// var pivotIds []string +// if err = row.Scan(&pivotIds); err != nil { +// return nil, err +// } +// return pivotIds, nil +// } + +// Creates a subject mapping with an empty set of subject_condition_set_pivot_ids because a pivot cannot exist without an existing subject mapping. +func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata []byte) (string, []interface{}, error) { t := db.Tables.SubjectMappings + + columns := []string{ + "attribute_value_id", + "actions", + "metadata", + } + values := []interface{}{ + attribute_value_id, + actions, + metadata, + } + return db.NewStatementBuilder(). Insert(t.Name()). - Columns( - "attribute_value_id", - "operator", - "subject_attribute", - "subject_attribute_values", - "metadata", - ). - Values( - attribute_value_id, - operator, - subject_attribute, - subject_attribute_values, - metadata, - ). + Columns(columns...). + Values(values...). Suffix("RETURNING \"id\""). ToSql() } -func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.SubjectMappingCreateUpdate) (*subjectmapping.SubjectMapping, error) { - metadataJson, metadata, err := db.MarshalCreateMetadata(s.Metadata) +func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.SubjectMappingCreate) (*subjectmapping.SubjectMapping, error) { + metadataJSON, metadata, err := db.MarshalCreateMetadata(s.Metadata) if err != nil { return nil, err } - // FIXME + actionsJSON, err := MarshalActionsProto(s.Actions) + if err != nil { + return nil, err + } + + // Create the subject mapping sql, args, err := createSubjectMappingSql( s.AttributeValueId, - "subjectMappingOperatorEnumTransformIn(s.Operator.String())", - "s.SubjectAttribute", - []string{"s.SubjectValues"}, - metadataJson, + actionsJSON, + metadataJSON, ) var id string @@ -158,14 +512,32 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp return nil, db.WrapIfKnownInvalidQueryErr(err) } - // a, err := c.GetAttributeValue(ctx, s.AttributeValueId) + var scs *subjectmapping.SubjectConditionSet + // Prefer existing id over new creation per documented proto behavior. + if s.ExistingSubjectConditionSetId != "" { + // get the existing subject condition set + scs, err = c.GetSubjectConditionSet(ctx, s.ExistingSubjectConditionSetId, "") + if err != nil { + return nil, err + } + } else if s.NewSubjectConditionSet != nil { + // create the new subject condition sets + scs, err = c.CreateSubjectConditionSet(ctx, s.NewSubjectConditionSet) + if err != nil { + return nil, err + } + } else { + return nil, fmt.Errorf("no subject condition set provided") + } + + a, err := c.GetAttributeValue(ctx, s.AttributeValueId) rS := &subjectmapping.SubjectMapping{ - Id: id, - Metadata: metadata, - AttributeValue: nil, - SubjectSets: nil, - Actions: nil, + Id: id, + Metadata: metadata, + AttributeValue: a, + SubjectConditionSet: scs, + Actions: s.Actions, } return rS, nil } @@ -221,25 +593,21 @@ func (c PolicyDbClient) ListSubjectMappings(ctx context.Context) ([]*subjectmapp return subjectMappings, nil } -func updateSubjectMappingSql(id string, attribute_value_id string, operator string, subject_attribute string, subject_attribute_values []string, metadata []byte) (string, []interface{}, error) { +func updateSubjectMappingSql(id string, metadata []byte, subject_condition_set_id string, actions []byte) (string, []interface{}, error) { t := db.Tables.SubjectMappings sb := db.NewStatementBuilder(). Update(t.Name()) - if attribute_value_id != "" { - sb.Set("attribute_value_id", attribute_value_id) - } - if operator != "" { - sb.Set("operator", operator) - } - if subject_attribute != "" { - sb.Set("subject_attribute", subject_attribute) + if metadata != nil { + sb = sb.Set("metadata", metadata) } - if subject_attribute_values != nil { - sb.Set("subject_attribute_values", subject_attribute_values) + + if subject_condition_set_id != "" { + sb = sb.Set("subject_condition_set_id", subject_condition_set_id) } - if metadata != nil { - sb.Set("metadata", metadata) + + if actions != nil { + sb = sb.Set("actions", actions) } return sb. @@ -247,24 +615,31 @@ func updateSubjectMappingSql(id string, attribute_value_id string, operator stri ToSql() } -func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, id string, s *subjectmapping.SubjectMappingCreateUpdate) (*subjectmapping.SubjectMapping, error) { +func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, id string, s *subjectmapping.SubjectMappingUpdate) (*subjectmapping.SubjectMapping, error) { prev, err := c.GetSubjectMapping(ctx, id) if err != nil { return nil, err } - metadataJson, _, err := db.MarshalUpdateMetadata(prev.Metadata, s.Metadata) + metadataJson, m, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdateMetadata) if err != nil { return nil, err } + prev.Metadata = m + + var actionsJSON []byte + if s.UpdateActions != nil { + actionsJSON, err = MarshalActionsProto(s.UpdateActions) + if err != nil { + return nil, err + } + } sql, args, err := updateSubjectMappingSql( id, - s.AttributeValueId, - "subjectMappingOperatorEnumTransformIn(s.Operator.String())", - "s.SubjectAttribute", - []string{"s.SubjectValues"}, metadataJson, + s.UpdateSubjectConditionSetId, + actionsJSON, ) if err != nil { return nil, err diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 21e94033b5..84f0ae53b6 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -158,8 +158,8 @@ message SubjectMapping { // the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" policy.attributes.Value attribute_value = 3; - // the reusable SubjectConditionSets mapped to the given Attribute Value - repeated SubjectConditionSet subject_condition_sets = 4; + // the reusable SubjectConditionSet mapped to the given Attribute Value + SubjectConditionSet subject_condition_set = 4; // The actions permitted by subjects in this mapping repeated authorization.Action actions = 5; @@ -201,11 +201,11 @@ message SubjectMappingCreate{ // Attribute Value to be mapped to string attribute_value_id = 2; - // Reuse existing SubjectConditionSets (NOTE: prioritized over new_subject_condition_sets) - repeated string existing_subject_condition_set_ids = 3; + // Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set) + string existing_subject_condition_set_id = 3; - // Create new SubjectConditionSets (NOTE: ignored if existing_subject_condition_set_ids is provided) - repeated SubjectConditionSet new_subject_condition_sets = 4; + // Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided) + SubjectConditionSetCreate new_subject_condition_set = 4; // The actions permitted by subjects in this mapping repeated authorization.Action actions = 5; @@ -218,18 +218,20 @@ message CreateSubjectMappingResponse { } message SubjectMappingUpdate { - common.MetadataMutable updated_metadata = 2; + common.MetadataMutable update_metadata = 2; - // Replaces entire list of existing SubjectConditionSet ids - repeated string updated_subject_condition_set_ids = 3; + // Replaces the existing SubjectConditionSet id with a new one + string update_subject_condition_set_id = 3; // Replaces entire list of actions permitted by subjects - repeated authorization.Action udpated_actions = 5; + repeated authorization.Action update_actions = 5; } message UpdateSubjectMappingRequest { string id = 1 [(buf.validate.field).required = true]; SubjectMappingUpdate subject_mapping = 2; } +// `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}` +// '{"subject_mapping":{//everything}}' message UpdateSubjectMappingResponse { SubjectMapping subject_mapping = 1; } @@ -276,6 +278,9 @@ message CreateSubjectConditionSetResponse { } message SubjectConditionSetUpdate { + // an optional name for ease of reference + string updated_name = 1; + common.MetadataMutable updated_metadata = 2; // Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions From d546c4d697efa0175fa4fbe9324e34e1d07bbeac Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 4 Mar 2024 17:47:52 -0500 Subject: [PATCH 05/39] cleanup and diagram notes update --- ...240304000000_add_subject_condition_sets.md | 16 ++- services/policy/db/subject_mappings.go | 114 +++++++----------- 2 files changed, 49 insertions(+), 81 deletions(-) diff --git a/migrations/20240304000000_add_subject_condition_sets.md b/migrations/20240304000000_add_subject_condition_sets.md index a7e659ae73..4d8fbe0766 100644 --- a/migrations/20240304000000_add_subject_condition_sets.md +++ b/migrations/20240304000000_add_subject_condition_sets.md @@ -5,24 +5,25 @@ This schema reflects the addition of `SubjectConditionSets`, which map external fields and values, like those provided in the context received about a subject/user from an Identity Provider (idP) to an `Attribute Value` by way of a `SubjectMapping`. An `Attribute Value` will relate to one or more `SubjectMapping`s with an -`AND` relationship, and a `SubjectMapping` will have one or more `SubjectConditionSets` with an `AND` relationship. +`AND` relationship, and each `SubjectMapping` will relate to one `SubjectConditionSet` to contextualize the +Attribute so each `Attribute Value -> 1+ SubjectConditionSets` considered `AND`ed together. If an `OR` boolean relationship is needed, the policy administrator is recommended to utilize the `ANY_OF` `Attribute Definition` `rule` and multiple `Attribute Values` with their own individual `SubjectMappings`. It is known that this relation of external idP-derived Subject context to ABAC attributes is a complex undertaking, and 3rd party FOSS/SaaS tools exist purely for this purpose. Because of this, the platform -currently supports the relation of `SubjectMapping`s -> `SubjectSet`s -> `ConditionGroup`s (`AND/OR`) -> `Condition`s +currently supports the relation of `SubjectMapping` -> `SubjectSet(s)` -> `ConditionGroup(s)` (`AND/OR`) -> `Condition(s)` (`IN / NOT IN`) with limited boolean logic. As there is a high likelihood of a need to integrate this relation with 3rd party tooling in the future, these internal tree structures will be stored in a `SubjectConditionSet` table as JSONB marshaled from the protos. That will allow reuse of the entire structure across multiple -`Attribute Value`s via `SubjectMapping`s, but will enable flexibility to grammar and relation changes in the +`Attribute Values` via multiple `SubjectMappings`, but will enable flexibility to grammar and relation changes in the future, essentially treating this structure as a v1. As a policy administrator, I will be able to define a `SubjectMapping` on a specific `Attribute Value` (utilizing our proto Messages/fields for `SubjectSet`s, `ConditionGroup`s, and `Condition`s) to permit the actions `TRANSMIT` and `DECRYPT` to one or more `SubjectSets`, where each `SubjectSet` comprises -one or more `ConditionGroup`s, and each `ConditionGroup` joins with a boolean operator `AND` or `OR` one -or more `Condition`s. The `Condition`s are where Subject context fields and values (i.e. a `username` +one or more `ConditionGroups`, and each `ConditionGroup` joins with a boolean operator `AND` or `OR` one +or more `Conditions`. Each `Condition` is where Subject context fields and values (i.e. a `username` of `alice@example.org`) contained in an external source (most likely an idP or LDAP) actually drive a mapping all the way back up the tree to an internal Platform-ABAC `Attribute Value`. @@ -38,10 +39,7 @@ all the way back up the tree to an internal Platform-ABAC `Attribute Value`. in a SubjectSet, or multiple SubjectSets in a SubjectMapping, that can be accomplished with multiple AttributeValues and an AttributeDefinition rule of ANY_OF associating them together. -### Note: Policy Config - - Due to the many-to-many relation between SubjectMappings and SubjectConditionSets, a pivot table will be - utilized and is abbreviated in the ERD. +# ERD ```mermaid --- diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index f4733bdc52..f88fbc9f26 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -254,6 +254,9 @@ func createSubjectConditionSetSql(subSets []*subjectmapping.SubjectSet, metadata func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjectmapping.SubjectConditionSetCreate) (*subjectmapping.SubjectConditionSet, error) { metadataJSON, m, err := db.MarshalCreateMetadata(s.Metadata) + if err != nil { + return nil, err + } new := &subjectmapping.SubjectConditionSet{ Name: s.Name, SubjectSets: s.SubjectSets, @@ -363,7 +366,10 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string return nil, err } - metadataJSON, m, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdatedMetadata) + metadataJSON, metadata, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdatedMetadata) + if err != nil { + return nil, err + } if s.UpdatedSubjectSets != nil { subjectSets = s.UpdatedSubjectSets @@ -379,9 +385,6 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string metadataJSON, condition, ) - if err != nil { - return nil, err - } if err := c.Exec(ctx, sql, args, err); err != nil { return nil, err @@ -391,7 +394,7 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string Id: id, Name: s.UpdatedName, SubjectSets: subjectSets, - Metadata: m, + Metadata: metadata, }, nil } @@ -421,63 +424,20 @@ func (c PolicyDbClient) DeleteSubjectConditionSet(ctx context.Context, id string return prev, nil } -// func insertSubjectMappingToConditionSetPivotsSql(smId string, scsIds []string) string { -// t := db.Tables.SubjectMappingConditionSetPivot -// sql := "INSERT INTO " + t.Name() + " (" + t.Field("subject_mapping_id") + ", " + t.Field("subject_condition_set_id") + ") " + -// "VALUES " -// for _, scsId := range scsIds { -// sql += "('" + smId + "', '" + scsId + "')" -// } -// return sql + "RETURNING \"id\", " + t.Field("subject_condition_set_id") + ", " + t.Field("subject_mapping_id") -// } - -// func createSubjectMappingToConditionSetPivotsSql(smId string, scsIds []string) string { -// subQuery := insertSubjectMappingToConditionSetPivotsSql(smId, scsIds) -// t := db.Tables.SubjectMappingConditionSetPivot -// // build the WITH clause evaluation in a string as squirrel doesn't seem to support CTEs -// return `BEGIN; -// WITH new_pivots AS ( -// ` + subQuery + ` -// ) -// UPDATE ` + t.Name() + ` -// SET ` + t.Field("subject_mapping_condition_set_pivot_ids") + `= ( -// SELECT ARRAY_AGG(new_pivots.id) -// FROM new_pivots -// ) -// WHERE ` + t.Field("subject_mapping_id") + ` = '` + smId + `' -// RETURNING ` + t.Field("subject_mapping_condition_set_pivot_ids") + `; -// COMMIT; -// ` -// } - -// func (c PolicyDbClient) CreatePivotSubjectMappingToConditionSets(ctx context.Context, smId string, scsIds []string) ([]string, error) { -// sql := insertSubjectMappingToConditionSetPivotsSql(smId, scsIds) - -// row, err := c.QueryRow(ctx, sql, nil, nil) -// if err != nil { -// return nil, err -// } - -// var pivotIds []string -// if err = row.Scan(&pivotIds); err != nil { -// return nil, err -// } -// return pivotIds, nil -// } - -// Creates a subject mapping with an empty set of subject_condition_set_pivot_ids because a pivot cannot exist without an existing subject mapping. -func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata []byte) (string, []interface{}, error) { +func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata []byte, subject_condition_set_id string) (string, []interface{}, error) { t := db.Tables.SubjectMappings columns := []string{ "attribute_value_id", "actions", "metadata", + "subject_condition_set_id", } values := []interface{}{ attribute_value_id, actions, metadata, + subject_condition_set_id, } return db.NewStatementBuilder(). @@ -489,11 +449,35 @@ func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata } func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.SubjectMappingCreate) (*subjectmapping.SubjectMapping, error) { + var ( + scs *subjectmapping.SubjectConditionSet + err error + actionsJSON []byte + metadataJSON []byte + ) + + // Prefer existing id over new creation per documented proto behavior. + if s.ExistingSubjectConditionSetId != "" { + // get the existing subject condition set + scs, err = c.GetSubjectConditionSet(ctx, s.ExistingSubjectConditionSetId, "") + if err != nil { + return nil, err + } + } else if s.NewSubjectConditionSet != nil { + // create the new subject condition sets + scs, err = c.CreateSubjectConditionSet(ctx, s.NewSubjectConditionSet) + if err != nil { + return nil, err + } + } else { + return nil, fmt.Errorf("no subject condition set provided") + } + metadataJSON, metadata, err := db.MarshalCreateMetadata(s.Metadata) if err != nil { return nil, err } - actionsJSON, err := MarshalActionsProto(s.Actions) + actionsJSON, err = MarshalActionsProto(s.Actions) if err != nil { return nil, err } @@ -503,6 +487,7 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp s.AttributeValueId, actionsJSON, metadataJSON, + scs.Id, ) var id string @@ -512,34 +497,19 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp return nil, db.WrapIfKnownInvalidQueryErr(err) } - var scs *subjectmapping.SubjectConditionSet - // Prefer existing id over new creation per documented proto behavior. - if s.ExistingSubjectConditionSetId != "" { - // get the existing subject condition set - scs, err = c.GetSubjectConditionSet(ctx, s.ExistingSubjectConditionSetId, "") - if err != nil { - return nil, err - } - } else if s.NewSubjectConditionSet != nil { - // create the new subject condition sets - scs, err = c.CreateSubjectConditionSet(ctx, s.NewSubjectConditionSet) - if err != nil { - return nil, err - } - } else { - return nil, fmt.Errorf("no subject condition set provided") - } - a, err := c.GetAttributeValue(ctx, s.AttributeValueId) + if err != nil { + return nil, err + } - rS := &subjectmapping.SubjectMapping{ + sm := &subjectmapping.SubjectMapping{ Id: id, Metadata: metadata, AttributeValue: a, SubjectConditionSet: scs, Actions: s.Actions, } - return rS, nil + return sm, nil } func getSubjectMappingSql(id string) (string, []interface{}, error) { From 42415e4595a63cf51fe1591bc8ea5227defd7704 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Tue, 5 Mar 2024 12:20:38 -0500 Subject: [PATCH 06/39] make sure to always close rows --- services/kasregistry/db/key_access_server_registry.go | 1 + services/policy/db/namespaces.go | 1 + 2 files changed, 2 insertions(+) diff --git a/services/kasregistry/db/key_access_server_registry.go b/services/kasregistry/db/key_access_server_registry.go index 314d64ba30..665ea816dc 100644 --- a/services/kasregistry/db/key_access_server_registry.go +++ b/services/kasregistry/db/key_access_server_registry.go @@ -46,6 +46,7 @@ func (c KasRegistryDbClient) ListKeyAccessServers(ctx context.Context) ([]*kasr. if err != nil { return nil, err } + defer rows.Close() var keyAccessServers []*kasr.KeyAccessServer var ( diff --git a/services/policy/db/namespaces.go b/services/policy/db/namespaces.go index 4a48dc55a9..d49101ac13 100644 --- a/services/policy/db/namespaces.go +++ b/services/policy/db/namespaces.go @@ -147,6 +147,7 @@ func (c PolicyDbClient) ListNamespaces(ctx context.Context, state string) ([]*na slog.Error("error listing namespaces", slog.String("sql", sql), slog.String("error", err.Error())) return nil, err } + defer rows.Close() list, err := hydrateNamespaceItems(rows, opts) if err != nil { From 0ed6cbc6ce77ab74e370502ccff73b849adff7df Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Tue, 5 Mar 2024 18:14:20 -0500 Subject: [PATCH 07/39] sync up new create/update behavior with policy api norms --- docs/grpc/index.html | 164 +- .../subject_mapping.swagger.json | 131 +- .../subjectmapping/subject_mapping.pb.go | 1219 ++++++------- .../subjectmapping/subject_mapping.pb.gw.go | 20 +- .../policy/subjectmapping/ConditionGroup.java | 90 +- .../ConditionGroupOrBuilder.java | 12 +- .../CreateSubjectMappingRequest.java | 1182 +++++++++++- .../CreateSubjectMappingRequestOrBuilder.java | 127 +- .../subjectmapping/SubjectMappingCreate.java | 1607 ----------------- .../SubjectMappingCreateOrBuilder.java | 136 -- .../subjectmapping/SubjectMappingProto.java | 383 ++-- .../subjectmapping/SubjectMappingUpdate.java | 1210 ------------- .../SubjectMappingUpdateOrBuilder.java | 89 - .../UpdateSubjectMappingRequest.java | 785 +++++++- .../UpdateSubjectMappingRequestOrBuilder.java | 80 +- .../UpdateSubjectMappingResponse.java | 10 - services/policy/db/subject_mappings.go | 177 +- .../subjectmapping/subject_mapping.proto | 33 +- 18 files changed, 2994 insertions(+), 4461 deletions(-) delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java diff --git a/docs/grpc/index.html b/docs/grpc/index.html index d3ec2f66ee..122ef19cac 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -787,14 +787,6 @@

    Table of Contents

    MSubjectMapping -
  • - MSubjectMappingCreate -
  • - -
  • - MSubjectMappingUpdate -
  • -
  • MSubjectSet
  • @@ -5233,7 +5225,7 @@

    Condition

    ConditionGroup

    -

    A collection of Conditions evaluated by the boolean_type provided

    +

    A collection of Conditions evaluated by the boolean_operator provided

    @@ -5250,7 +5242,7 @@

    ConditionGroup

    - + @@ -5322,12 +5314,40 @@

    CreateSubjectMappingR

    - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    boolean_typeboolean_operator ConditionBooleanTypeEnum

    the boolean evaluation type across the conditions

    subject_mappingSubjectMappingCreatemetadatacommon.MetadataMutable

    attribute_value_idstring

    Attribute Value to be mapped to

    existing_subject_condition_set_idstring

    Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)

    new_subject_condition_setSubjectConditionSetCreate

    Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)

    actionsauthorization.Actionrepeated

    The actions permitted by subjects in this mapping

    @@ -5865,96 +5885,6 @@

    SubjectMapping

    -

    SubjectMappingCreate

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    metadatacommon.MetadataMutable

    attribute_value_idstring

    Attribute Value to be mapped to

    existing_subject_condition_set_idstring

    Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)

    new_subject_condition_setSubjectConditionSetCreate

    Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)

    actionsauthorization.Actionrepeated

    The actions permitted by subjects in this mapping

    - - - - - -

    SubjectMappingUpdate

    -

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    update_metadatacommon.MetadataMutable

    update_subject_condition_set_idstring

    Replaces the existing SubjectConditionSet id with a new one

    update_actionsauthorization.Actionrepeated

    Replaces entire list of actions permitted by subjects

    - - - - -

    SubjectSet

    A collection of Condition Groups

    @@ -6052,12 +5982,26 @@

    UpdateSubjectMappingR - subject_mapping - SubjectMappingUpdate + update_metadata + common.MetadataMutable

    + + update_subject_condition_set_id + string + +

    Replaces the existing SubjectConditionSet id with a new one

    + + + + update_actions + authorization.Action + repeated +

    Replaces entire list of actions permitted by subjects

    + + @@ -6066,7 +6010,7 @@

    UpdateSubjectMappingR

    UpdateSubjectMappingResponse

    -

    `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}`

    '{"subject_mapping":{//everything}}'

    +

    @@ -6292,7 +6236,7 @@

    Methods with HTTP bindings

    - + @@ -6300,9 +6244,9 @@

    Methods with HTTP bindings

    - + - + @@ -6342,7 +6286,7 @@

    Methods with HTTP bindings

    - + @@ -6352,7 +6296,7 @@

    Methods with HTTP bindings

    - + diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index b984f98faa..bac20e2e9f 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -55,11 +55,11 @@ }, "parameters": [ { - "name": "subjectConditionSet", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/subjectmappingSubjectConditionSetCreate" + "$ref": "#/definitions/subjectmappingCreateSubjectConditionSetRequest" } } ], @@ -149,11 +149,16 @@ "type": "string" }, { - "name": "subjectConditionSet", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/subjectmappingSubjectConditionSetUpdate" + "type": "object", + "properties": { + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSetUpdate" + } + } } } ], @@ -201,11 +206,11 @@ }, "parameters": [ { - "name": "subjectMapping", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/subjectmappingSubjectMappingCreate" + "$ref": "#/definitions/subjectmappingCreateSubjectMappingRequest" } } ], @@ -304,7 +309,7 @@ "SubjectMappingService" ] }, - "post": { + "patch": { "operationId": "SubjectMappingService_UpdateSubjectMapping", "responses": { "200": { @@ -328,11 +333,28 @@ "type": "string" }, { - "name": "subjectMapping", + "name": "body", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/subjectmappingSubjectMappingUpdate" + "type": "object", + "properties": { + "updateMetadata": { + "$ref": "#/definitions/commonMetadataMutable" + }, + "updateSubjectConditionSetId": { + "type": "string", + "title": "Replaces the existing SubjectConditionSet id with a new one" + }, + "updateActions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/authorizationAction" + }, + "title": "Replaces entire list of actions permitted by subjects" + } + } } } ], @@ -560,12 +582,20 @@ "$ref": "#/definitions/subjectmappingCondition" } }, - "booleanType": { + "booleanOperator": { "$ref": "#/definitions/subjectmappingConditionBooleanTypeEnum", "title": "the boolean evaluation type across the conditions" } }, - "title": "A collection of Conditions evaluated by the boolean_type provided" + "title": "A collection of Conditions evaluated by the boolean_operator provided" + }, + "subjectmappingCreateSubjectConditionSetRequest": { + "type": "object", + "properties": { + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSetCreate" + } + } }, "subjectmappingCreateSubjectConditionSetResponse": { "type": "object", @@ -575,6 +605,34 @@ } } }, + "subjectmappingCreateSubjectMappingRequest": { + "type": "object", + "properties": { + "metadata": { + "$ref": "#/definitions/commonMetadataMutable" + }, + "attributeValueId": { + "type": "string", + "title": "Attribute Value to be mapped to" + }, + "existingSubjectConditionSetId": { + "type": "string", + "title": "Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)" + }, + "newSubjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSetCreate", + "title": "Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)" + }, + "actions": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/authorizationAction" + }, + "title": "The actions permitted by subjects in this mapping" + } + } + }, "subjectmappingCreateSubjectMappingResponse": { "type": "object", "properties": { @@ -761,34 +819,6 @@ "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_condition_sets\": [{subject_set_1},{subject_set_2}]\n\"actions\": [{\"standard\": \"STANDARD_ACTION_DECRYPT\"}\", {\"standard\": \"STANDARD_ACTION_TRANSMIT\"}]\n}", "title": "Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination" }, - "subjectmappingSubjectMappingCreate": { - "type": "object", - "properties": { - "metadata": { - "$ref": "#/definitions/commonMetadataMutable" - }, - "attributeValueId": { - "type": "string", - "title": "Attribute Value to be mapped to" - }, - "existingSubjectConditionSetId": { - "type": "string", - "title": "Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)" - }, - "newSubjectConditionSet": { - "$ref": "#/definitions/subjectmappingSubjectConditionSetCreate", - "title": "Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)" - }, - "actions": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/authorizationAction" - }, - "title": "The actions permitted by subjects in this mapping" - } - } - }, "subjectmappingSubjectMappingOperatorEnum": { "type": "string", "enum": [ @@ -799,26 +829,6 @@ "default": "SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED", "title": "buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package" }, - "subjectmappingSubjectMappingUpdate": { - "type": "object", - "properties": { - "updateMetadata": { - "$ref": "#/definitions/commonMetadataMutable" - }, - "updateSubjectConditionSetId": { - "type": "string", - "title": "Replaces the existing SubjectConditionSet id with a new one" - }, - "updateActions": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/authorizationAction" - }, - "title": "Replaces entire list of actions permitted by subjects" - } - } - }, "subjectmappingSubjectSet": { "type": "object", "properties": { @@ -847,8 +857,7 @@ "subjectMapping": { "$ref": "#/definitions/subjectmappingSubjectMapping" } - }, - "title": "`{\"subject_mapping\":{\"updated_metadata\": {\"labels\": {\"name\": \"new-name\"}}}}`\n'{\"subject_mapping\":{//everything}}'" + } } } } diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index b311f341b4..07249d88ef 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -208,7 +208,7 @@ func (x *Condition) GetSubjectExternalValues() []string { return nil } -// A collection of Conditions evaluated by the boolean_type provided +// A collection of Conditions evaluated by the boolean_operator provided type ConditionGroup struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -216,7 +216,7 @@ type ConditionGroup struct { Conditions []*Condition `protobuf:"bytes,1,rep,name=conditions,proto3" json:"conditions,omitempty"` // the boolean evaluation type across the conditions - BooleanType ConditionBooleanTypeEnum `protobuf:"varint,2,opt,name=boolean_type,json=booleanType,proto3,enum=policy.subjectmapping.ConditionBooleanTypeEnum" json:"boolean_type,omitempty"` + BooleanOperator ConditionBooleanTypeEnum `protobuf:"varint,2,opt,name=boolean_operator,json=booleanOperator,proto3,enum=policy.subjectmapping.ConditionBooleanTypeEnum" json:"boolean_operator,omitempty"` } func (x *ConditionGroup) Reset() { @@ -258,9 +258,9 @@ func (x *ConditionGroup) GetConditions() []*Condition { return nil } -func (x *ConditionGroup) GetBooleanType() ConditionBooleanTypeEnum { +func (x *ConditionGroup) GetBooleanOperator() ConditionBooleanTypeEnum { if x != nil { - return x.BooleanType + return x.BooleanOperator } return ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED } @@ -804,7 +804,7 @@ func (x *ListSubjectMappingsResponse) GetSubjectMappings() []*SubjectMapping { return nil } -type SubjectMappingCreate struct { +type CreateSubjectMappingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -820,8 +820,8 @@ type SubjectMappingCreate struct { Actions []*authorization.Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"` } -func (x *SubjectMappingCreate) Reset() { - *x = SubjectMappingCreate{} +func (x *CreateSubjectMappingRequest) Reset() { + *x = CreateSubjectMappingRequest{} if protoimpl.UnsafeEnabled { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -829,13 +829,13 @@ func (x *SubjectMappingCreate) Reset() { } } -func (x *SubjectMappingCreate) String() string { +func (x *CreateSubjectMappingRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SubjectMappingCreate) ProtoMessage() {} +func (*CreateSubjectMappingRequest) ProtoMessage() {} -func (x *SubjectMappingCreate) ProtoReflect() protoreflect.Message { +func (x *CreateSubjectMappingRequest) ProtoReflect() protoreflect.Message { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -847,93 +847,46 @@ func (x *SubjectMappingCreate) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SubjectMappingCreate.ProtoReflect.Descriptor instead. -func (*SubjectMappingCreate) Descriptor() ([]byte, []int) { +// Deprecated: Use CreateSubjectMappingRequest.ProtoReflect.Descriptor instead. +func (*CreateSubjectMappingRequest) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{12} } -func (x *SubjectMappingCreate) GetMetadata() *common.MetadataMutable { +func (x *CreateSubjectMappingRequest) GetMetadata() *common.MetadataMutable { if x != nil { return x.Metadata } return nil } -func (x *SubjectMappingCreate) GetAttributeValueId() string { +func (x *CreateSubjectMappingRequest) GetAttributeValueId() string { if x != nil { return x.AttributeValueId } return "" } -func (x *SubjectMappingCreate) GetExistingSubjectConditionSetId() string { +func (x *CreateSubjectMappingRequest) GetExistingSubjectConditionSetId() string { if x != nil { return x.ExistingSubjectConditionSetId } return "" } -func (x *SubjectMappingCreate) GetNewSubjectConditionSet() *SubjectConditionSetCreate { +func (x *CreateSubjectMappingRequest) GetNewSubjectConditionSet() *SubjectConditionSetCreate { if x != nil { return x.NewSubjectConditionSet } return nil } -func (x *SubjectMappingCreate) GetActions() []*authorization.Action { +func (x *CreateSubjectMappingRequest) GetActions() []*authorization.Action { if x != nil { return x.Actions } return nil } -type CreateSubjectMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - SubjectMapping *SubjectMappingCreate `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` -} - -func (x *CreateSubjectMappingRequest) Reset() { - *x = CreateSubjectMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateSubjectMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateSubjectMappingRequest) ProtoMessage() {} - -func (x *CreateSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_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 CreateSubjectMappingRequest.ProtoReflect.Descriptor instead. -func (*CreateSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{13} -} - -func (x *CreateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingCreate { - if x != nil { - return x.SubjectMapping - } - return nil -} - type CreateSubjectMappingResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -945,7 +898,7 @@ type CreateSubjectMappingResponse struct { func (x *CreateSubjectMappingResponse) Reset() { *x = CreateSubjectMappingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[14] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -958,7 +911,7 @@ func (x *CreateSubjectMappingResponse) String() string { func (*CreateSubjectMappingResponse) ProtoMessage() {} func (x *CreateSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[14] + 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 { @@ -971,7 +924,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{14} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{13} } func (x *CreateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { @@ -981,11 +934,12 @@ func (x *CreateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { return nil } -type SubjectMappingUpdate struct { +type UpdateSubjectMappingRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` UpdateMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=update_metadata,json=updateMetadata,proto3" json:"update_metadata,omitempty"` // Replaces the existing SubjectConditionSet id with a new one UpdateSubjectConditionSetId string `protobuf:"bytes,3,opt,name=update_subject_condition_set_id,json=updateSubjectConditionSetId,proto3" json:"update_subject_condition_set_id,omitempty"` @@ -993,23 +947,23 @@ type SubjectMappingUpdate struct { UpdateActions []*authorization.Action `protobuf:"bytes,5,rep,name=update_actions,json=updateActions,proto3" json:"update_actions,omitempty"` } -func (x *SubjectMappingUpdate) Reset() { - *x = SubjectMappingUpdate{} +func (x *UpdateSubjectMappingRequest) Reset() { + *x = UpdateSubjectMappingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[15] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SubjectMappingUpdate) String() string { +func (x *UpdateSubjectMappingRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SubjectMappingUpdate) ProtoMessage() {} +func (*UpdateSubjectMappingRequest) ProtoMessage() {} -func (x *SubjectMappingUpdate) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[15] +func (x *UpdateSubjectMappingRequest) 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 { @@ -1020,89 +974,39 @@ func (x *SubjectMappingUpdate) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SubjectMappingUpdate.ProtoReflect.Descriptor instead. -func (*SubjectMappingUpdate) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{15} -} - -func (x *SubjectMappingUpdate) GetUpdateMetadata() *common.MetadataMutable { - if x != nil { - return x.UpdateMetadata - } - return nil +// Deprecated: Use UpdateSubjectMappingRequest.ProtoReflect.Descriptor instead. +func (*UpdateSubjectMappingRequest) Descriptor() ([]byte, []int) { + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{14} } -func (x *SubjectMappingUpdate) GetUpdateSubjectConditionSetId() string { +func (x *UpdateSubjectMappingRequest) GetId() string { if x != nil { - return x.UpdateSubjectConditionSetId + return x.Id } return "" } -func (x *SubjectMappingUpdate) GetUpdateActions() []*authorization.Action { +func (x *UpdateSubjectMappingRequest) GetUpdateMetadata() *common.MetadataMutable { if x != nil { - return x.UpdateActions + return x.UpdateMetadata } return nil } -type UpdateSubjectMappingRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - SubjectMapping *SubjectMappingUpdate `protobuf:"bytes,2,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` -} - -func (x *UpdateSubjectMappingRequest) Reset() { - *x = UpdateSubjectMappingRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSubjectMappingRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSubjectMappingRequest) ProtoMessage() {} - -func (x *UpdateSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSubjectMappingRequest.ProtoReflect.Descriptor instead. -func (*UpdateSubjectMappingRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{16} -} - -func (x *UpdateSubjectMappingRequest) GetId() string { +func (x *UpdateSubjectMappingRequest) GetUpdateSubjectConditionSetId() string { if x != nil { - return x.Id + return x.UpdateSubjectConditionSetId } return "" } -func (x *UpdateSubjectMappingRequest) GetSubjectMapping() *SubjectMappingUpdate { +func (x *UpdateSubjectMappingRequest) GetUpdateActions() []*authorization.Action { if x != nil { - return x.SubjectMapping + return x.UpdateActions } return nil } -// `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}` -// '{"subject_mapping":{//everything}}' type UpdateSubjectMappingResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1114,7 +1018,7 @@ type UpdateSubjectMappingResponse struct { func (x *UpdateSubjectMappingResponse) Reset() { *x = UpdateSubjectMappingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1127,7 +1031,7 @@ func (x *UpdateSubjectMappingResponse) String() string { func (*UpdateSubjectMappingResponse) ProtoMessage() {} func (x *UpdateSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] + 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 { @@ -1140,7 +1044,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{17} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{15} } func (x *UpdateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { @@ -1161,7 +1065,7 @@ type DeleteSubjectMappingRequest struct { func (x *DeleteSubjectMappingRequest) Reset() { *x = DeleteSubjectMappingRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[18] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1174,7 +1078,7 @@ func (x *DeleteSubjectMappingRequest) String() string { func (*DeleteSubjectMappingRequest) ProtoMessage() {} func (x *DeleteSubjectMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[18] + 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 { @@ -1187,7 +1091,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{18} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{16} } func (x *DeleteSubjectMappingRequest) GetId() string { @@ -1208,7 +1112,7 @@ type DeleteSubjectMappingResponse struct { func (x *DeleteSubjectMappingResponse) Reset() { *x = DeleteSubjectMappingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[19] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1221,7 +1125,7 @@ func (x *DeleteSubjectMappingResponse) String() string { func (*DeleteSubjectMappingResponse) ProtoMessage() {} func (x *DeleteSubjectMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[19] + 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 { @@ -1234,7 +1138,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{19} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{17} } func (x *DeleteSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { @@ -1255,7 +1159,7 @@ type GetSubjectConditionSetRequest struct { func (x *GetSubjectConditionSetRequest) Reset() { *x = GetSubjectConditionSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[20] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1268,7 +1172,7 @@ func (x *GetSubjectConditionSetRequest) String() string { func (*GetSubjectConditionSetRequest) ProtoMessage() {} func (x *GetSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[20] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1281,7 +1185,7 @@ func (x *GetSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSubjectConditionSetRequest.ProtoReflect.Descriptor instead. func (*GetSubjectConditionSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{20} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{18} } func (x *GetSubjectConditionSetRequest) GetId() string { @@ -1304,7 +1208,7 @@ type GetSubjectConditionSetResponse struct { func (x *GetSubjectConditionSetResponse) Reset() { *x = GetSubjectConditionSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[21] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1317,7 +1221,7 @@ func (x *GetSubjectConditionSetResponse) String() string { func (*GetSubjectConditionSetResponse) ProtoMessage() {} func (x *GetSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[21] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1330,7 +1234,7 @@ func (x *GetSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSubjectConditionSetResponse.ProtoReflect.Descriptor instead. func (*GetSubjectConditionSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{21} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{19} } func (x *GetSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { @@ -1356,7 +1260,7 @@ type ListSubjectConditionSetsRequest struct { func (x *ListSubjectConditionSetsRequest) Reset() { *x = ListSubjectConditionSetsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[22] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1369,7 +1273,7 @@ func (x *ListSubjectConditionSetsRequest) String() string { func (*ListSubjectConditionSetsRequest) ProtoMessage() {} func (x *ListSubjectConditionSetsRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[22] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1382,7 +1286,7 @@ func (x *ListSubjectConditionSetsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSubjectConditionSetsRequest.ProtoReflect.Descriptor instead. func (*ListSubjectConditionSetsRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{22} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{20} } type ListSubjectConditionSetsResponse struct { @@ -1396,7 +1300,7 @@ type ListSubjectConditionSetsResponse struct { func (x *ListSubjectConditionSetsResponse) Reset() { *x = ListSubjectConditionSetsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[23] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1409,7 +1313,7 @@ func (x *ListSubjectConditionSetsResponse) String() string { func (*ListSubjectConditionSetsResponse) ProtoMessage() {} func (x *ListSubjectConditionSetsResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[23] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1422,7 +1326,7 @@ func (x *ListSubjectConditionSetsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListSubjectConditionSetsResponse.ProtoReflect.Descriptor instead. func (*ListSubjectConditionSetsResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{23} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{21} } func (x *ListSubjectConditionSetsResponse) GetSubjectConditionSets() []*SubjectConditionSet { @@ -1447,7 +1351,7 @@ type SubjectConditionSetCreate struct { func (x *SubjectConditionSetCreate) Reset() { *x = SubjectConditionSetCreate{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[24] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1460,7 +1364,7 @@ func (x *SubjectConditionSetCreate) String() string { func (*SubjectConditionSetCreate) ProtoMessage() {} func (x *SubjectConditionSetCreate) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[24] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1473,7 +1377,7 @@ func (x *SubjectConditionSetCreate) ProtoReflect() protoreflect.Message { // Deprecated: Use SubjectConditionSetCreate.ProtoReflect.Descriptor instead. func (*SubjectConditionSetCreate) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{24} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{22} } func (x *SubjectConditionSetCreate) GetMetadata() *common.MetadataMutable { @@ -1508,7 +1412,7 @@ type CreateSubjectConditionSetRequest struct { func (x *CreateSubjectConditionSetRequest) Reset() { *x = CreateSubjectConditionSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1521,7 +1425,7 @@ func (x *CreateSubjectConditionSetRequest) String() string { func (*CreateSubjectConditionSetRequest) ProtoMessage() {} func (x *CreateSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1534,7 +1438,7 @@ func (x *CreateSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateSubjectConditionSetRequest.ProtoReflect.Descriptor instead. func (*CreateSubjectConditionSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{25} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{23} } func (x *CreateSubjectConditionSetRequest) GetSubjectConditionSet() *SubjectConditionSetCreate { @@ -1555,7 +1459,7 @@ type CreateSubjectConditionSetResponse struct { func (x *CreateSubjectConditionSetResponse) Reset() { *x = CreateSubjectConditionSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1568,7 +1472,7 @@ func (x *CreateSubjectConditionSetResponse) String() string { func (*CreateSubjectConditionSetResponse) ProtoMessage() {} func (x *CreateSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1581,7 +1485,7 @@ func (x *CreateSubjectConditionSetResponse) ProtoReflect() protoreflect.Message // Deprecated: Use CreateSubjectConditionSetResponse.ProtoReflect.Descriptor instead. func (*CreateSubjectConditionSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{26} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{24} } func (x *CreateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { @@ -1606,7 +1510,7 @@ type SubjectConditionSetUpdate struct { func (x *SubjectConditionSetUpdate) Reset() { *x = SubjectConditionSetUpdate{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1619,7 +1523,7 @@ func (x *SubjectConditionSetUpdate) String() string { func (*SubjectConditionSetUpdate) ProtoMessage() {} func (x *SubjectConditionSetUpdate) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1632,7 +1536,7 @@ func (x *SubjectConditionSetUpdate) ProtoReflect() protoreflect.Message { // Deprecated: Use SubjectConditionSetUpdate.ProtoReflect.Descriptor instead. func (*SubjectConditionSetUpdate) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{27} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{25} } func (x *SubjectConditionSetUpdate) GetUpdatedName() string { @@ -1668,7 +1572,7 @@ type UpdateSubjectConditionSetRequest struct { func (x *UpdateSubjectConditionSetRequest) Reset() { *x = UpdateSubjectConditionSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1681,7 +1585,7 @@ func (x *UpdateSubjectConditionSetRequest) String() string { func (*UpdateSubjectConditionSetRequest) ProtoMessage() {} func (x *UpdateSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1694,7 +1598,7 @@ func (x *UpdateSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateSubjectConditionSetRequest.ProtoReflect.Descriptor instead. func (*UpdateSubjectConditionSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{28} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{26} } func (x *UpdateSubjectConditionSetRequest) GetId() string { @@ -1722,7 +1626,7 @@ type UpdateSubjectConditionSetResponse struct { func (x *UpdateSubjectConditionSetResponse) Reset() { *x = UpdateSubjectConditionSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[29] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1735,7 +1639,7 @@ func (x *UpdateSubjectConditionSetResponse) String() string { func (*UpdateSubjectConditionSetResponse) ProtoMessage() {} func (x *UpdateSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[29] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1748,7 +1652,7 @@ func (x *UpdateSubjectConditionSetResponse) ProtoReflect() protoreflect.Message // Deprecated: Use UpdateSubjectConditionSetResponse.ProtoReflect.Descriptor instead. func (*UpdateSubjectConditionSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{29} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{27} } func (x *UpdateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { @@ -1769,7 +1673,7 @@ type DeleteSubjectConditionSetRequest struct { func (x *DeleteSubjectConditionSetRequest) Reset() { *x = DeleteSubjectConditionSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[30] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1782,7 +1686,7 @@ func (x *DeleteSubjectConditionSetRequest) String() string { func (*DeleteSubjectConditionSetRequest) ProtoMessage() {} func (x *DeleteSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[30] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1795,7 +1699,7 @@ func (x *DeleteSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteSubjectConditionSetRequest.ProtoReflect.Descriptor instead. func (*DeleteSubjectConditionSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{30} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{28} } func (x *DeleteSubjectConditionSetRequest) GetId() string { @@ -1816,7 +1720,7 @@ type DeleteSubjectConditionSetResponse struct { func (x *DeleteSubjectConditionSetResponse) Reset() { *x = DeleteSubjectConditionSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[31] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1829,7 +1733,7 @@ func (x *DeleteSubjectConditionSetResponse) String() string { func (*DeleteSubjectConditionSetResponse) ProtoMessage() {} func (x *DeleteSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[31] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1842,7 +1746,7 @@ func (x *DeleteSubjectConditionSetResponse) ProtoReflect() protoreflect.Message // Deprecated: Use DeleteSubjectConditionSetResponse.ProtoReflect.Descriptor instead. func (*DeleteSubjectConditionSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{31} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{29} } func (x *DeleteSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { @@ -1884,250 +1788,205 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 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, + 0x73, 0x22, 0xc5, 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, 0xb7, 0x01, 0x0a, 0x13, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x03, 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, 0x4e, 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, 0x42, 0x08, - 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa2, 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, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 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, + 0x12, 0x67, 0x0a, 0x10, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 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, 0x0f, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, + 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 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, 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, + 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, 0xb7, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, + 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 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, 0x4e, 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, 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, 0xe1, 0x02, 0x0a, 0x14, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x43, 0x72, 0x65, 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, 0x48, 0x0a, 0x21, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x1d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, - 0x6b, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6e, 0x65, 0x77, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 0x73, 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, 0x54, 0x0a, 0x0f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 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, 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, 0x53, 0x65, 0x74, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, + 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa2, 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, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 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, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 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, 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, 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, 0xdc, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, - 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, 0x0e, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, - 0x1f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x1b, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 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, 0xfa, 0x02, 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, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, - 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2b, 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 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, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, - 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, - 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 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, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, - 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, - 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x60, 0x0a, 0x16, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x73, 0x22, 0xb4, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, + 0x74, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, - 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, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0xe1, 0x01, 0x0a, 0x19, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 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, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x10, 0x61, 0x74, 0x74, 0x72, + 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x21, + 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x6b, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6e, 0x65, 0x77, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x10, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x02, 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, - 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x12, 0x5d, 0x0a, 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x12, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, - 0xa0, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x53, 0x65, 0x74, 0x12, 0x39, 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, 0x42, 0x08, 0xba, 0x48, 0x05, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0xfb, + 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, 0x1f, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x1b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3c, + 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x0d, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x64, 0x0a, 0x15, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe7, 0x01, 0x0a, + 0x1e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 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, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, + 0x65, 0x0a, 0x1b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 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, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, 0x61, 0x73, 0x73, + 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x20, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, + 0x0a, 0x16, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, + 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, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, + 0x22, 0xb4, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 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, + 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x70, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, @@ -2135,177 +1994,205 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0xe1, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, + 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 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, 0x42, 0x08, + 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, + 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, + 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, + 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 0xa4, 0x0f, 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, + 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, 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, 0xe0, 0x0e, 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, 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, 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, + 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, - 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, + 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, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 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, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, + 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, + 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, + 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, + 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, + 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xc6, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, + 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, + 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, 0x3a, 0x15, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x73, 0x65, 0x74, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xcb, 0x01, - 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x3a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x32, 0x1c, 0x2f, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 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, + 0x6e, 0x2d, 0x73, 0x65, 0x74, 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 ( @@ -2321,7 +2208,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, 32) +var file_policy_subjectmapping_subject_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 30) var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (SubjectMappingOperatorEnum)(0), // 0: policy.subjectmapping.SubjectMappingOperatorEnum (ConditionBooleanTypeEnum)(0), // 1: policy.subjectmapping.ConditionBooleanTypeEnum @@ -2337,97 +2224,93 @@ var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (*GetSubjectMappingResponse)(nil), // 11: policy.subjectmapping.GetSubjectMappingResponse (*ListSubjectMappingsRequest)(nil), // 12: policy.subjectmapping.ListSubjectMappingsRequest (*ListSubjectMappingsResponse)(nil), // 13: policy.subjectmapping.ListSubjectMappingsResponse - (*SubjectMappingCreate)(nil), // 14: policy.subjectmapping.SubjectMappingCreate - (*CreateSubjectMappingRequest)(nil), // 15: policy.subjectmapping.CreateSubjectMappingRequest - (*CreateSubjectMappingResponse)(nil), // 16: policy.subjectmapping.CreateSubjectMappingResponse - (*SubjectMappingUpdate)(nil), // 17: policy.subjectmapping.SubjectMappingUpdate - (*UpdateSubjectMappingRequest)(nil), // 18: policy.subjectmapping.UpdateSubjectMappingRequest - (*UpdateSubjectMappingResponse)(nil), // 19: policy.subjectmapping.UpdateSubjectMappingResponse - (*DeleteSubjectMappingRequest)(nil), // 20: policy.subjectmapping.DeleteSubjectMappingRequest - (*DeleteSubjectMappingResponse)(nil), // 21: policy.subjectmapping.DeleteSubjectMappingResponse - (*GetSubjectConditionSetRequest)(nil), // 22: policy.subjectmapping.GetSubjectConditionSetRequest - (*GetSubjectConditionSetResponse)(nil), // 23: policy.subjectmapping.GetSubjectConditionSetResponse - (*ListSubjectConditionSetsRequest)(nil), // 24: policy.subjectmapping.ListSubjectConditionSetsRequest - (*ListSubjectConditionSetsResponse)(nil), // 25: policy.subjectmapping.ListSubjectConditionSetsResponse - (*SubjectConditionSetCreate)(nil), // 26: policy.subjectmapping.SubjectConditionSetCreate - (*CreateSubjectConditionSetRequest)(nil), // 27: policy.subjectmapping.CreateSubjectConditionSetRequest - (*CreateSubjectConditionSetResponse)(nil), // 28: policy.subjectmapping.CreateSubjectConditionSetResponse - (*SubjectConditionSetUpdate)(nil), // 29: policy.subjectmapping.SubjectConditionSetUpdate - (*UpdateSubjectConditionSetRequest)(nil), // 30: policy.subjectmapping.UpdateSubjectConditionSetRequest - (*UpdateSubjectConditionSetResponse)(nil), // 31: policy.subjectmapping.UpdateSubjectConditionSetResponse - (*DeleteSubjectConditionSetRequest)(nil), // 32: policy.subjectmapping.DeleteSubjectConditionSetRequest - (*DeleteSubjectConditionSetResponse)(nil), // 33: policy.subjectmapping.DeleteSubjectConditionSetResponse - (*common.Metadata)(nil), // 34: common.Metadata - (*attributes.Value)(nil), // 35: policy.attributes.Value - (*authorization.Action)(nil), // 36: authorization.Action - (*structpb.Struct)(nil), // 37: google.protobuf.Struct - (*common.MetadataMutable)(nil), // 38: common.MetadataMutable + (*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 + (*GetSubjectConditionSetRequest)(nil), // 20: policy.subjectmapping.GetSubjectConditionSetRequest + (*GetSubjectConditionSetResponse)(nil), // 21: policy.subjectmapping.GetSubjectConditionSetResponse + (*ListSubjectConditionSetsRequest)(nil), // 22: policy.subjectmapping.ListSubjectConditionSetsRequest + (*ListSubjectConditionSetsResponse)(nil), // 23: policy.subjectmapping.ListSubjectConditionSetsResponse + (*SubjectConditionSetCreate)(nil), // 24: policy.subjectmapping.SubjectConditionSetCreate + (*CreateSubjectConditionSetRequest)(nil), // 25: policy.subjectmapping.CreateSubjectConditionSetRequest + (*CreateSubjectConditionSetResponse)(nil), // 26: policy.subjectmapping.CreateSubjectConditionSetResponse + (*SubjectConditionSetUpdate)(nil), // 27: policy.subjectmapping.SubjectConditionSetUpdate + (*UpdateSubjectConditionSetRequest)(nil), // 28: policy.subjectmapping.UpdateSubjectConditionSetRequest + (*UpdateSubjectConditionSetResponse)(nil), // 29: policy.subjectmapping.UpdateSubjectConditionSetResponse + (*DeleteSubjectConditionSetRequest)(nil), // 30: policy.subjectmapping.DeleteSubjectConditionSetRequest + (*DeleteSubjectConditionSetResponse)(nil), // 31: policy.subjectmapping.DeleteSubjectConditionSetResponse + (*common.Metadata)(nil), // 32: common.Metadata + (*attributes.Value)(nil), // 33: policy.attributes.Value + (*authorization.Action)(nil), // 34: authorization.Action + (*structpb.Struct)(nil), // 35: google.protobuf.Struct + (*common.MetadataMutable)(nil), // 36: 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 + 1, // 2: policy.subjectmapping.ConditionGroup.boolean_operator:type_name -> policy.subjectmapping.ConditionBooleanTypeEnum 3, // 3: policy.subjectmapping.SubjectSet.condition_groups:type_name -> policy.subjectmapping.ConditionGroup - 34, // 4: policy.subjectmapping.SubjectConditionSet.metadata:type_name -> common.Metadata + 32, // 4: policy.subjectmapping.SubjectConditionSet.metadata:type_name -> common.Metadata 4, // 5: policy.subjectmapping.SubjectConditionSet.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 34, // 6: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata - 35, // 7: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value + 32, // 6: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata + 33, // 7: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value 5, // 8: policy.subjectmapping.SubjectMapping.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 36, // 9: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action - 37, // 10: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct + 34, // 9: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action + 35, // 10: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct 7, // 11: policy.subjectmapping.MatchSubjectMappingsRequest.subject:type_name -> policy.subjectmapping.Subject 6, // 12: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping 6, // 13: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping 6, // 14: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 38, // 15: policy.subjectmapping.SubjectMappingCreate.metadata:type_name -> common.MetadataMutable - 26, // 16: policy.subjectmapping.SubjectMappingCreate.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 36, // 17: policy.subjectmapping.SubjectMappingCreate.actions:type_name -> authorization.Action - 14, // 18: policy.subjectmapping.CreateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingCreate - 6, // 19: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 38, // 20: policy.subjectmapping.SubjectMappingUpdate.update_metadata:type_name -> common.MetadataMutable - 36, // 21: policy.subjectmapping.SubjectMappingUpdate.update_actions:type_name -> authorization.Action - 17, // 22: policy.subjectmapping.UpdateSubjectMappingRequest.subject_mapping:type_name -> policy.subjectmapping.SubjectMappingUpdate - 6, // 23: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 6, // 24: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 5, // 25: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 6, // 26: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 5, // 27: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet - 38, // 28: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable - 4, // 29: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 26, // 30: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 5, // 31: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 38, // 32: policy.subjectmapping.SubjectConditionSetUpdate.updated_metadata:type_name -> common.MetadataMutable - 4, // 33: policy.subjectmapping.SubjectConditionSetUpdate.updated_subject_sets:type_name -> policy.subjectmapping.SubjectSet - 29, // 34: policy.subjectmapping.UpdateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetUpdate - 5, // 35: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 5, // 36: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 8, // 37: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest - 12, // 38: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest - 10, // 39: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest - 15, // 40: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest - 18, // 41: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest - 20, // 42: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest - 24, // 43: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest - 22, // 44: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest - 27, // 45: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest - 30, // 46: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest - 32, // 47: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest - 9, // 48: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse - 13, // 49: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse - 11, // 50: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse - 16, // 51: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse - 19, // 52: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse - 21, // 53: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse - 25, // 54: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse - 23, // 55: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse - 28, // 56: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse - 31, // 57: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse - 33, // 58: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse - 48, // [48:59] is the sub-list for method output_type - 37, // [37:48] is the sub-list for method input_type - 37, // [37:37] is the sub-list for extension type_name - 37, // [37:37] is the sub-list for extension extendee - 0, // [0:37] is the sub-list for field type_name + 36, // 15: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable + 24, // 16: policy.subjectmapping.CreateSubjectMappingRequest.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 34, // 17: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action + 6, // 18: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 36, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable + 34, // 20: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action + 6, // 21: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 6, // 22: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 5, // 23: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 6, // 24: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 5, // 25: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 36, // 26: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable + 4, // 27: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 24, // 28: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 5, // 29: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 36, // 30: policy.subjectmapping.SubjectConditionSetUpdate.updated_metadata:type_name -> common.MetadataMutable + 4, // 31: policy.subjectmapping.SubjectConditionSetUpdate.updated_subject_sets:type_name -> policy.subjectmapping.SubjectSet + 27, // 32: policy.subjectmapping.UpdateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetUpdate + 5, // 33: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 5, // 34: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 8, // 35: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 36: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 37: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 14, // 38: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 16, // 39: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 18, // 40: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 22, // 41: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest + 20, // 42: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest + 25, // 43: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest + 28, // 44: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest + 30, // 45: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest + 9, // 46: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 47: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 48: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 15, // 49: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 17, // 50: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 19, // 51: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 23, // 52: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse + 21, // 53: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse + 26, // 54: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse + 29, // 55: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse + 31, // 56: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse + 46, // [46:57] is the sub-list for method output_type + 35, // [35:46] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } @@ -2581,18 +2464,6 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectMappingCreate); 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.(*CreateSubjectMappingRequest); i { case 0: return &v.state @@ -2604,7 +2475,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[14].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 @@ -2616,19 +2487,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectMappingUpdate); 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[16].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 @@ -2640,7 +2499,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[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubjectMappingResponse); i { case 0: return &v.state @@ -2652,7 +2511,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[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSubjectMappingRequest); i { case 0: return &v.state @@ -2664,7 +2523,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[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSubjectMappingResponse); i { case 0: return &v.state @@ -2676,7 +2535,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[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSubjectConditionSetRequest); i { case 0: return &v.state @@ -2688,7 +2547,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[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetSubjectConditionSetResponse); i { case 0: return &v.state @@ -2700,7 +2559,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[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSubjectConditionSetsRequest); i { case 0: return &v.state @@ -2712,7 +2571,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[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ListSubjectConditionSetsResponse); i { case 0: return &v.state @@ -2724,7 +2583,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[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubjectConditionSetCreate); i { case 0: return &v.state @@ -2736,7 +2595,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[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateSubjectConditionSetRequest); i { case 0: return &v.state @@ -2748,7 +2607,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[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateSubjectConditionSetResponse); i { case 0: return &v.state @@ -2760,7 +2619,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[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubjectConditionSetUpdate); i { case 0: return &v.state @@ -2772,7 +2631,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[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubjectConditionSetRequest); i { case 0: return &v.state @@ -2784,7 +2643,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubjectConditionSetResponse); i { case 0: return &v.state @@ -2796,7 +2655,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSubjectConditionSetRequest); i { case 0: return &v.state @@ -2808,7 +2667,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSubjectConditionSetResponse); i { case 0: return &v.state @@ -2827,7 +2686,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: 32, + NumMessages: 30, 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 9a48fb524b..686a2d8b89 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go @@ -143,7 +143,7 @@ func request_SubjectMappingService_CreateSubjectMapping_0(ctx context.Context, m if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectMapping); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -160,7 +160,7 @@ func local_request_SubjectMappingService_CreateSubjectMapping_0(ctx context.Cont if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectMapping); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -177,7 +177,7 @@ func request_SubjectMappingService_UpdateSubjectMapping_0(ctx context.Context, m if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectMapping); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -211,7 +211,7 @@ func local_request_SubjectMappingService_UpdateSubjectMapping_0(ctx context.Cont if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectMapping); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -367,7 +367,7 @@ func request_SubjectMappingService_CreateSubjectConditionSet_0(ctx context.Conte if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectConditionSet); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -384,7 +384,7 @@ func local_request_SubjectMappingService_CreateSubjectConditionSet_0(ctx context if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectConditionSet); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -401,7 +401,7 @@ func request_SubjectMappingService_UpdateSubjectConditionSet_0(ctx context.Conte if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectConditionSet); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -435,7 +435,7 @@ func local_request_SubjectMappingService_UpdateSubjectConditionSet_0(ctx context if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectConditionSet); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -619,7 +619,7 @@ func RegisterSubjectMappingServiceHandlerServer(ctx context.Context, mux *runtim }) - mux.Handle("POST", pattern_SubjectMappingService_UpdateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_SubjectMappingService_UpdateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -923,7 +923,7 @@ func RegisterSubjectMappingServiceHandlerClient(ctx context.Context, mux *runtim }) - mux.Handle("POST", pattern_SubjectMappingService_UpdateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("PATCH", pattern_SubjectMappingService_UpdateSubjectMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroup.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroup.java index f4b06fdcda..193f0e5b33 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroup.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroup.java @@ -6,7 +6,7 @@ /** *
    - * A collection of Conditions evaluated by the boolean_type provided
    + * A collection of Conditions evaluated by the boolean_operator provided
      * 
    * * Protobuf type {@code policy.subjectmapping.ConditionGroup} @@ -22,7 +22,7 @@ private ConditionGroup(com.google.protobuf.GeneratedMessageV3.Builder builder } private ConditionGroup() { conditions_ = java.util.Collections.emptyList(); - booleanType_ = 0; + booleanOperator_ = 0; } @java.lang.Override @@ -86,29 +86,29 @@ public io.opentdf.platform.policy.subjectmapping.ConditionOrBuilder getCondition return conditions_.get(index); } - public static final int BOOLEAN_TYPE_FIELD_NUMBER = 2; - private int booleanType_ = 0; + public static final int BOOLEAN_OPERATOR_FIELD_NUMBER = 2; + private int booleanOperator_ = 0; /** *
        * the boolean evaluation type across the conditions
        * 
    * - * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_type = 2 [json_name = "booleanType", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for booleanType. + * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for booleanOperator. */ - @java.lang.Override public int getBooleanTypeValue() { - return booleanType_; + @java.lang.Override public int getBooleanOperatorValue() { + return booleanOperator_; } /** *
        * the boolean evaluation type across the conditions
        * 
    * - * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_type = 2 [json_name = "booleanType", (.buf.validate.field) = { ... } - * @return The booleanType. + * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The booleanOperator. */ - @java.lang.Override public io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum getBooleanType() { - io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum result = io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.forNumber(booleanType_); + @java.lang.Override public io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum getBooleanOperator() { + io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum result = io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.forNumber(booleanOperator_); return result == null ? io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.UNRECOGNIZED : result; } @@ -129,8 +129,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < conditions_.size(); i++) { output.writeMessage(1, conditions_.get(i)); } - if (booleanType_ != io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED.getNumber()) { - output.writeEnum(2, booleanType_); + if (booleanOperator_ != io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(2, booleanOperator_); } getUnknownFields().writeTo(output); } @@ -145,9 +145,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, conditions_.get(i)); } - if (booleanType_ != io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED.getNumber()) { + if (booleanOperator_ != io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream - .computeEnumSize(2, booleanType_); + .computeEnumSize(2, booleanOperator_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -166,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { if (!getConditionsList() .equals(other.getConditionsList())) return false; - if (booleanType_ != other.booleanType_) return false; + if (booleanOperator_ != other.booleanOperator_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -182,8 +182,8 @@ public int hashCode() { hash = (37 * hash) + CONDITIONS_FIELD_NUMBER; hash = (53 * hash) + getConditionsList().hashCode(); } - hash = (37 * hash) + BOOLEAN_TYPE_FIELD_NUMBER; - hash = (53 * hash) + booleanType_; + hash = (37 * hash) + BOOLEAN_OPERATOR_FIELD_NUMBER; + hash = (53 * hash) + booleanOperator_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -283,7 +283,7 @@ protected Builder newBuilderForType( } /** *
    -   * A collection of Conditions evaluated by the boolean_type provided
    +   * A collection of Conditions evaluated by the boolean_operator provided
        * 
    * * Protobuf type {@code policy.subjectmapping.ConditionGroup} @@ -326,7 +326,7 @@ public Builder clear() { conditionsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); - booleanType_ = 0; + booleanOperator_ = 0; return this; } @@ -374,7 +374,7 @@ private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmappin private void buildPartial0(io.opentdf.platform.policy.subjectmapping.ConditionGroup result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000002) != 0)) { - result.booleanType_ = booleanType_; + result.booleanOperator_ = booleanOperator_; } } @@ -448,8 +448,8 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.ConditionGrou } } } - if (other.booleanType_ != 0) { - setBooleanTypeValue(other.getBooleanTypeValue()); + if (other.booleanOperator_ != 0) { + setBooleanOperatorValue(other.getBooleanOperatorValue()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -491,7 +491,7 @@ public Builder mergeFrom( break; } // case 10 case 16: { - booleanType_ = input.readEnum(); + booleanOperator_ = input.readEnum(); bitField0_ |= 0x00000002; break; } // case 16 @@ -752,29 +752,29 @@ public io.opentdf.platform.policy.subjectmapping.Condition.Builder addConditions return conditionsBuilder_; } - private int booleanType_ = 0; + private int booleanOperator_ = 0; /** *
          * the boolean evaluation type across the conditions
          * 
    * - * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_type = 2 [json_name = "booleanType", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for booleanType. + * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for booleanOperator. */ - @java.lang.Override public int getBooleanTypeValue() { - return booleanType_; + @java.lang.Override public int getBooleanOperatorValue() { + return booleanOperator_; } /** *
          * the boolean evaluation type across the conditions
          * 
    * - * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_type = 2 [json_name = "booleanType", (.buf.validate.field) = { ... } - * @param value The enum numeric value on the wire for booleanType to set. + * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @param value The enum numeric value on the wire for booleanOperator to set. * @return This builder for chaining. */ - public Builder setBooleanTypeValue(int value) { - booleanType_ = value; + public Builder setBooleanOperatorValue(int value) { + booleanOperator_ = value; bitField0_ |= 0x00000002; onChanged(); return this; @@ -784,12 +784,12 @@ public Builder setBooleanTypeValue(int value) { * the boolean evaluation type across the conditions * * - * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_type = 2 [json_name = "booleanType", (.buf.validate.field) = { ... } - * @return The booleanType. + * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The booleanOperator. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum getBooleanType() { - io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum result = io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.forNumber(booleanType_); + public io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum getBooleanOperator() { + io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum result = io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.forNumber(booleanOperator_); return result == null ? io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum.UNRECOGNIZED : result; } /** @@ -797,16 +797,16 @@ public io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum getBoo * the boolean evaluation type across the conditions * * - * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_type = 2 [json_name = "booleanType", (.buf.validate.field) = { ... } - * @param value The booleanType to set. + * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @param value The booleanOperator to set. * @return This builder for chaining. */ - public Builder setBooleanType(io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum value) { + public Builder setBooleanOperator(io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; - booleanType_ = value.getNumber(); + booleanOperator_ = value.getNumber(); onChanged(); return this; } @@ -815,12 +815,12 @@ public Builder setBooleanType(io.opentdf.platform.policy.subjectmapping.Conditio * the boolean evaluation type across the conditions * * - * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_type = 2 [json_name = "booleanType", (.buf.validate.field) = { ... } + * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } * @return This builder for chaining. */ - public Builder clearBooleanType() { + public Builder clearBooleanOperator() { bitField0_ = (bitField0_ & ~0x00000002); - booleanType_ = 0; + booleanOperator_ = 0; onChanged(); return this; } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroupOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroupOrBuilder.java index 05654e0667..ca255b6a98 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroupOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/ConditionGroupOrBuilder.java @@ -37,17 +37,17 @@ io.opentdf.platform.policy.subjectmapping.ConditionOrBuilder getConditionsOrBuil * the boolean evaluation type across the conditions * * - * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_type = 2 [json_name = "booleanType", (.buf.validate.field) = { ... } - * @return The enum numeric value on the wire for booleanType. + * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The enum numeric value on the wire for booleanOperator. */ - int getBooleanTypeValue(); + int getBooleanOperatorValue(); /** *
        * the boolean evaluation type across the conditions
        * 
    * - * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_type = 2 [json_name = "booleanType", (.buf.validate.field) = { ... } - * @return The booleanType. + * .policy.subjectmapping.ConditionBooleanTypeEnum boolean_operator = 2 [json_name = "booleanOperator", (.buf.validate.field) = { ... } + * @return The booleanOperator. */ - io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum getBooleanType(); + io.opentdf.platform.policy.subjectmapping.ConditionBooleanTypeEnum getBooleanOperator(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java index fb29f9ddcf..90c1330e92 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java @@ -17,6 +17,9 @@ private CreateSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Build super(builder); } private CreateSubjectMappingRequest() { + attributeValueId_ = ""; + existingSubjectConditionSetId_ = ""; + actions_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -40,30 +43,223 @@ protected java.lang.Object newInstance( } private int bitField0_; - public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate subjectMapping_; + public static final int METADATA_FIELD_NUMBER = 1; + private io.opentdf.platform.common.MetadataMutable metadata_; /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; + * @return Whether the metadata field is set. */ @java.lang.Override - public boolean hasSubjectMapping() { + public boolean hasMetadata() { return ((bitField0_ & 0x00000001) != 0); } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; + * @return The metadata. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + + public static final int ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object attributeValueId_ = ""; + /** + *
    +   * Attribute Value to be mapped to
    +   * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The attributeValueId. + */ + @java.lang.Override + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + 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(); + attributeValueId_ = s; + return s; + } + } + /** + *
    +   * Attribute Value to be mapped to
    +   * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The bytes for attributeValueId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object existingSubjectConditionSetId_ = ""; + /** + *
    +   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +   * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. + */ + @java.lang.Override + public java.lang.String getExistingSubjectConditionSetId() { + java.lang.Object ref = existingSubjectConditionSetId_; + 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(); + existingSubjectConditionSetId_ = s; + return s; + } + } + /** + *
    +   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +   * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExistingSubjectConditionSetIdBytes() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + existingSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER = 4; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; + /** + *
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. + */ + @java.lang.Override + public boolean hasNewSubjectConditionSet() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } + /** + *
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } + + public static final int ACTIONS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List actions_; + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.authorization.Action getActions(int index) { + return actions_.get(index); + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.get(index); } private byte memoizedIsInitialized = -1; @@ -81,7 +277,19 @@ public final boolean isInitialized() { public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectMapping()); + output.writeMessage(1, getMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeValueId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, existingSubjectConditionSetId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(4, getNewSubjectConditionSet()); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(5, actions_.get(i)); } getUnknownFields().writeTo(output); } @@ -94,7 +302,21 @@ public int getSerializedSize() { size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectMapping()); + .computeMessageSize(1, getMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attributeValueId_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, existingSubjectConditionSetId_); + } + if (((bitField0_ & 0x00000002) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getNewSubjectConditionSet()); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, actions_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,11 +333,22 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest) obj; - if (hasSubjectMapping() != other.hasSubjectMapping()) return false; - if (hasSubjectMapping()) { - if (!getSubjectMapping() - .equals(other.getSubjectMapping())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; } + if (!getAttributeValueId() + .equals(other.getAttributeValueId())) return false; + if (!getExistingSubjectConditionSetId() + .equals(other.getExistingSubjectConditionSetId())) return false; + if (hasNewSubjectConditionSet() != other.hasNewSubjectConditionSet()) return false; + if (hasNewSubjectConditionSet()) { + if (!getNewSubjectConditionSet() + .equals(other.getNewSubjectConditionSet())) return false; + } + if (!getActionsList() + .equals(other.getActionsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -127,9 +360,21 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectMapping()) { - hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMapping().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttributeValueId().hashCode(); + hash = (37 * hash) + EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getExistingSubjectConditionSetId().hashCode(); + if (hasNewSubjectConditionSet()) { + hash = (37 * hash) + NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getNewSubjectConditionSet().hashCode(); + } + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -261,18 +506,34 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getSubjectMappingFieldBuilder(); + getMetadataFieldBuilder(); + getNewSubjectConditionSetFieldBuilder(); + getActionsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + attributeValueId_ = ""; + existingSubjectConditionSetId_ = ""; + newSubjectConditionSet_ = null; + if (newSubjectConditionSetBuilder_ != null) { + newSubjectConditionSetBuilder_.dispose(); + newSubjectConditionSetBuilder_ = null; + } + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -299,20 +560,45 @@ public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest bui @java.lang.Override public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest buildPartial() { io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result) { + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000010); + } + result.actions_ = actions_; + } else { + result.actions_ = actionsBuilder_.build(); + } + } + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectMapping_ = subjectMappingBuilder_ == null - ? subjectMapping_ - : subjectMappingBuilder_.build(); + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.attributeValueId_ = attributeValueId_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.existingSubjectConditionSetId_ = existingSubjectConditionSetId_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.newSubjectConditionSet_ = newSubjectConditionSetBuilder_ == null + ? newSubjectConditionSet_ + : newSubjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } result.bitField0_ |= to_bitField0_; } @@ -360,8 +646,47 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest other) { if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.getDefaultInstance()) return this; - if (other.hasSubjectMapping()) { - mergeSubjectMapping(other.getSubjectMapping()); + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (!other.getAttributeValueId().isEmpty()) { + attributeValueId_ = other.attributeValueId_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getExistingSubjectConditionSetId().isEmpty()) { + existingSubjectConditionSetId_ = other.existingSubjectConditionSetId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasNewSubjectConditionSet()) { + mergeNewSubjectConditionSet(other.getNewSubjectConditionSet()); + } + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000010); + } else { + ensureActionsIsMutable(); + actions_.addAll(other.actions_); + } + onChanged(); + } + } else { + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000010); + actionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getActionsFieldBuilder() : null; + } else { + actionsBuilder_.addAllMessages(other.actions_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -391,11 +716,41 @@ public Builder mergeFrom( break; case 10: { input.readMessage( - getSubjectMappingFieldBuilder().getBuilder(), + getMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 + case 18: { + attributeValueId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + existingSubjectConditionSetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + input.readMessage( + getNewSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + io.opentdf.platform.authorization.Action m = + input.readMessage( + io.opentdf.platform.authorization.Action.parser(), + extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -413,125 +768,778 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate subjectMapping_; + private io.opentdf.platform.common.MetadataMutable metadata_; private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder> subjectMappingBuilder_; + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> metadataBuilder_; /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; + * @return Whether the metadata field is set. */ - public boolean hasSubjectMapping() { + public boolean hasMetadata() { return ((bitField0_ & 0x00000001) != 0); } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; + * @return The metadata. */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getSubjectMapping() { - if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.common.MetadataMutable getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; } else { - return subjectMappingBuilder_.getMessage(); + return metadataBuilder_.getMessage(); } } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; */ - public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate value) { - if (subjectMappingBuilder_ == null) { + public Builder setMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - subjectMapping_ = value; + metadata_ = value; } else { - subjectMappingBuilder_.setMessage(value); + metadataBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; */ - public Builder setSubjectMapping( - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder builderForValue) { - if (subjectMappingBuilder_ == null) { - subjectMapping_ = builderForValue.build(); + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); } else { - subjectMappingBuilder_.setMessage(builderForValue.build()); + metadataBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate value) { - if (subjectMappingBuilder_ == null) { + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && - subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance()) { - getSubjectMappingBuilder().mergeFrom(value); + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); } else { - subjectMapping_ = value; + metadata_ = value; } } else { - subjectMappingBuilder_.mergeFrom(value); + metadataBuilder_.mergeFrom(value); } - if (subjectMapping_ != null) { + if (metadata_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; */ - public Builder clearSubjectMapping() { + public Builder clearMetadata() { bitField0_ = (bitField0_ & ~0x00000001); - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; } onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder getSubjectMappingBuilder() { + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { bitField0_ |= 0x00000001; onChanged(); - return getSubjectMappingFieldBuilder().getBuilder(); + return getMetadataFieldBuilder().getBuilder(); } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder getSubjectMappingOrBuilder() { - if (subjectMappingBuilder_ != null) { - return subjectMappingBuilder_.getMessageOrBuilder(); + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); } else { - return subjectMapping_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance() : subjectMapping_; + return metadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; } } /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; */ private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder> - getSubjectMappingFieldBuilder() { - if (subjectMappingBuilder_ == null) { - subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder>( - getSubjectMapping(), + 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.lang.Object attributeValueId_ = ""; + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The attributeValueId. + */ + public java.lang.String getAttributeValueId() { + java.lang.Object ref = attributeValueId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributeValueId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The bytes for attributeValueId. + */ + public com.google.protobuf.ByteString + getAttributeValueIdBytes() { + java.lang.Object ref = attributeValueId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + attributeValueId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @param value The attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + attributeValueId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return This builder for chaining. + */ + public Builder clearAttributeValueId() { + attributeValueId_ = getDefaultInstance().getAttributeValueId(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
    +     * Attribute Value to be mapped to
    +     * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @param value The bytes for attributeValueId to set. + * @return This builder for chaining. + */ + public Builder setAttributeValueIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + attributeValueId_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object existingSubjectConditionSetId_ = ""; + /** + *
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. + */ + public java.lang.String getExistingSubjectConditionSetId() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + existingSubjectConditionSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. + */ + public com.google.protobuf.ByteString + getExistingSubjectConditionSetIdBytes() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + existingSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @param value The existingSubjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setExistingSubjectConditionSetId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + existingSubjectConditionSetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return This builder for chaining. + */ + public Builder clearExistingSubjectConditionSetId() { + existingSubjectConditionSetId_ = getDefaultInstance().getExistingSubjectConditionSetId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @param value The bytes for existingSubjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setExistingSubjectConditionSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + existingSubjectConditionSetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> newSubjectConditionSetBuilder_; + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. + */ + public boolean hasNewSubjectConditionSet() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { + if (newSubjectConditionSetBuilder_ == null) { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } else { + return newSubjectConditionSetBuilder_.getMessage(); + } + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder setNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (newSubjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newSubjectConditionSet_ = value; + } else { + newSubjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder setNewSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { + if (newSubjectConditionSetBuilder_ == null) { + newSubjectConditionSet_ = builderForValue.build(); + } else { + newSubjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder mergeNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (newSubjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + newSubjectConditionSet_ != null && + newSubjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { + getNewSubjectConditionSetBuilder().mergeFrom(value); + } else { + newSubjectConditionSet_ = value; + } + } else { + newSubjectConditionSetBuilder_.mergeFrom(value); + } + if (newSubjectConditionSet_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder clearNewSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000008); + newSubjectConditionSet_ = null; + if (newSubjectConditionSetBuilder_ != null) { + newSubjectConditionSetBuilder_.dispose(); + newSubjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getNewSubjectConditionSetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNewSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { + if (newSubjectConditionSetBuilder_ != null) { + return newSubjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return newSubjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> + getNewSubjectConditionSetFieldBuilder() { + if (newSubjectConditionSetBuilder_ == null) { + newSubjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( + getNewSubjectConditionSet(), + getParentForChildren(), + isClean()); + newSubjectConditionSet_ = null; + } + return newSubjectConditionSetBuilder_; + } + + private java.util.List actions_ = + java.util.Collections.emptyList(); + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000010) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000010; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> actionsBuilder_; + + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); + } else { + return actionsBuilder_.getMessageList(); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); + } else { + return actionsBuilder_.getCount(); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.authorization.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder setActions( + int index, io.opentdf.platform.authorization.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder setActions( + int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addActions(io.opentdf.platform.authorization.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addActions( + int index, io.opentdf.platform.authorization.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(index, value); + onChanged(); + } else { + actionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addActions( + io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addActions( + int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder addAllActions( + java.lang.Iterable values) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, actions_); + onChanged(); + } else { + actionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + } else { + actionsBuilder_.clear(); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); + onChanged(); + } else { + actionsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.authorization.Action.Builder getActionsBuilder( + int index) { + return getActionsFieldBuilder().getBuilder(index); + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( + int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); } else { + return actionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public java.util.List + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(actions_); + } + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.authorization.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder().addBuilder( + io.opentdf.platform.authorization.Action.getDefaultInstance()); + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( + int index) { + return getActionsFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.Action.getDefaultInstance()); + } + /** + *
    +     * The actions permitted by subjects in this mapping
    +     * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + public java.util.List + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( + actions_, + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); - subjectMapping_ = null; + actions_ = null; } - return subjectMappingBuilder_; + return actionsBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java index 53dc9a9917..50ae506ccc 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java @@ -9,17 +9,128 @@ public interface CreateSubjectMappingRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; + * @return Whether the metadata field is set. */ - boolean hasSubjectMapping(); + boolean hasMetadata(); /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; + * @return The metadata. */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getSubjectMapping(); + io.opentdf.platform.common.MetadataMutable getMetadata(); /** - * .policy.subjectmapping.SubjectMappingCreate subject_mapping = 1 [json_name = "subjectMapping"]; + * .common.MetadataMutable metadata = 1 [json_name = "metadata"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder getSubjectMappingOrBuilder(); + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + *
    +   * Attribute Value to be mapped to
    +   * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The attributeValueId. + */ + java.lang.String getAttributeValueId(); + /** + *
    +   * Attribute Value to be mapped to
    +   * 
    + * + * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * @return The bytes for attributeValueId. + */ + com.google.protobuf.ByteString + getAttributeValueIdBytes(); + + /** + *
    +   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +   * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. + */ + java.lang.String getExistingSubjectConditionSetId(); + /** + *
    +   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +   * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. + */ + com.google.protobuf.ByteString + getExistingSubjectConditionSetIdBytes(); + + /** + *
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. + */ + boolean hasNewSubjectConditionSet(); + /** + *
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet(); + /** + *
    +   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder(); + + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + java.util.List + getActionsList(); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.authorization.Action getActions(int index); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + int getActionsCount(); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + java.util.List + getActionsOrBuilderList(); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( + int index); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java deleted file mode 100644 index e951cd1672..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreate.java +++ /dev/null @@ -1,1607 +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.SubjectMappingCreate} - */ -public final class SubjectMappingCreate extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectMappingCreate) - SubjectMappingCreateOrBuilder { -private static final long serialVersionUID = 0L; - // Use SubjectMappingCreate.newBuilder() to construct. - private SubjectMappingCreate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubjectMappingCreate() { - attributeValueId_ = ""; - existingSubjectConditionSetId_ = ""; - actions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubjectMappingCreate(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.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 ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object attributeValueId_ = ""; - /** - *
    -   * Attribute Value to be mapped to
    -   * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The attributeValueId. - */ - @java.lang.Override - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; - 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(); - attributeValueId_ = s; - return s; - } - } - /** - *
    -   * Attribute Value to be mapped to
    -   * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The bytes for attributeValueId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeValueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object existingSubjectConditionSetId_ = ""; - /** - *
    -   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    -   * 
    - * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The existingSubjectConditionSetId. - */ - @java.lang.Override - public java.lang.String getExistingSubjectConditionSetId() { - java.lang.Object ref = existingSubjectConditionSetId_; - 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(); - existingSubjectConditionSetId_ = s; - return s; - } - } - /** - *
    -   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    -   * 
    - * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The bytes for existingSubjectConditionSetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getExistingSubjectConditionSetIdBytes() { - java.lang.Object ref = existingSubjectConditionSetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - existingSubjectConditionSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER = 4; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; - /** - *
    -   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -   * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return Whether the newSubjectConditionSet field is set. - */ - @java.lang.Override - public boolean hasNewSubjectConditionSet() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - *
    -   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -   * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return The newSubjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { - return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } - /** - *
    -   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -   * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { - return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } - - public static final int ACTIONS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List actions_; - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; - } - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - @java.lang.Override - public int getActionsCount() { - return actions_.size(); - } - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.Action getActions(int index) { - return actions_.get(index); - } - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.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()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeValueId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, existingSubjectConditionSetId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(4, getNewSubjectConditionSet()); - } - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(5, actions_.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()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attributeValueId_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, existingSubjectConditionSetId_); - } - if (((bitField0_ & 0x00000002) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getNewSubjectConditionSet()); - } - for (int i = 0; i < actions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, actions_.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.SubjectMappingCreate)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate other = (io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate) obj; - - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } - if (!getAttributeValueId() - .equals(other.getAttributeValueId())) return false; - if (!getExistingSubjectConditionSetId() - .equals(other.getExistingSubjectConditionSetId())) return false; - if (hasNewSubjectConditionSet() != other.hasNewSubjectConditionSet()) return false; - if (hasNewSubjectConditionSet()) { - if (!getNewSubjectConditionSet() - .equals(other.getNewSubjectConditionSet())) return false; - } - if (!getActionsList() - .equals(other.getActionsList())) 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(); - } - hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttributeValueId().hashCode(); - hash = (37 * hash) + EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getExistingSubjectConditionSetId().hashCode(); - if (hasNewSubjectConditionSet()) { - hash = (37 * hash) + NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getNewSubjectConditionSet().hashCode(); - } - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate 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.SubjectMappingCreate 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.SubjectMappingCreate 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.SubjectMappingCreate 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.SubjectMappingCreate} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectMappingCreate) - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.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(); - getNewSubjectConditionSetFieldBuilder(); - getActionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - attributeValueId_ = ""; - existingSubjectConditionSetId_ = ""; - newSubjectConditionSet_ = null; - if (newSubjectConditionSetBuilder_ != null) { - newSubjectConditionSetBuilder_.dispose(); - newSubjectConditionSetBuilder_ = null; - } - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - } else { - actions_ = null; - actionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate build() { - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate buildPartial() { - io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate result = new io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate result) { - if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { - actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.actions_ = actions_; - } else { - result.actions_ = actionsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.attributeValueId_ = attributeValueId_; - } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.existingSubjectConditionSetId_ = existingSubjectConditionSetId_; - } - if (((from_bitField0_ & 0x00000008) != 0)) { - result.newSubjectConditionSet_ = newSubjectConditionSetBuilder_ == null - ? newSubjectConditionSet_ - : newSubjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000002; - } - 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.SubjectMappingCreate) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate other) { - if (other == io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate.getDefaultInstance()) return this; - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } - if (!other.getAttributeValueId().isEmpty()) { - attributeValueId_ = other.attributeValueId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getExistingSubjectConditionSetId().isEmpty()) { - existingSubjectConditionSetId_ = other.existingSubjectConditionSetId_; - bitField0_ |= 0x00000004; - onChanged(); - } - if (other.hasNewSubjectConditionSet()) { - mergeNewSubjectConditionSet(other.getNewSubjectConditionSet()); - } - if (actionsBuilder_ == null) { - if (!other.actions_.isEmpty()) { - if (actions_.isEmpty()) { - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureActionsIsMutable(); - actions_.addAll(other.actions_); - } - onChanged(); - } - } else { - if (!other.actions_.isEmpty()) { - if (actionsBuilder_.isEmpty()) { - actionsBuilder_.dispose(); - actionsBuilder_ = null; - actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000010); - actionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getActionsFieldBuilder() : null; - } else { - actionsBuilder_.addAllMessages(other.actions_); - } - } - } - 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: { - attributeValueId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - existingSubjectConditionSetId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { - input.readMessage( - getNewSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { - io.opentdf.platform.authorization.Action m = - input.readMessage( - io.opentdf.platform.authorization.Action.parser(), - extensionRegistry); - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(m); - } else { - actionsBuilder_.addMessage(m); - } - break; - } // case 42 - 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.lang.Object attributeValueId_ = ""; - /** - *
    -     * Attribute Value to be mapped to
    -     * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The attributeValueId. - */ - public java.lang.String getAttributeValueId() { - java.lang.Object ref = attributeValueId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attributeValueId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -     * Attribute Value to be mapped to
    -     * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The bytes for attributeValueId. - */ - public com.google.protobuf.ByteString - getAttributeValueIdBytes() { - java.lang.Object ref = attributeValueId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - attributeValueId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -     * Attribute Value to be mapped to
    -     * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @param value The attributeValueId to set. - * @return This builder for chaining. - */ - public Builder setAttributeValueId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - attributeValueId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
    -     * Attribute Value to be mapped to
    -     * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return This builder for chaining. - */ - public Builder clearAttributeValueId() { - attributeValueId_ = getDefaultInstance().getAttributeValueId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
    -     * Attribute Value to be mapped to
    -     * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @param value The bytes for attributeValueId to set. - * @return This builder for chaining. - */ - public Builder setAttributeValueIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - attributeValueId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.lang.Object existingSubjectConditionSetId_ = ""; - /** - *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    -     * 
    - * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The existingSubjectConditionSetId. - */ - public java.lang.String getExistingSubjectConditionSetId() { - java.lang.Object ref = existingSubjectConditionSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - existingSubjectConditionSetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    -     * 
    - * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The bytes for existingSubjectConditionSetId. - */ - public com.google.protobuf.ByteString - getExistingSubjectConditionSetIdBytes() { - java.lang.Object ref = existingSubjectConditionSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - existingSubjectConditionSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    -     * 
    - * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @param value The existingSubjectConditionSetId to set. - * @return This builder for chaining. - */ - public Builder setExistingSubjectConditionSetId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - existingSubjectConditionSetId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - /** - *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    -     * 
    - * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return This builder for chaining. - */ - public Builder clearExistingSubjectConditionSetId() { - existingSubjectConditionSetId_ = getDefaultInstance().getExistingSubjectConditionSetId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    -     * 
    - * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @param value The bytes for existingSubjectConditionSetId to set. - * @return This builder for chaining. - */ - public Builder setExistingSubjectConditionSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - existingSubjectConditionSetId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; - } - - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> newSubjectConditionSetBuilder_; - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return Whether the newSubjectConditionSet field is set. - */ - public boolean hasNewSubjectConditionSet() { - return ((bitField0_ & 0x00000008) != 0); - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return The newSubjectConditionSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { - if (newSubjectConditionSetBuilder_ == null) { - return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } else { - return newSubjectConditionSetBuilder_.getMessage(); - } - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder setNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { - if (newSubjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - newSubjectConditionSet_ = value; - } else { - newSubjectConditionSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder setNewSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { - if (newSubjectConditionSetBuilder_ == null) { - newSubjectConditionSet_ = builderForValue.build(); - } else { - newSubjectConditionSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder mergeNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { - if (newSubjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - newSubjectConditionSet_ != null && - newSubjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { - getNewSubjectConditionSetBuilder().mergeFrom(value); - } else { - newSubjectConditionSet_ = value; - } - } else { - newSubjectConditionSetBuilder_.mergeFrom(value); - } - if (newSubjectConditionSet_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder clearNewSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000008); - newSubjectConditionSet_ = null; - if (newSubjectConditionSetBuilder_ != null) { - newSubjectConditionSetBuilder_.dispose(); - newSubjectConditionSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getNewSubjectConditionSetBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getNewSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { - if (newSubjectConditionSetBuilder_ != null) { - return newSubjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return newSubjectConditionSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> - getNewSubjectConditionSetFieldBuilder() { - if (newSubjectConditionSetBuilder_ == null) { - newSubjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( - getNewSubjectConditionSet(), - getParentForChildren(), - isClean()); - newSubjectConditionSet_ = null; - } - return newSubjectConditionSetBuilder_; - } - - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> actionsBuilder_; - - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.authorization.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public Builder setActions( - int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public Builder addActions(io.opentdf.platform.authorization.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.authorization.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(index, value); - onChanged(); - } else { - actionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public Builder addActions( - io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public Builder addActions( - int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public Builder addAllActions( - java.lang.Iterable values) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, actions_); - onChanged(); - } else { - actionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public Builder clearActions() { - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - actionsBuilder_.clear(); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public Builder removeActions(int index) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.remove(index); - onChanged(); - } else { - actionsBuilder_.remove(index); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.Action.Builder getActionsBuilder( - int index) { - return getActionsFieldBuilder().getBuilder(index); - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( - int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); } else { - return actionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public java.util.List - getActionsOrBuilderList() { - if (actionsBuilder_ != null) { - return actionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(actions_); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.Action.Builder addActionsBuilder() { - return getActionsFieldBuilder().addBuilder( - io.opentdf.platform.authorization.Action.getDefaultInstance()); - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( - int index) { - return getActionsFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.Action.getDefaultInstance()); - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - public java.util.List - getActionsBuilderList() { - return getActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> - getActionsFieldBuilder() { - if (actionsBuilder_ == null) { - actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( - actions_, - ((bitField0_ & 0x00000010) != 0), - getParentForChildren(), - isClean()); - actions_ = null; - } - return actionsBuilder_; - } - @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.SubjectMappingCreate) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectMappingCreate) - private static final io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate(); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingCreate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubjectMappingCreate 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.SubjectMappingCreate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java deleted file mode 100644 index a487edc192..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingCreateOrBuilder.java +++ /dev/null @@ -1,136 +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 SubjectMappingCreateOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectMappingCreate) - 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(); - - /** - *
    -   * Attribute Value to be mapped to
    -   * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The attributeValueId. - */ - java.lang.String getAttributeValueId(); - /** - *
    -   * Attribute Value to be mapped to
    -   * 
    - * - * string attribute_value_id = 2 [json_name = "attributeValueId"]; - * @return The bytes for attributeValueId. - */ - com.google.protobuf.ByteString - getAttributeValueIdBytes(); - - /** - *
    -   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    -   * 
    - * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The existingSubjectConditionSetId. - */ - java.lang.String getExistingSubjectConditionSetId(); - /** - *
    -   * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    -   * 
    - * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The bytes for existingSubjectConditionSetId. - */ - com.google.protobuf.ByteString - getExistingSubjectConditionSetIdBytes(); - - /** - *
    -   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -   * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return Whether the newSubjectConditionSet field is set. - */ - boolean hasNewSubjectConditionSet(); - /** - *
    -   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -   * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return The newSubjectConditionSet. - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet(); - /** - *
    -   * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -   * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder(); - - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - java.util.List - getActionsList(); - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - io.opentdf.platform.authorization.Action getActions(int index); - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - int getActionsCount(); - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - java.util.List - getActionsOrBuilderList(); - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; - */ - io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( - int index); -} 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 3732dc400c..38d991f851 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 @@ -75,11 +75,6 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_ListSubjectMappingsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_SubjectMappingCreate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor; static final @@ -90,11 +85,6 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_SubjectMappingUpdate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor; static final @@ -195,176 +185,169 @@ public static void registerAllExtensions( "\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" + + "(\tR\025subjectExternalValues\"\305\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\"\267\001\n\023SubjectConditionSet\022\016\n\002id\030\001 \001(\tR" + - "\002id\022\022\n\004name\030\002 \001(\tR\004name\022,\n\010metadata\030\003 \001(" + - "\0132\020.common.MetadataR\010metadata\022N\n\014subject" + - "_sets\030\004 \003(\0132!.policy.subjectmapping.Subj" + - "ectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\242\002\n\016Subjec" + - "tMapping\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010metadata\030\002 \001" + - "(\0132\020.common.MetadataR\010metadata\022A\n\017attrib" + - "ute_value\030\003 \001(\0132\030.policy.attributes.Valu" + - "eR\016attributeValue\022^\n\025subject_condition_s" + - "et\030\004 \001(\0132*.policy.subjectmapping.Subject" + - "ConditionSetR\023subjectConditionSet\022/\n\007act" + - "ions\030\005 \003(\0132\025.authorization.ActionR\007actio" + - "ns\"B\n\007Subject\0227\n\nattributes\030\001 \001(\0132\027.goog" + - "le.protobuf.StructR\nattributes\"W\n\033MatchS" + - "ubjectMappingsRequest\0228\n\007subject\030\001 \001(\0132\036" + - ".policy.subjectmapping.SubjectR\007subject\"" + - "p\n\034MatchSubjectMappingsResponse\022P\n\020subje" + - "ct_mappings\030\001 \003(\0132%.policy.subjectmappin" + - "g.SubjectMappingR\017subjectMappings\"2\n\030Get" + - "SubjectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001" + - "\001R\002id\"k\n\031GetSubjectMappingResponse\022N\n\017su" + - "bject_mapping\030\001 \001(\0132%.policy.subjectmapp" + - "ing.SubjectMappingR\016subjectMapping\"\034\n\032Li" + - "stSubjectMappingsRequest\"o\n\033ListSubjectM" + - "appingsResponse\022P\n\020subject_mappings\030\001 \003(" + - "\0132%.policy.subjectmapping.SubjectMapping" + - "R\017subjectMappings\"\341\002\n\024SubjectMappingCrea" + - "te\0223\n\010metadata\030\001 \001(\0132\027.common.MetadataMu" + - "tableR\010metadata\022,\n\022attribute_value_id\030\002 " + - "\001(\tR\020attributeValueId\022H\n!existing_subjec" + - "t_condition_set_id\030\003 \001(\tR\035existingSubjec" + - "tConditionSetId\022k\n\031new_subject_condition" + - "_set\030\004 \001(\01320.policy.subjectmapping.Subje" + - "ctConditionSetCreateR\026newSubjectConditio" + - "nSet\022/\n\007actions\030\005 \003(\0132\025.authorization.Ac" + - "tionR\007actions\"s\n\033CreateSubjectMappingReq" + - "uest\022T\n\017subject_mapping\030\001 \001(\0132+.policy.s" + - "ubjectmapping.SubjectMappingCreateR\016subj" + - "ectMapping\"n\n\034CreateSubjectMappingRespon" + + "\022g\n\020boolean_operator\030\002 \001(\0162/.policy.subj" + + "ectmapping.ConditionBooleanTypeEnumB\013\272H\010" + + "\202\001\002\020\001\310\001\001R\017booleanOperator\"h\n\nSubjectSet\022" + + "Z\n\020condition_groups\030\001 \003(\0132%.policy.subje" + + "ctmapping.ConditionGroupB\010\272H\005\222\001\002\010\001R\017cond" + + "itionGroups\"\267\001\n\023SubjectConditionSet\022\016\n\002i" + + "d\030\001 \001(\tR\002id\022\022\n\004name\030\002 \001(\tR\004name\022,\n\010metad" + + "ata\030\003 \001(\0132\020.common.MetadataR\010metadata\022N\n" + + "\014subject_sets\030\004 \003(\0132!.policy.subjectmapp" + + "ing.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\242\002" + + "\n\016SubjectMapping\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010meta" + + "data\030\002 \001(\0132\020.common.MetadataR\010metadata\022A" + + "\n\017attribute_value\030\003 \001(\0132\030.policy.attribu" + + "tes.ValueR\016attributeValue\022^\n\025subject_con" + + "dition_set\030\004 \001(\0132*.policy.subjectmapping" + + ".SubjectConditionSetR\023subjectConditionSe" + + "t\022/\n\007actions\030\005 \003(\0132\025.authorization.Actio" + + "nR\007actions\"B\n\007Subject\0227\n\nattributes\030\001 \001(" + + "\0132\027.google.protobuf.StructR\nattributes\"W" + + "\n\033MatchSubjectMappingsRequest\0228\n\007subject" + + "\030\001 \001(\0132\036.policy.subjectmapping.SubjectR\007" + + "subject\"p\n\034MatchSubjectMappingsResponse\022" + + "P\n\020subject_mappings\030\001 \003(\0132%.policy.subje" + + "ctmapping.SubjectMappingR\017subjectMapping" + + "s\"2\n\030GetSubjectMappingRequest\022\026\n\002id\030\001 \001(" + + "\tB\006\272H\003\310\001\001R\002id\"k\n\031GetSubjectMappingRespon" + "se\022N\n\017subject_mapping\030\001 \001(\0132%.policy.sub" + "jectmapping.SubjectMappingR\016subjectMappi" + - "ng\"\334\001\n\024SubjectMappingUpdate\022@\n\017update_me" + - "tadata\030\002 \001(\0132\027.common.MetadataMutableR\016u" + - "pdateMetadata\022D\n\037update_subject_conditio" + - "n_set_id\030\003 \001(\tR\033updateSubjectConditionSe" + - "tId\022<\n\016update_actions\030\005 \003(\0132\025.authorizat" + - "ion.ActionR\rupdateActions\"\213\001\n\033UpdateSubj" + - "ectMappingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002i" + - "d\022T\n\017subject_mapping\030\002 \001(\0132+.policy.subj" + - "ectmapping.SubjectMappingUpdateR\016subject" + - "Mapping\"n\n\034UpdateSubjectMappingResponse\022" + - "N\n\017subject_mapping\030\001 \001(\0132%.policy.subjec" + - "tmapping.SubjectMappingR\016subjectMapping\"" + - "5\n\033DeleteSubjectMappingRequest\022\026\n\002id\030\001 \001" + - "(\tB\006\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectMappingRe" + - "sponse\022N\n\017subject_mapping\030\001 \001(\0132%.policy" + - ".subjectmapping.SubjectMappingR\016subjectM" + - "apping\"7\n\035GetSubjectConditionSetRequest\022" + - "\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetSubjectCo" + - "nditionSetResponse\022^\n\025subject_condition_" + - "set\030\001 \001(\0132*.policy.subjectmapping.Subjec" + - "tConditionSetR\023subjectConditionSet\022e\n\033as" + - "sociated_subject_mappings\030\002 \003(\0132%.policy" + - ".subjectmapping.SubjectMappingR\031associat" + - "edSubjectMappings\"!\n\037ListSubjectConditio" + - "nSetsRequest\"\204\001\n ListSubjectConditionSet" + - "sResponse\022`\n\026subject_condition_sets\030\001 \003(" + - "\0132*.policy.subjectmapping.SubjectConditi" + - "onSetR\024subjectConditionSets\"\264\001\n\031SubjectC" + - "onditionSetCreate\0223\n\010metadata\030\001 \001(\0132\027.co" + - "mmon.MetadataMutableR\010metadata\022\022\n\004name\030\002" + - " \001(\tR\004name\022N\n\014subject_sets\030\003 \003(\0132!.polic" + - "y.subjectmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013s" + - "ubjectSets\"\210\001\n CreateSubjectConditionSet" + - "Request\022d\n\025subject_condition_set\030\001 \001(\01320" + - ".policy.subjectmapping.SubjectConditionS" + - "etCreateR\023subjectConditionSet\"\203\001\n!Create" + - "SubjectConditionSetResponse\022^\n\025subject_c" + - "ondition_set\030\001 \001(\0132*.policy.subjectmappi" + - "ng.SubjectConditionSetR\023subjectCondition" + - "Set\"\341\001\n\031SubjectConditionSetUpdate\022!\n\014upd" + - "ated_name\030\001 \001(\tR\013updatedName\022B\n\020updated_" + - "metadata\030\002 \001(\0132\027.common.MetadataMutableR" + - "\017updatedMetadata\022]\n\024updated_subject_sets" + - "\030\003 \003(\0132!.policy.subjectmapping.SubjectSe" + - "tB\010\272H\005\222\001\002\010\001R\022updatedSubjectSets\"\240\001\n Upda" + - "teSubjectConditionSetRequest\022\026\n\002id\030\001 \001(\t" + - "B\006\272H\003\310\001\001R\002id\022d\n\025subject_condition_set\030\002 " + + "ng\"\034\n\032ListSubjectMappingsRequest\"o\n\033List" + + "SubjectMappingsResponse\022P\n\020subject_mappi" + + "ngs\030\001 \003(\0132%.policy.subjectmapping.Subjec" + + "tMappingR\017subjectMappings\"\372\002\n\033CreateSubj" + + "ectMappingRequest\0223\n\010metadata\030\001 \001(\0132\027.co" + + "mmon.MetadataMutableR\010metadata\0224\n\022attrib" + + "ute_value_id\030\002 \001(\tB\006\272H\003\310\001\001R\020attributeVal" + + "ueId\022H\n!existing_subject_condition_set_i" + + "d\030\003 \001(\tR\035existingSubjectConditionSetId\022k" + + "\n\031new_subject_condition_set\030\004 \001(\01320.poli" + + "cy.subjectmapping.SubjectConditionSetCre" + + "ateR\026newSubjectConditionSet\0229\n\007actions\030\005" + + " \003(\0132\025.authorization.ActionB\010\272H\005\222\001\002\010\001R\007a" + + "ctions\"n\n\034CreateSubjectMappingResponse\022N" + + "\n\017subject_mapping\030\001 \001(\0132%.policy.subject" + + "mapping.SubjectMappingR\016subjectMapping\"\373" + + "\001\n\033UpdateSubjectMappingRequest\022\026\n\002id\030\001 \001" + + "(\tB\006\272H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132" + + "\027.common.MetadataMutableR\016updateMetadata" + + "\022D\n\037update_subject_condition_set_id\030\003 \001(" + + "\tR\033updateSubjectConditionSetId\022<\n\016update" + + "_actions\030\005 \003(\0132\025.authorization.ActionR\ru" + + "pdateActions\"n\n\034UpdateSubjectMappingResp" + + "onse\022N\n\017subject_mapping\030\001 \001(\0132%.policy.s" + + "ubjectmapping.SubjectMappingR\016subjectMap" + + "ping\"5\n\033DeleteSubjectMappingRequest\022\026\n\002i" + + "d\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectMapp" + + "ingResponse\022N\n\017subject_mapping\030\001 \001(\0132%.p" + + "olicy.subjectmapping.SubjectMappingR\016sub" + + "jectMapping\"7\n\035GetSubjectConditionSetReq" + + "uest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetSubj" + + "ectConditionSetResponse\022^\n\025subject_condi" + + "tion_set\030\001 \001(\0132*.policy.subjectmapping.S" + + "ubjectConditionSetR\023subjectConditionSet\022" + + "e\n\033associated_subject_mappings\030\002 \003(\0132%.p" + + "olicy.subjectmapping.SubjectMappingR\031ass" + + "ociatedSubjectMappings\"!\n\037ListSubjectCon" + + "ditionSetsRequest\"\204\001\n ListSubjectConditi" + + "onSetsResponse\022`\n\026subject_condition_sets" + + "\030\001 \003(\0132*.policy.subjectmapping.SubjectCo" + + "nditionSetR\024subjectConditionSets\"\264\001\n\031Sub" + + "jectConditionSetCreate\0223\n\010metadata\030\001 \001(\013" + + "2\027.common.MetadataMutableR\010metadata\022\022\n\004n" + + "ame\030\002 \001(\tR\004name\022N\n\014subject_sets\030\003 \003(\0132!." + + "policy.subjectmapping.SubjectSetB\010\272H\005\222\001\002" + + "\010\001R\013subjectSets\"\210\001\n CreateSubjectConditi" + + "onSetRequest\022d\n\025subject_condition_set\030\001 " + "\001(\01320.policy.subjectmapping.SubjectCondi" + - "tionSetUpdateR\023subjectConditionSet\"\203\001\n!U" + - "pdateSubjectConditionSetResponse\022^\n\025subj" + + "tionSetCreateR\023subjectConditionSet\"\203\001\n!C" + + "reateSubjectConditionSetResponse\022^\n\025subj" + "ect_condition_set\030\001 \001(\0132*.policy.subject" + "mapping.SubjectConditionSetR\023subjectCond" + - "itionSet\":\n DeleteSubjectConditionSetReq" + - "uest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\203\001\n!DeleteS" + - "ubjectConditionSetResponse\022^\n\025subject_co" + - "ndition_set\030\001 \001(\0132*.policy.subjectmappin" + - "g.SubjectConditionSetR\023subjectConditionS" + - "et*\233\001\n\032SubjectMappingOperatorEnum\022-\n)SUB" + - "JECT_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\'CONDITI" + - "ON_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022#\n\037CO" + - "NDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036CONDI" + - "TION_BOOLEAN_TYPE_ENUM_OR\020\0022\244\017\n\025SubjectM" + - "appingService\022\251\001\n\024MatchSubjectMappings\0222" + - ".policy.subjectmapping.MatchSubjectMappi" + - "ngsRequest\0323.policy.subjectmapping.Match" + - "SubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/subjec" + - "t-mappings/match:\007subject\022\227\001\n\023ListSubjec" + - "tMappings\0221.policy.subjectmapping.ListSu" + - "bjectMappingsRequest\0322.policy.subjectmap" + - "ping.ListSubjectMappingsResponse\"\031\202\323\344\223\002\023" + - "\022\021/subject-mappings\022\226\001\n\021GetSubjectMappin" + - "g\022/.policy.subjectmapping.GetSubjectMapp" + - "ingRequest\0320.policy.subjectmapping.GetSu" + - "bjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subject-m" + - "appings/{id}\022\253\001\n\024CreateSubjectMapping\0222." + - "policy.subjectmapping.CreateSubjectMappi" + - "ngRequest\0323.policy.subjectmapping.Create" + - "SubjectMappingResponse\"*\202\323\344\223\002$\"\021/subject" + - "-mappings:\017subject_mapping\022\260\001\n\024UpdateSub" + - "jectMapping\0222.policy.subjectmapping.Upda" + - "teSubjectMappingRequest\0323.policy.subject" + - "mapping.UpdateSubjectMappingResponse\"/\202\323" + - "\344\223\002)\"\026/subject-mappings/{id}:\017subject_ma" + - "pping\022\237\001\n\024DeleteSubjectMapping\0222.policy." + - "subjectmapping.DeleteSubjectMappingReque" + - "st\0323.policy.subjectmapping.DeleteSubject" + - "MappingResponse\"\036\202\323\344\223\002\030*\026/subject-mappin" + - "gs/{id}\022\254\001\n\030ListSubjectConditionSets\0226.p" + - "olicy.subjectmapping.ListSubjectConditio" + - "nSetsRequest\0327.policy.subjectmapping.Lis" + - "tSubjectConditionSetsResponse\"\037\202\323\344\223\002\031\022\027/" + - "subject-condition-sets\022\253\001\n\026GetSubjectCon" + - "ditionSet\0224.policy.subjectmapping.GetSub" + - "jectConditionSetRequest\0325.policy.subject" + - "mapping.GetSubjectConditionSetResponse\"$" + - "\202\323\344\223\002\036\022\034/subject-condition-sets/{id}\022\306\001\n" + - "\031CreateSubjectConditionSet\0227.policy.subj" + - "ectmapping.CreateSubjectConditionSetRequ" + - "est\0328.policy.subjectmapping.CreateSubjec" + - "tConditionSetResponse\"6\202\323\344\223\0020\"\027/subject-" + - "condition-sets:\025subject_condition_set\022\313\001" + - "\n\031UpdateSubjectConditionSet\0227.policy.sub" + - "jectmapping.UpdateSubjectConditionSetReq" + - "uest\0328.policy.subjectmapping.UpdateSubje" + - "ctConditionSetResponse\";\202\323\344\223\00252\034/subject" + - "-condition-sets/{id}:\025subject_condition_" + - "set\022\264\001\n\031DeleteSubjectConditionSet\0227.poli" + - "cy.subjectmapping.DeleteSubjectCondition" + - "SetRequest\0328.policy.subjectmapping.Delet" + - "eSubjectConditionSetResponse\"$\202\323\344\223\002\036*\034/s" + - "ubject-condition-sets/{id}B\364\001\n)io.opentd" + - "f.platform.policy.subjectmappingB\023Subjec" + - "tMappingProtoP\001Z=github.com/opentdf/plat" + - "form/protocol/go/policy/subjectmapping\242\002" + - "\003PSX\252\002\025Policy.Subjectmapping\312\002\025Policy\\Su" + - "bjectmapping\342\002!Policy\\Subjectmapping\\GPB" + - "Metadata\352\002\026Policy::Subjectmappingb\006proto" + - "3" + "itionSet\"\341\001\n\031SubjectConditionSetUpdate\022!" + + "\n\014updated_name\030\001 \001(\tR\013updatedName\022B\n\020upd" + + "ated_metadata\030\002 \001(\0132\027.common.MetadataMut" + + "ableR\017updatedMetadata\022]\n\024updated_subject" + + "_sets\030\003 \003(\0132!.policy.subjectmapping.Subj" + + "ectSetB\010\272H\005\222\001\002\010\001R\022updatedSubjectSets\"\240\001\n" + + " UpdateSubjectConditionSetRequest\022\026\n\002id\030" + + "\001 \001(\tB\006\272H\003\310\001\001R\002id\022d\n\025subject_condition_s" + + "et\030\002 \001(\01320.policy.subjectmapping.Subject" + + "ConditionSetUpdateR\023subjectConditionSet\"" + + "\203\001\n!UpdateSubjectConditionSetResponse\022^\n" + + "\025subject_condition_set\030\001 \001(\0132*.policy.su" + + "bjectmapping.SubjectConditionSetR\023subjec" + + "tConditionSet\":\n DeleteSubjectConditionS" + + "etRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\203\001\n!De" + + "leteSubjectConditionSetResponse\022^\n\025subje" + + "ct_condition_set\030\001 \001(\0132*.policy.subjectm" + + "apping.SubjectConditionSetR\023subjectCondi" + + "tionSet*\233\001\n\032SubjectMappingOperatorEnum\022-" + + "\n)SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIF" + + "IED\020\000\022$\n SUBJECT_MAPPING_OPERATOR_ENUM_I" + + "N\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_ENUM_NOT" + + "_IN\020\002*\220\001\n\030ConditionBooleanTypeEnum\022+\n\'CO" + + "NDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022" + + "#\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036" + + "CONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n\025Sub" + + "jectMappingService\022\251\001\n\024MatchSubjectMappi" + + "ngs\0222.policy.subjectmapping.MatchSubject" + + "MappingsRequest\0323.policy.subjectmapping." + + "MatchSubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/s" + + "ubject-mappings/match:\007subject\022\227\001\n\023ListS" + + "ubjectMappings\0221.policy.subjectmapping.L" + + "istSubjectMappingsRequest\0322.policy.subje" + + "ctmapping.ListSubjectMappingsResponse\"\031\202" + + "\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSubjectM" + + "apping\022/.policy.subjectmapping.GetSubjec" + + "tMappingRequest\0320.policy.subjectmapping." + + "GetSubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subj" + + "ect-mappings/{id}\022\235\001\n\024CreateSubjectMappi" + + "ng\0222.policy.subjectmapping.CreateSubject" + + "MappingRequest\0323.policy.subjectmapping.C" + + "reateSubjectMappingResponse\"\034\202\323\344\223\002\026\"\021/su" + + "bject-mappings:\001*\022\242\001\n\024UpdateSubjectMappi" + + "ng\0222.policy.subjectmapping.UpdateSubject" + + "MappingRequest\0323.policy.subjectmapping.U" + + "pdateSubjectMappingResponse\"!\202\323\344\223\002\0332\026/su" + + "bject-mappings/{id}:\001*\022\237\001\n\024DeleteSubject" + + "Mapping\0222.policy.subjectmapping.DeleteSu" + + "bjectMappingRequest\0323.policy.subjectmapp" + + "ing.DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030" + + "*\026/subject-mappings/{id}\022\254\001\n\030ListSubject" + + "ConditionSets\0226.policy.subjectmapping.Li" + + "stSubjectConditionSetsRequest\0327.policy.s" + + "ubjectmapping.ListSubjectConditionSetsRe" + + "sponse\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022" + + "\253\001\n\026GetSubjectConditionSet\0224.policy.subj" + + "ectmapping.GetSubjectConditionSetRequest" + + "\0325.policy.subjectmapping.GetSubjectCondi" + + "tionSetResponse\"$\202\323\344\223\002\036\022\034/subject-condit" + + "ion-sets/{id}\022\262\001\n\031CreateSubjectCondition" + + "Set\0227.policy.subjectmapping.CreateSubjec" + + "tConditionSetRequest\0328.policy.subjectmap" + + "ping.CreateSubjectConditionSetResponse\"\"" + + "\202\323\344\223\002\034\"\027/subject-condition-sets:\001*\022\267\001\n\031U" + + "pdateSubjectConditionSet\0227.policy.subjec" + + "tmapping.UpdateSubjectConditionSetReques" + + "t\0328.policy.subjectmapping.UpdateSubjectC" + + "onditionSetResponse\"\'\202\323\344\223\002!2\034/subject-co" + + "ndition-sets/{id}:\001*\022\264\001\n\031DeleteSubjectCo" + + "nditionSet\0227.policy.subjectmapping.Delet" + + "eSubjectConditionSetRequest\0328.policy.sub" + + "jectmapping.DeleteSubjectConditionSetRes" + + "ponse\"$\202\323\344\223\002\036*\034/subject-condition-sets/{" + + "id}B\364\001\n)io.opentdf.platform.policy.subje" + + "ctmappingB\023SubjectMappingProtoP\001Z=github" + + ".com/opentdf/platform/protocol/go/policy" + + "/subjectmapping\242\002\003PSX\252\002\025Policy.Subjectma" + + "pping\312\002\025Policy\\Subjectmapping\342\002!Policy\\S" + + "ubjectmapping\\GPBMetadata\352\002\026Policy::Subj" + + "ectmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -387,7 +370,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_ConditionGroup_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_ConditionGroup_descriptor, - new java.lang.String[] { "Conditions", "BooleanType", }); + new java.lang.String[] { "Conditions", "BooleanOperator", }); internal_static_policy_subjectmapping_SubjectSet_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_policy_subjectmapping_SubjectSet_fieldAccessorTable = new @@ -448,122 +431,110 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_ListSubjectMappingsResponse_descriptor, new java.lang.String[] { "SubjectMappings", }); - internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor = - getDescriptor().getMessageTypes().get(12); - internal_static_policy_subjectmapping_SubjectMappingCreate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_SubjectMappingCreate_descriptor, - new java.lang.String[] { "Metadata", "AttributeValueId", "ExistingSubjectConditionSetId", "NewSubjectConditionSet", "Actions", }); internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(13); + 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", }); + new java.lang.String[] { "Metadata", "AttributeValueId", "ExistingSubjectConditionSetId", "NewSubjectConditionSet", "Actions", }); internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(14); + 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_SubjectMappingUpdate_descriptor = - getDescriptor().getMessageTypes().get(15); - internal_static_policy_subjectmapping_SubjectMappingUpdate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor, - new java.lang.String[] { "UpdateMetadata", "UpdateSubjectConditionSetId", "UpdateActions", }); internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor = - getDescriptor().getMessageTypes().get(16); + 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", }); + new java.lang.String[] { "Id", "UpdateMetadata", "UpdateSubjectConditionSetId", "UpdateActions", }); internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor = - getDescriptor().getMessageTypes().get(17); + 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(18); + 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(19); + getDescriptor().getMessageTypes().get(17); internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor, new java.lang.String[] { "SubjectMapping", }); internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(20); + getDescriptor().getMessageTypes().get(18); internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor, new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(21); + getDescriptor().getMessageTypes().get(19); internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_GetSubjectConditionSetResponse_descriptor, new java.lang.String[] { "SubjectConditionSet", "AssociatedSubjectMappings", }); internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor = - getDescriptor().getMessageTypes().get(22); + getDescriptor().getMessageTypes().get(20); internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_ListSubjectConditionSetsRequest_descriptor, new java.lang.String[] { }); internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor = - getDescriptor().getMessageTypes().get(23); + getDescriptor().getMessageTypes().get(21); internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_ListSubjectConditionSetsResponse_descriptor, new java.lang.String[] { "SubjectConditionSets", }); internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor = - getDescriptor().getMessageTypes().get(24); + getDescriptor().getMessageTypes().get(22); internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor, new java.lang.String[] { "Metadata", "Name", "SubjectSets", }); internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(25); + getDescriptor().getMessageTypes().get(23); internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor, new java.lang.String[] { "SubjectConditionSet", }); internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(24); internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor, new java.lang.String[] { "SubjectConditionSet", }); internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(25); internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor, new java.lang.String[] { "UpdatedName", "UpdatedMetadata", "UpdatedSubjectSets", }); internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(26); internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor, new java.lang.String[] { "Id", "SubjectConditionSet", }); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(27); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor, new java.lang.String[] { "SubjectConditionSet", }); internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(30); + getDescriptor().getMessageTypes().get(28); internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor, new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(29); internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor, diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java deleted file mode 100644 index 5eda1b27a9..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdate.java +++ /dev/null @@ -1,1210 +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.SubjectMappingUpdate} - */ -public final class SubjectMappingUpdate extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectMappingUpdate) - SubjectMappingUpdateOrBuilder { -private static final long serialVersionUID = 0L; - // Use SubjectMappingUpdate.newBuilder() to construct. - private SubjectMappingUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubjectMappingUpdate() { - updateSubjectConditionSetId_ = ""; - updateActions_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubjectMappingUpdate(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder.class); - } - - private int bitField0_; - public static final int UPDATE_METADATA_FIELD_NUMBER = 2; - private io.opentdf.platform.common.MetadataMutable updateMetadata_; - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return Whether the updateMetadata field is set. - */ - @java.lang.Override - public boolean hasUpdateMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return The updateMetadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { - return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { - return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } - - public static final int UPDATE_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private volatile java.lang.Object updateSubjectConditionSetId_ = ""; - /** - *
    -   * Replaces the existing SubjectConditionSet id with a new one
    -   * 
    - * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The updateSubjectConditionSetId. - */ - @java.lang.Override - public java.lang.String getUpdateSubjectConditionSetId() { - java.lang.Object ref = updateSubjectConditionSetId_; - 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(); - updateSubjectConditionSetId_ = s; - return s; - } - } - /** - *
    -   * Replaces the existing SubjectConditionSet id with a new one
    -   * 
    - * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The bytes for updateSubjectConditionSetId. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUpdateSubjectConditionSetIdBytes() { - java.lang.Object ref = updateSubjectConditionSetId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updateSubjectConditionSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UPDATE_ACTIONS_FIELD_NUMBER = 5; - @SuppressWarnings("serial") - private java.util.List updateActions_; - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - @java.lang.Override - public java.util.List getUpdateActionsList() { - return updateActions_; - } - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - @java.lang.Override - public java.util.List - getUpdateActionsOrBuilderList() { - return updateActions_; - } - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - @java.lang.Override - public int getUpdateActionsCount() { - return updateActions_.size(); - } - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.Action getUpdateActions(int index) { - return updateActions_.get(index); - } - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - @java.lang.Override - public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( - int index) { - return updateActions_.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(2, getUpdateMetadata()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateSubjectConditionSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, updateSubjectConditionSetId_); - } - for (int i = 0; i < updateActions_.size(); i++) { - output.writeMessage(5, updateActions_.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(2, getUpdateMetadata()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateSubjectConditionSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, updateSubjectConditionSetId_); - } - for (int i = 0; i < updateActions_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, updateActions_.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.SubjectMappingUpdate)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate other = (io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate) obj; - - if (hasUpdateMetadata() != other.hasUpdateMetadata()) return false; - if (hasUpdateMetadata()) { - if (!getUpdateMetadata() - .equals(other.getUpdateMetadata())) return false; - } - if (!getUpdateSubjectConditionSetId() - .equals(other.getUpdateSubjectConditionSetId())) return false; - if (!getUpdateActionsList() - .equals(other.getUpdateActionsList())) 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 (hasUpdateMetadata()) { - hash = (37 * hash) + UPDATE_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMetadata().hashCode(); - } - hash = (37 * hash) + UPDATE_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getUpdateSubjectConditionSetId().hashCode(); - if (getUpdateActionsCount() > 0) { - hash = (37 * hash) + UPDATE_ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getUpdateActionsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate 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.SubjectMappingUpdate 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.SubjectMappingUpdate 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.SubjectMappingUpdate 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.SubjectMappingUpdate} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectMappingUpdate) - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getUpdateMetadataFieldBuilder(); - getUpdateActionsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updateMetadata_ = null; - if (updateMetadataBuilder_ != null) { - updateMetadataBuilder_.dispose(); - updateMetadataBuilder_ = null; - } - updateSubjectConditionSetId_ = ""; - if (updateActionsBuilder_ == null) { - updateActions_ = java.util.Collections.emptyList(); - } else { - updateActions_ = null; - updateActionsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectMappingUpdate_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate build() { - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate buildPartial() { - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate result = new io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate result) { - if (updateActionsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - updateActions_ = java.util.Collections.unmodifiableList(updateActions_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.updateActions_ = updateActions_; - } else { - result.updateActions_ = updateActionsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate result) { - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updateMetadata_ = updateMetadataBuilder_ == null - ? updateMetadata_ - : updateMetadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.updateSubjectConditionSetId_ = updateSubjectConditionSetId_; - } - 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.SubjectMappingUpdate) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate other) { - if (other == io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance()) return this; - if (other.hasUpdateMetadata()) { - mergeUpdateMetadata(other.getUpdateMetadata()); - } - if (!other.getUpdateSubjectConditionSetId().isEmpty()) { - updateSubjectConditionSetId_ = other.updateSubjectConditionSetId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (updateActionsBuilder_ == null) { - if (!other.updateActions_.isEmpty()) { - if (updateActions_.isEmpty()) { - updateActions_ = other.updateActions_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUpdateActionsIsMutable(); - updateActions_.addAll(other.updateActions_); - } - onChanged(); - } - } else { - if (!other.updateActions_.isEmpty()) { - if (updateActionsBuilder_.isEmpty()) { - updateActionsBuilder_.dispose(); - updateActionsBuilder_ = null; - updateActions_ = other.updateActions_; - bitField0_ = (bitField0_ & ~0x00000004); - updateActionsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getUpdateActionsFieldBuilder() : null; - } else { - updateActionsBuilder_.addAllMessages(other.updateActions_); - } - } - } - 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 18: { - input.readMessage( - getUpdateMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 18 - case 26: { - updateSubjectConditionSetId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 26 - case 42: { - io.opentdf.platform.authorization.Action m = - input.readMessage( - io.opentdf.platform.authorization.Action.parser(), - extensionRegistry); - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.add(m); - } else { - updateActionsBuilder_.addMessage(m); - } - break; - } // case 42 - 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 updateMetadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updateMetadataBuilder_; - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return Whether the updateMetadata field is set. - */ - public boolean hasUpdateMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return The updateMetadata. - */ - public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { - if (updateMetadataBuilder_ == null) { - return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } else { - return updateMetadataBuilder_.getMessage(); - } - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder setUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updateMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMetadata_ = value; - } else { - updateMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder setUpdateMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (updateMetadataBuilder_ == null) { - updateMetadata_ = builderForValue.build(); - } else { - updateMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder mergeUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updateMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - updateMetadata_ != null && - updateMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getUpdateMetadataBuilder().mergeFrom(value); - } else { - updateMetadata_ = value; - } - } else { - updateMetadataBuilder_.mergeFrom(value); - } - if (updateMetadata_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder clearUpdateMetadata() { - bitField0_ = (bitField0_ & ~0x00000001); - updateMetadata_ = null; - if (updateMetadataBuilder_ != null) { - updateMetadataBuilder_.dispose(); - updateMetadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getUpdateMetadataBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getUpdateMetadataFieldBuilder().getBuilder(); - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { - if (updateMetadataBuilder_ != null) { - return updateMetadataBuilder_.getMessageOrBuilder(); - } else { - return updateMetadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getUpdateMetadataFieldBuilder() { - if (updateMetadataBuilder_ == null) { - updateMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getUpdateMetadata(), - getParentForChildren(), - isClean()); - updateMetadata_ = null; - } - return updateMetadataBuilder_; - } - - private java.lang.Object updateSubjectConditionSetId_ = ""; - /** - *
    -     * Replaces the existing SubjectConditionSet id with a new one
    -     * 
    - * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The updateSubjectConditionSetId. - */ - public java.lang.String getUpdateSubjectConditionSetId() { - java.lang.Object ref = updateSubjectConditionSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - updateSubjectConditionSetId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -     * Replaces the existing SubjectConditionSet id with a new one
    -     * 
    - * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The bytes for updateSubjectConditionSetId. - */ - public com.google.protobuf.ByteString - getUpdateSubjectConditionSetIdBytes() { - java.lang.Object ref = updateSubjectConditionSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updateSubjectConditionSetId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -     * Replaces the existing SubjectConditionSet id with a new one
    -     * 
    - * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @param value The updateSubjectConditionSetId to set. - * @return This builder for chaining. - */ - public Builder setUpdateSubjectConditionSetId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - updateSubjectConditionSetId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
    -     * Replaces the existing SubjectConditionSet id with a new one
    -     * 
    - * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return This builder for chaining. - */ - public Builder clearUpdateSubjectConditionSetId() { - updateSubjectConditionSetId_ = getDefaultInstance().getUpdateSubjectConditionSetId(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
    -     * Replaces the existing SubjectConditionSet id with a new one
    -     * 
    - * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @param value The bytes for updateSubjectConditionSetId to set. - * @return This builder for chaining. - */ - public Builder setUpdateSubjectConditionSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - updateSubjectConditionSetId_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - - private java.util.List updateActions_ = - java.util.Collections.emptyList(); - private void ensureUpdateActionsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - updateActions_ = new java.util.ArrayList(updateActions_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> updateActionsBuilder_; - - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public java.util.List getUpdateActionsList() { - if (updateActionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(updateActions_); - } else { - return updateActionsBuilder_.getMessageList(); - } - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public int getUpdateActionsCount() { - if (updateActionsBuilder_ == null) { - return updateActions_.size(); - } else { - return updateActionsBuilder_.getCount(); - } - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public io.opentdf.platform.authorization.Action getUpdateActions(int index) { - if (updateActionsBuilder_ == null) { - return updateActions_.get(index); - } else { - return updateActionsBuilder_.getMessage(index); - } - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public Builder setUpdateActions( - int index, io.opentdf.platform.authorization.Action value) { - if (updateActionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUpdateActionsIsMutable(); - updateActions_.set(index, value); - onChanged(); - } else { - updateActionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public Builder setUpdateActions( - int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.set(index, builderForValue.build()); - onChanged(); - } else { - updateActionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public Builder addUpdateActions(io.opentdf.platform.authorization.Action value) { - if (updateActionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUpdateActionsIsMutable(); - updateActions_.add(value); - onChanged(); - } else { - updateActionsBuilder_.addMessage(value); - } - return this; - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public Builder addUpdateActions( - int index, io.opentdf.platform.authorization.Action value) { - if (updateActionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUpdateActionsIsMutable(); - updateActions_.add(index, value); - onChanged(); - } else { - updateActionsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public Builder addUpdateActions( - io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.add(builderForValue.build()); - onChanged(); - } else { - updateActionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public Builder addUpdateActions( - int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.add(index, builderForValue.build()); - onChanged(); - } else { - updateActionsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public Builder addAllUpdateActions( - java.lang.Iterable values) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, updateActions_); - onChanged(); - } else { - updateActionsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public Builder clearUpdateActions() { - if (updateActionsBuilder_ == null) { - updateActions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - updateActionsBuilder_.clear(); - } - return this; - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public Builder removeUpdateActions(int index) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.remove(index); - onChanged(); - } else { - updateActionsBuilder_.remove(index); - } - return this; - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public io.opentdf.platform.authorization.Action.Builder getUpdateActionsBuilder( - int index) { - return getUpdateActionsFieldBuilder().getBuilder(index); - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( - int index) { - if (updateActionsBuilder_ == null) { - return updateActions_.get(index); } else { - return updateActionsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public java.util.List - getUpdateActionsOrBuilderList() { - if (updateActionsBuilder_ != null) { - return updateActionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(updateActions_); - } - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder() { - return getUpdateActionsFieldBuilder().addBuilder( - io.opentdf.platform.authorization.Action.getDefaultInstance()); - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder( - int index) { - return getUpdateActionsFieldBuilder().addBuilder( - index, io.opentdf.platform.authorization.Action.getDefaultInstance()); - } - /** - *
    -     * Replaces entire list of actions permitted by subjects
    -     * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - public java.util.List - getUpdateActionsBuilderList() { - return getUpdateActionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> - getUpdateActionsFieldBuilder() { - if (updateActionsBuilder_ == null) { - updateActionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( - updateActions_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - updateActions_ = null; - } - return updateActionsBuilder_; - } - @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.SubjectMappingUpdate) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectMappingUpdate) - private static final io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate(); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubjectMappingUpdate 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.SubjectMappingUpdate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java deleted file mode 100644 index 7dddbc0155..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectMappingUpdateOrBuilder.java +++ /dev/null @@ -1,89 +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 SubjectMappingUpdateOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectMappingUpdate) - com.google.protobuf.MessageOrBuilder { - - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return Whether the updateMetadata field is set. - */ - boolean hasUpdateMetadata(); - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return The updateMetadata. - */ - io.opentdf.platform.common.MetadataMutable getUpdateMetadata(); - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder(); - - /** - *
    -   * Replaces the existing SubjectConditionSet id with a new one
    -   * 
    - * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The updateSubjectConditionSetId. - */ - java.lang.String getUpdateSubjectConditionSetId(); - /** - *
    -   * Replaces the existing SubjectConditionSet id with a new one
    -   * 
    - * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The bytes for updateSubjectConditionSetId. - */ - com.google.protobuf.ByteString - getUpdateSubjectConditionSetIdBytes(); - - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - java.util.List - getUpdateActionsList(); - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - io.opentdf.platform.authorization.Action getUpdateActions(int index); - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - int getUpdateActionsCount(); - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - java.util.List - getUpdateActionsOrBuilderList(); - /** - *
    -   * Replaces entire list of actions permitted by subjects
    -   * 
    - * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; - */ - io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( - int index); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java index 26525202b8..1ebe5fecd1 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java @@ -18,6 +18,8 @@ private UpdateSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Build } private UpdateSubjectMappingRequest() { id_ = ""; + updateSubjectConditionSetId_ = ""; + updateActions_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -80,30 +82,138 @@ public java.lang.String getId() { } } - public static final int SUBJECT_MAPPING_FIELD_NUMBER = 2; - private io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate subjectMapping_; + public static final int UPDATE_METADATA_FIELD_NUMBER = 2; + private io.opentdf.platform.common.MetadataMutable updateMetadata_; /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return Whether the updateMetadata field is set. */ @java.lang.Override - public boolean hasSubjectMapping() { + public boolean hasUpdateMetadata() { return ((bitField0_ & 0x00000001) != 0); } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; - * @return The subjectMapping. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return The updateMetadata. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { + return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { + return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; + } + + public static final int UPDATE_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object updateSubjectConditionSetId_ = ""; + /** + *
    +   * Replaces the existing SubjectConditionSet id with a new one
    +   * 
    + * + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The updateSubjectConditionSetId. + */ + @java.lang.Override + public java.lang.String getUpdateSubjectConditionSetId() { + java.lang.Object ref = updateSubjectConditionSetId_; + 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(); + updateSubjectConditionSetId_ = s; + return s; + } + } + /** + *
    +   * Replaces the existing SubjectConditionSet id with a new one
    +   * 
    + * + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The bytes for updateSubjectConditionSetId. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpdateSubjectConditionSetIdBytes() { + java.lang.Object ref = updateSubjectConditionSetId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPDATE_ACTIONS_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private java.util.List updateActions_; + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + @java.lang.Override + public java.util.List getUpdateActionsList() { + return updateActions_; + } + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + @java.lang.Override + public java.util.List + getUpdateActionsOrBuilderList() { + return updateActions_; + } + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + @java.lang.Override + public int getUpdateActionsCount() { + return updateActions_.size(); + } + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.Action getUpdateActions(int index) { + return updateActions_.get(index); + } + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + @java.lang.Override + public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( + int index) { + return updateActions_.get(index); } private byte memoizedIsInitialized = -1; @@ -124,7 +234,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getSubjectMapping()); + output.writeMessage(2, getUpdateMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateSubjectConditionSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, updateSubjectConditionSetId_); + } + for (int i = 0; i < updateActions_.size(); i++) { + output.writeMessage(5, updateActions_.get(i)); } getUnknownFields().writeTo(output); } @@ -140,7 +256,14 @@ public int getSerializedSize() { } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSubjectMapping()); + .computeMessageSize(2, getUpdateMetadata()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateSubjectConditionSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, updateSubjectConditionSetId_); + } + for (int i = 0; i < updateActions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, updateActions_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -159,11 +282,15 @@ public boolean equals(final java.lang.Object obj) { if (!getId() .equals(other.getId())) return false; - if (hasSubjectMapping() != other.hasSubjectMapping()) return false; - if (hasSubjectMapping()) { - if (!getSubjectMapping() - .equals(other.getSubjectMapping())) return false; + if (hasUpdateMetadata() != other.hasUpdateMetadata()) return false; + if (hasUpdateMetadata()) { + if (!getUpdateMetadata() + .equals(other.getUpdateMetadata())) return false; } + if (!getUpdateSubjectConditionSetId() + .equals(other.getUpdateSubjectConditionSetId())) return false; + if (!getUpdateActionsList() + .equals(other.getUpdateActionsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -177,9 +304,15 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); - if (hasSubjectMapping()) { - hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMapping().hashCode(); + if (hasUpdateMetadata()) { + hash = (37 * hash) + UPDATE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMetadata().hashCode(); + } + hash = (37 * hash) + UPDATE_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getUpdateSubjectConditionSetId().hashCode(); + if (getUpdateActionsCount() > 0) { + hash = (37 * hash) + UPDATE_ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getUpdateActionsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -311,7 +444,8 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getSubjectMappingFieldBuilder(); + getUpdateMetadataFieldBuilder(); + getUpdateActionsFieldBuilder(); } } @java.lang.Override @@ -319,11 +453,19 @@ public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; + updateMetadata_ = null; + if (updateMetadataBuilder_ != null) { + updateMetadataBuilder_.dispose(); + updateMetadataBuilder_ = null; } + updateSubjectConditionSetId_ = ""; + if (updateActionsBuilder_ == null) { + updateActions_ = java.util.Collections.emptyList(); + } else { + updateActions_ = null; + updateActionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -350,11 +492,24 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest bui @java.lang.Override public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest buildPartial() { io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result) { + if (updateActionsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + updateActions_ = java.util.Collections.unmodifiableList(updateActions_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.updateActions_ = updateActions_; + } else { + result.updateActions_ = updateActionsBuilder_.build(); + } + } + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { @@ -362,11 +517,14 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubje } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { - result.subjectMapping_ = subjectMappingBuilder_ == null - ? subjectMapping_ - : subjectMappingBuilder_.build(); + result.updateMetadata_ = updateMetadataBuilder_ == null + ? updateMetadata_ + : updateMetadataBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateSubjectConditionSetId_ = updateSubjectConditionSetId_; + } result.bitField0_ |= to_bitField0_; } @@ -419,8 +577,39 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject bitField0_ |= 0x00000001; onChanged(); } - if (other.hasSubjectMapping()) { - mergeSubjectMapping(other.getSubjectMapping()); + if (other.hasUpdateMetadata()) { + mergeUpdateMetadata(other.getUpdateMetadata()); + } + if (!other.getUpdateSubjectConditionSetId().isEmpty()) { + updateSubjectConditionSetId_ = other.updateSubjectConditionSetId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (updateActionsBuilder_ == null) { + if (!other.updateActions_.isEmpty()) { + if (updateActions_.isEmpty()) { + updateActions_ = other.updateActions_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureUpdateActionsIsMutable(); + updateActions_.addAll(other.updateActions_); + } + onChanged(); + } + } else { + if (!other.updateActions_.isEmpty()) { + if (updateActionsBuilder_.isEmpty()) { + updateActionsBuilder_.dispose(); + updateActionsBuilder_ = null; + updateActions_ = other.updateActions_; + bitField0_ = (bitField0_ & ~0x00000008); + updateActionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUpdateActionsFieldBuilder() : null; + } else { + updateActionsBuilder_.addAllMessages(other.updateActions_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -455,11 +644,29 @@ public Builder mergeFrom( } // case 10 case 18: { input.readMessage( - getSubjectMappingFieldBuilder().getBuilder(), + getUpdateMetadataFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 + case 26: { + updateSubjectConditionSetId_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 42: { + io.opentdf.platform.authorization.Action m = + input.readMessage( + io.opentdf.platform.authorization.Action.parser(), + extensionRegistry); + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.add(m); + } else { + updateActionsBuilder_.addMessage(m); + } + break; + } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -549,125 +756,529 @@ public Builder setIdBytes( return this; } - private io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate subjectMapping_; + private io.opentdf.platform.common.MetadataMutable updateMetadata_; private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder> subjectMappingBuilder_; + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updateMetadataBuilder_; /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return Whether the updateMetadata field is set. */ - public boolean hasSubjectMapping() { + public boolean hasUpdateMetadata() { return ((bitField0_ & 0x00000002) != 0); } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; - * @return The subjectMapping. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return The updateMetadata. */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getSubjectMapping() { - if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance() : subjectMapping_; + public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { + if (updateMetadataBuilder_ == null) { + return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } else { - return subjectMappingBuilder_.getMessage(); + return updateMetadataBuilder_.getMessage(); } } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate value) { - if (subjectMappingBuilder_ == null) { + public Builder setUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updateMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - subjectMapping_ = value; + updateMetadata_ = value; } else { - subjectMappingBuilder_.setMessage(value); + updateMetadataBuilder_.setMessage(value); } bitField0_ |= 0x00000002; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public Builder setSubjectMapping( - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder builderForValue) { - if (subjectMappingBuilder_ == null) { - subjectMapping_ = builderForValue.build(); + public Builder setUpdateMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (updateMetadataBuilder_ == null) { + updateMetadata_ = builderForValue.build(); } else { - subjectMappingBuilder_.setMessage(builderForValue.build()); + updateMetadataBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000002; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate value) { - if (subjectMappingBuilder_ == null) { + public Builder mergeUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updateMetadataBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0) && - subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance()) { - getSubjectMappingBuilder().mergeFrom(value); + updateMetadata_ != null && + updateMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getUpdateMetadataBuilder().mergeFrom(value); } else { - subjectMapping_ = value; + updateMetadata_ = value; } } else { - subjectMappingBuilder_.mergeFrom(value); + updateMetadataBuilder_.mergeFrom(value); } - if (subjectMapping_ != null) { + if (updateMetadata_ != null) { bitField0_ |= 0x00000002; onChanged(); } return this; } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public Builder clearSubjectMapping() { + public Builder clearUpdateMetadata() { bitField0_ = (bitField0_ & ~0x00000002); - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; + updateMetadata_ = null; + if (updateMetadataBuilder_ != null) { + updateMetadataBuilder_.dispose(); + updateMetadataBuilder_ = null; } onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder getSubjectMappingBuilder() { + public io.opentdf.platform.common.MetadataMutable.Builder getUpdateMetadataBuilder() { bitField0_ |= 0x00000002; onChanged(); - return getSubjectMappingFieldBuilder().getBuilder(); + return getUpdateMetadataFieldBuilder().getBuilder(); } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder getSubjectMappingOrBuilder() { - if (subjectMappingBuilder_ != null) { - return subjectMappingBuilder_.getMessageOrBuilder(); + public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { + if (updateMetadataBuilder_ != null) { + return updateMetadataBuilder_.getMessageOrBuilder(); } else { - return subjectMapping_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.getDefaultInstance() : subjectMapping_; + return updateMetadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } } /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder> - getSubjectMappingFieldBuilder() { - if (subjectMappingBuilder_ == null) { - subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder>( - getSubjectMapping(), + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getUpdateMetadataFieldBuilder() { + if (updateMetadataBuilder_ == null) { + updateMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getUpdateMetadata(), + getParentForChildren(), + isClean()); + updateMetadata_ = null; + } + return updateMetadataBuilder_; + } + + private java.lang.Object updateSubjectConditionSetId_ = ""; + /** + *
    +     * Replaces the existing SubjectConditionSet id with a new one
    +     * 
    + * + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The updateSubjectConditionSetId. + */ + public java.lang.String getUpdateSubjectConditionSetId() { + java.lang.Object ref = updateSubjectConditionSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateSubjectConditionSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +     * Replaces the existing SubjectConditionSet id with a new one
    +     * 
    + * + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The bytes for updateSubjectConditionSetId. + */ + public com.google.protobuf.ByteString + getUpdateSubjectConditionSetIdBytes() { + java.lang.Object ref = updateSubjectConditionSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +     * Replaces the existing SubjectConditionSet id with a new one
    +     * 
    + * + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @param value The updateSubjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setUpdateSubjectConditionSetId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + updateSubjectConditionSetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
    +     * Replaces the existing SubjectConditionSet id with a new one
    +     * 
    + * + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return This builder for chaining. + */ + public Builder clearUpdateSubjectConditionSetId() { + updateSubjectConditionSetId_ = getDefaultInstance().getUpdateSubjectConditionSetId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
    +     * Replaces the existing SubjectConditionSet id with a new one
    +     * 
    + * + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @param value The bytes for updateSubjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setUpdateSubjectConditionSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + updateSubjectConditionSetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private java.util.List updateActions_ = + java.util.Collections.emptyList(); + private void ensureUpdateActionsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + updateActions_ = new java.util.ArrayList(updateActions_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> updateActionsBuilder_; + + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public java.util.List getUpdateActionsList() { + if (updateActionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(updateActions_); + } else { + return updateActionsBuilder_.getMessageList(); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public int getUpdateActionsCount() { + if (updateActionsBuilder_ == null) { + return updateActions_.size(); + } else { + return updateActionsBuilder_.getCount(); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public io.opentdf.platform.authorization.Action getUpdateActions(int index) { + if (updateActionsBuilder_ == null) { + return updateActions_.get(index); + } else { + return updateActionsBuilder_.getMessage(index); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public Builder setUpdateActions( + int index, io.opentdf.platform.authorization.Action value) { + if (updateActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdateActionsIsMutable(); + updateActions_.set(index, value); + onChanged(); + } else { + updateActionsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public Builder setUpdateActions( + int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.set(index, builderForValue.build()); + onChanged(); + } else { + updateActionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public Builder addUpdateActions(io.opentdf.platform.authorization.Action value) { + if (updateActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdateActionsIsMutable(); + updateActions_.add(value); + onChanged(); + } else { + updateActionsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public Builder addUpdateActions( + int index, io.opentdf.platform.authorization.Action value) { + if (updateActionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdateActionsIsMutable(); + updateActions_.add(index, value); + onChanged(); + } else { + updateActionsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public Builder addUpdateActions( + io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.add(builderForValue.build()); + onChanged(); + } else { + updateActionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public Builder addUpdateActions( + int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.add(index, builderForValue.build()); + onChanged(); + } else { + updateActionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public Builder addAllUpdateActions( + java.lang.Iterable values) { + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, updateActions_); + onChanged(); + } else { + updateActionsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public Builder clearUpdateActions() { + if (updateActionsBuilder_ == null) { + updateActions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + updateActionsBuilder_.clear(); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public Builder removeUpdateActions(int index) { + if (updateActionsBuilder_ == null) { + ensureUpdateActionsIsMutable(); + updateActions_.remove(index); + onChanged(); + } else { + updateActionsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public io.opentdf.platform.authorization.Action.Builder getUpdateActionsBuilder( + int index) { + return getUpdateActionsFieldBuilder().getBuilder(index); + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( + int index) { + if (updateActionsBuilder_ == null) { + return updateActions_.get(index); } else { + return updateActionsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public java.util.List + getUpdateActionsOrBuilderList() { + if (updateActionsBuilder_ != null) { + return updateActionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(updateActions_); + } + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder() { + return getUpdateActionsFieldBuilder().addBuilder( + io.opentdf.platform.authorization.Action.getDefaultInstance()); + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder( + int index) { + return getUpdateActionsFieldBuilder().addBuilder( + index, io.opentdf.platform.authorization.Action.getDefaultInstance()); + } + /** + *
    +     * Replaces entire list of actions permitted by subjects
    +     * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + public java.util.List + getUpdateActionsBuilderList() { + return getUpdateActionsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> + getUpdateActionsFieldBuilder() { + if (updateActionsBuilder_ == null) { + updateActionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( + updateActions_, + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - subjectMapping_ = null; + updateActions_ = null; } - return subjectMappingBuilder_; + return updateActionsBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java index 504313af16..ae0faefcb1 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java @@ -21,17 +21,81 @@ public interface UpdateSubjectMappingRequestOrBuilder extends getIdBytes(); /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return Whether the updateMetadata field is set. */ - boolean hasSubjectMapping(); + boolean hasUpdateMetadata(); /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; - * @return The subjectMapping. + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; + * @return The updateMetadata. */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdate getSubjectMapping(); + io.opentdf.platform.common.MetadataMutable getUpdateMetadata(); /** - * .policy.subjectmapping.SubjectMappingUpdate subject_mapping = 2 [json_name = "subjectMapping"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingUpdateOrBuilder getSubjectMappingOrBuilder(); + io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder(); + + /** + *
    +   * Replaces the existing SubjectConditionSet id with a new one
    +   * 
    + * + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The updateSubjectConditionSetId. + */ + java.lang.String getUpdateSubjectConditionSetId(); + /** + *
    +   * Replaces the existing SubjectConditionSet id with a new one
    +   * 
    + * + * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * @return The bytes for updateSubjectConditionSetId. + */ + com.google.protobuf.ByteString + getUpdateSubjectConditionSetIdBytes(); + + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + java.util.List + getUpdateActionsList(); + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + io.opentdf.platform.authorization.Action getUpdateActions(int index); + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + int getUpdateActionsCount(); + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + java.util.List + getUpdateActionsOrBuilderList(); + /** + *
    +   * Replaces entire list of actions permitted by subjects
    +   * 
    + * + * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + */ + io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( + int index); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java index 58e18d3d78..2450db3e20 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java @@ -5,11 +5,6 @@ package io.opentdf.platform.policy.subjectmapping; /** - *
    - * `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}`
    - * '{"subject_mapping":{//everything}}'
    - * 
    - * * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingResponse} */ public final class UpdateSubjectMappingResponse extends @@ -234,11 +229,6 @@ protected Builder newBuilderForType( return builder; } /** - *
    -   * `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}`
    -   * '{"subject_mapping":{//everything}}'
    -   * 
    - * * Protobuf type {@code policy.subjectmapping.UpdateSubjectMappingResponse} */ public static final class Builder extends diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index f88fbc9f26..8c64aa3e18 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -2,6 +2,7 @@ package db import ( "context" + "database/sql" "encoding/json" "errors" "fmt" @@ -17,7 +18,8 @@ import ( "google.golang.org/protobuf/encoding/protojson" ) -func MarshalSubjectSetsIntoCondition(subjectSet []*subjectmapping.SubjectSet) ([]byte, error) { +// Helper to marshal SubjectSets into JSON (stored as JSONB in the database column) +func marshalSubjectSetsProto(subjectSet []*subjectmapping.SubjectSet) ([]byte, error) { var raw []json.RawMessage for _, ss := range subjectSet { b, err := protojson.Marshal(ss) @@ -29,24 +31,27 @@ func MarshalSubjectSetsIntoCondition(subjectSet []*subjectmapping.SubjectSet) ([ return json.Marshal(raw) } -func UnmarshalSubjectSetsFromCondition(condition []byte) ([]*subjectmapping.SubjectSet, error) { +// Helper to unmarshal SubjectSets from JSON (stored as JSONB in the database column) +func unmarshalSubjectSetsProto(conditionJSON []byte) ([]*subjectmapping.SubjectSet, error) { var raw []json.RawMessage - if err := json.Unmarshal(condition, &raw); err != nil { + if err := json.Unmarshal(conditionJSON, &raw); err != nil { return nil, err } - var subjectSets []*subjectmapping.SubjectSet + var ss []*subjectmapping.SubjectSet for _, r := range raw { - var ss subjectmapping.SubjectSet - if err := protojson.Unmarshal(r, &ss); err != nil { + var s subjectmapping.SubjectSet + if err := protojson.Unmarshal(r, &s); err != nil { return nil, err } - subjectSets = append(subjectSets, &ss) + ss = append(ss, &s) } - return subjectSets, nil + + return ss, nil } -func MarshalActionsProto(actions []*authorization.Action) ([]byte, error) { +// Helper to marshal Actions into JSON (stored as JSONB in the database column) +func marshalActionsProto(actions []*authorization.Action) ([]byte, error) { var raw []json.RawMessage for _, a := range actions { b, err := protojson.Marshal(a) @@ -58,7 +63,7 @@ func MarshalActionsProto(actions []*authorization.Action) ([]byte, error) { return json.Marshal(raw) } -func UnmarshalActionsProto(actions []byte) ([]*authorization.Action, error) { +func unmarshalActionsProto(actions []byte) ([]*authorization.Action, error) { var raw []json.RawMessage if err := json.Unmarshal(actions, &raw); err != nil { return nil, err @@ -88,7 +93,7 @@ func subjectConditionSetSelect() sq.SelectBuilder { func subjectConditionSetHydrateItem(row pgx.Row) (*subjectmapping.SubjectConditionSet, error) { var ( id string - name string + name sql.NullString metadata []byte condition []byte ) @@ -114,14 +119,14 @@ func subjectConditionSetHydrateItem(row pgx.Row) (*subjectmapping.SubjectConditi } } - ss, err := UnmarshalSubjectSetsFromCondition(condition) + ss, err := unmarshalSubjectSetsProto(condition) if err != nil { return nil, err } return &subjectmapping.SubjectConditionSet{ Id: id, - Name: name, + Name: name.String, SubjectSets: ss, Metadata: m, }, nil @@ -141,82 +146,90 @@ func subjectConditionSetHydrateList(rows pgx.Rows) ([]*subjectmapping.SubjectCon func subjectMappingSelect() sq.SelectBuilder { t := db.Tables.SubjectMappings - aT := db.Tables.AttributeValues - ssT := db.Tables.SubjectConditionSet + avT := db.Tables.AttributeValues + scsT := db.Tables.SubjectConditionSet return db.NewStatementBuilder().Select( t.Field("id"), t.Field("actions"), t.Field("metadata"), - ssT.Field("condition"), "JSON_BUILD_OBJECT("+ - "'id', "+aT.Field("id")+", "+ - "'value', "+aT.Field("value")+", "+ - "'members', "+aT.Field("members")+ + "'id', "+scsT.Field("id")+", "+ + "'name', "+scsT.Field("name")+", "+ + "'metadata', "+scsT.Field("metadata")+", "+ + "'subject_sets', "+scsT.Field("condition")+ + ") AS subject_condition_set", + // TODO: verify we don't need more info about the attribute value here on the JOIN here + "JSON_BUILD_OBJECT("+ + "'id', "+avT.Field("id")+", "+ + "'value', "+avT.Field("value")+", "+ + "'members', "+avT.Field("members")+ ") AS attribute_value", ). - LeftJoin(aT.Name() + " ON " + t.Field("attribute_value_id") + " = " + aT.Field("id")). - LeftJoin(ssT.Name() + " ON " + ssT.Field("id") + " = " + t.Field("subject_condition_set_id")). + LeftJoin(avT.Name() + " ON " + t.Field("attribute_value_id") + " = " + avT.Field("id")). + LeftJoin(scsT.Name() + " ON " + scsT.Field("id") + " = " + t.Field("subject_condition_set_id")). GroupBy(t.Field("id")). - GroupBy(aT.Field("id")) + GroupBy(avT.Field("id")). + GroupBy(scsT.Field("id")) } func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, error) { var ( - id string - actions []byte - metadataJson []byte - smConditionSetsJson []byte - attributeValueJson []byte + id string + actions []byte + metadataJSON []byte + scsJSON []byte + attributeValueJSON []byte ) err := row.Scan( &id, &actions, - &metadataJson, - &smConditionSetsJson, - &attributeValueJson, + &metadataJSON, + &scsJSON, + &attributeValueJSON, ) if err != nil { return nil, db.WrapIfKnownInvalidQueryErr(err) } m := &common.Metadata{} - if metadataJson != nil { - if err := protojson.Unmarshal(metadataJson, m); err != nil { + if metadataJSON != nil { + if err := protojson.Unmarshal(metadataJSON, m); err != nil { return nil, err } } v := &attributes.Value{} - if attributeValueJson != nil { - if err := protojson.Unmarshal(attributeValueJson, v); err != nil { + if attributeValueJSON != nil { + if err := protojson.Unmarshal(attributeValueJSON, v); err != nil { return nil, err } } - a, err := UnmarshalActionsProto(actions) + a, err := unmarshalActionsProto(actions) if err != nil { return nil, err } - s := &subjectmapping.SubjectMapping{ - Id: id, - Metadata: m, - AttributeValue: v, - // FIXME - SubjectConditionSet: &subjectmapping.SubjectConditionSet{}, - Actions: a, + var scs *subjectmapping.SubjectConditionSet + var raw json.RawMessage + if scsJSON != nil { + if err := json.Unmarshal(scsJSON, &raw); err != nil { + return nil, err + } + if err := protojson.Unmarshal(raw, scs); err != nil { + return nil, err + } } - // FIXME - // add operator - s.Actions = append(s.Actions, &authorization.Action{}) - // add subjectAttributeValues - // s.SubjectSets = append(s.SubjectSets, &subjectmapping.SubjectSet{ - // ConditionGroups: make([]*subjectmapping.ConditionGroup, 0), - // }) - return s, nil + return &subjectmapping.SubjectMapping{ + Id: id, + Metadata: m, + AttributeValue: v, + SubjectConditionSet: scs, + Actions: a, + }, nil } func subjectMappingHydrateList(rows pgx.Rows) ([]*subjectmapping.SubjectMapping, error) { @@ -231,9 +244,9 @@ func subjectMappingHydrateList(rows pgx.Rows) ([]*subjectmapping.SubjectMapping, return list, nil } -func createSubjectConditionSetSql(subSets []*subjectmapping.SubjectSet, metadataJSON []byte, name string) (string, []interface{}, error) { +func createSubjectConditionSetSql(subjectSets []*subjectmapping.SubjectSet, metadataJSON []byte, name string) (string, []interface{}, error) { t := db.Tables.SubjectConditionSet - conditionJSON, err := MarshalSubjectSetsIntoCondition(subSets) + conditionJSON, err := marshalSubjectSetsProto(subjectSets) if err != nil { return "", nil, err } @@ -286,13 +299,12 @@ func getSubjectConditionSetSql(id string, name string) (string, []interface{}, e From(t.Name()) if id != "" { - sb = sb.Where(sq.Eq{t.Field("id"): id}) + return sb.Where(sq.Eq{t.Field("id"): id}).ToSql() } if name != "" { - sb = sb.Where(sq.Eq{t.Field("name"): name}) + return sb.Where(sq.Eq{t.Field("name"): name}).ToSql() } - return sb. - ToSql() + return "", nil, errors.Join(db.ErrMissingRequiredValue, errors.New("error: Subject Condition Set id or name must be provided")) } func (c PolicyDbClient) GetSubjectConditionSet(ctx context.Context, id string, name string) (*subjectmapping.SubjectConditionSet, error) { @@ -326,6 +338,7 @@ func (c PolicyDbClient) ListSubjectConditionSets(ctx context.Context) ([]*subjec if err != nil { return nil, err } + defer rows.Close() return subjectConditionSetHydrateList(rows) } @@ -348,20 +361,18 @@ func updateSubjectConditionSetSql(id string, name string, metadata []byte, condi sb = sb.Set("condition", condition) } return sb. - Where(sq.Eq{"id": id}). + Where(sq.Eq{t.Field("id"): id}). ToSql() } func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string, s *subjectmapping.SubjectConditionSetUpdate) (*subjectmapping.SubjectConditionSet, error) { var ( - prev *subjectmapping.SubjectConditionSet - err error - metadataJSON []byte - subjectSets []*subjectmapping.SubjectSet - condition []byte + subjectSets []*subjectmapping.SubjectSet + condition []byte ) - prev, err = c.GetSubjectConditionSet(ctx, id, "") + // While an SCS can be retrieved by 'name', an 'id' is required to update one + prev, err := c.GetSubjectConditionSet(ctx, id, "") if err != nil { return nil, err } @@ -373,7 +384,7 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string if s.UpdatedSubjectSets != nil { subjectSets = s.UpdatedSubjectSets - condition, err = MarshalSubjectSetsIntoCondition(subjectSets) + condition, err = marshalSubjectSetsProto(subjectSets) if err != nil { return nil, err } @@ -393,8 +404,8 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string return &subjectmapping.SubjectConditionSet{ Id: id, Name: s.UpdatedName, - SubjectSets: subjectSets, Metadata: metadata, + SubjectSets: subjectSets, }, nil } @@ -402,7 +413,7 @@ func deleteSubjectConditionSetSql(id string) (string, []interface{}, error) { t := db.Tables.SubjectConditionSet return db.NewStatementBuilder(). Delete(t.Name()). - Where(sq.Eq{"id": id}). + Where(sq.Eq{t.Field("id"): id}). ToSql() } @@ -450,10 +461,8 @@ func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.SubjectMappingCreate) (*subjectmapping.SubjectMapping, error) { var ( - scs *subjectmapping.SubjectConditionSet - err error - actionsJSON []byte - metadataJSON []byte + scs *subjectmapping.SubjectConditionSet + err error ) // Prefer existing id over new creation per documented proto behavior. @@ -477,7 +486,10 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp if err != nil { return nil, err } - actionsJSON, err = MarshalActionsProto(s.Actions) + if s.Actions == nil { + return nil, errors.Join(db.ErrMissingRequiredValue) + } + actionsJSON, err := marshalActionsProto(s.Actions) if err != nil { return nil, err } @@ -497,7 +509,7 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp return nil, db.WrapIfKnownInvalidQueryErr(err) } - a, err := c.GetAttributeValue(ctx, s.AttributeValueId) + av, err := c.GetAttributeValue(ctx, s.AttributeValueId) if err != nil { return nil, err } @@ -505,7 +517,7 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp sm := &subjectmapping.SubjectMapping{ Id: id, Metadata: metadata, - AttributeValue: a, + AttributeValue: av, SubjectConditionSet: scs, Actions: s.Actions, } @@ -522,6 +534,7 @@ func getSubjectMappingSql(id string) (string, []interface{}, error) { func (c PolicyDbClient) GetSubjectMapping(ctx context.Context, id string) (*subjectmapping.SubjectMapping, error) { sql, args, err := getSubjectMappingSql(id) + fmt.Println("sql", sql, "args", args, "err", err) row, err := c.QueryRow(ctx, sql, args, err) if err != nil { @@ -563,25 +576,26 @@ func (c PolicyDbClient) ListSubjectMappings(ctx context.Context) ([]*subjectmapp return subjectMappings, nil } -func updateSubjectMappingSql(id string, metadata []byte, subject_condition_set_id string, actions []byte) (string, []interface{}, error) { +// overwrites entire 'actions' JSONB column if updated +func updateSubjectMappingSql(id string, metadataJSON []byte, subject_condition_set_id string, actionsJSON []byte) (string, []interface{}, error) { t := db.Tables.SubjectMappings sb := db.NewStatementBuilder(). Update(t.Name()) - if metadata != nil { - sb = sb.Set("metadata", metadata) + if metadataJSON != nil { + sb = sb.Set("metadata", metadataJSON) } if subject_condition_set_id != "" { sb = sb.Set("subject_condition_set_id", subject_condition_set_id) } - if actions != nil { - sb = sb.Set("actions", actions) + if actionsJSON != nil { + sb = sb.Set("actions", actionsJSON) } return sb. - Where(sq.Eq{"id": id}). + Where(sq.Eq{t.Field("id"): id}). ToSql() } @@ -599,10 +613,11 @@ func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, id string, s * var actionsJSON []byte if s.UpdateActions != nil { - actionsJSON, err = MarshalActionsProto(s.UpdateActions) + actionsJSON, err = marshalActionsProto(s.UpdateActions) if err != nil { return nil, err } + prev.Actions = s.UpdateActions } sql, args, err := updateSubjectMappingSql( @@ -626,7 +641,7 @@ func deleteSubjectMappingSql(id string) (string, []interface{}, error) { t := db.Tables.SubjectMappings return db.NewStatementBuilder(). Delete(t.Name()). - Where(sq.Eq{"id": id}). + Where(sq.Eq{t.Field("id"): id}). ToSql() } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 84f0ae53b6..d98670e1b5 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -106,12 +106,12 @@ message Condition { repeated string subject_external_values = 3; } -// A collection of Conditions evaluated by the boolean_type provided +// A collection of Conditions evaluated by the boolean_operator provided message ConditionGroup { repeated Condition conditions = 1 [(buf.validate.field).repeated.min_items = 1]; // the boolean evaluation type across the conditions - ConditionBooleanTypeEnum boolean_type = 2 [ + ConditionBooleanTypeEnum boolean_operator = 2 [ (buf.validate.field).enum.defined_only = true, (buf.validate.field).required = true ]; @@ -195,11 +195,11 @@ message ListSubjectMappingsResponse { repeated SubjectMapping subject_mappings = 1; } -message SubjectMappingCreate{ +message CreateSubjectMappingRequest{ common.MetadataMutable metadata = 1; // Attribute Value to be mapped to - string attribute_value_id = 2; + string attribute_value_id = 2 [(buf.validate.field).required = true]; // Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set) string existing_subject_condition_set_id = 3; @@ -208,16 +208,15 @@ message SubjectMappingCreate{ SubjectConditionSetCreate new_subject_condition_set = 4; // The actions permitted by subjects in this mapping - repeated authorization.Action actions = 5; -} -message CreateSubjectMappingRequest { - SubjectMappingCreate subject_mapping = 1; + repeated authorization.Action actions = 5 [(buf.validate.field).repeated.min_items = 1]; } message CreateSubjectMappingResponse { SubjectMapping subject_mapping = 1; } -message SubjectMappingUpdate { +message UpdateSubjectMappingRequest { + string id = 1 [(buf.validate.field).required = true]; + common.MetadataMutable update_metadata = 2; // Replaces the existing SubjectConditionSet id with a new one @@ -226,12 +225,6 @@ message SubjectMappingUpdate { // Replaces entire list of actions permitted by subjects repeated authorization.Action update_actions = 5; } -message UpdateSubjectMappingRequest { - string id = 1 [(buf.validate.field).required = true]; - SubjectMappingUpdate subject_mapping = 2; -} -// `{"subject_mapping":{"updated_metadata": {"labels": {"name": "new-name"}}}}` -// '{"subject_mapping":{//everything}}' message UpdateSubjectMappingResponse { SubjectMapping subject_mapping = 1; } @@ -322,14 +315,14 @@ service SubjectMappingService { rpc CreateSubjectMapping(CreateSubjectMappingRequest) returns (CreateSubjectMappingResponse) { option (google.api.http) = { post: "/subject-mappings" - body: "subject_mapping" + body: "*" }; } rpc UpdateSubjectMapping(UpdateSubjectMappingRequest) returns (UpdateSubjectMappingResponse) { option (google.api.http) = { - post: "/subject-mappings/{id}" - body: "subject_mapping" + patch: "/subject-mappings/{id}" + body: "*" }; } @@ -348,14 +341,14 @@ service SubjectMappingService { rpc CreateSubjectConditionSet(CreateSubjectConditionSetRequest) returns (CreateSubjectConditionSetResponse) { option (google.api.http) = { post: "/subject-condition-sets" - body: "subject_condition_set" + body: "*" }; } rpc UpdateSubjectConditionSet(UpdateSubjectConditionSetRequest) returns (UpdateSubjectConditionSetResponse) { option (google.api.http) = { patch: "/subject-condition-sets/{id}" - body: "subject_condition_set" + body: "*" }; } From 1e3cfe39a31e569dc07eeb668641376ba4132cf8 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Tue, 5 Mar 2024 18:17:09 -0500 Subject: [PATCH 08/39] map to new types --- services/policy/db/subject_mappings.go | 18 +++++++++--------- .../policy/subjectmapping/subject_mapping.go | 9 ++++----- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 8c64aa3e18..87e11c020d 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -459,7 +459,7 @@ func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata ToSql() } -func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.SubjectMappingCreate) (*subjectmapping.SubjectMapping, error) { +func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.CreateSubjectMappingRequest) (*subjectmapping.SubjectMapping, error) { var ( scs *subjectmapping.SubjectConditionSet err error @@ -599,31 +599,31 @@ func updateSubjectMappingSql(id string, metadataJSON []byte, subject_condition_s ToSql() } -func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, id string, s *subjectmapping.SubjectMappingUpdate) (*subjectmapping.SubjectMapping, error) { - prev, err := c.GetSubjectMapping(ctx, id) +func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapping.UpdateSubjectMappingRequest) (*subjectmapping.SubjectMapping, error) { + prev, err := c.GetSubjectMapping(ctx, r.Id) if err != nil { return nil, err } - metadataJson, m, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdateMetadata) + metadataJson, m, err := db.MarshalUpdateMetadata(prev.Metadata, r.UpdateMetadata) if err != nil { return nil, err } prev.Metadata = m var actionsJSON []byte - if s.UpdateActions != nil { - actionsJSON, err = marshalActionsProto(s.UpdateActions) + if r.UpdateActions != nil { + actionsJSON, err = marshalActionsProto(r.UpdateActions) if err != nil { return nil, err } - prev.Actions = s.UpdateActions + prev.Actions = r.UpdateActions } sql, args, err := updateSubjectMappingSql( - id, + r.Id, metadataJson, - s.UpdateSubjectConditionSetId, + r.UpdateSubjectConditionSetId, actionsJSON, ) if err != nil { diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index 952eb161ea..45caa204b9 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -6,7 +6,6 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/opentdf/platform/pkg/serviceregistry" - "github.com/opentdf/platform/protocol/go/policy/subjectmapping" sm "github.com/opentdf/platform/protocol/go/policy/subjectmapping" policydb "github.com/opentdf/platform/services/policy/db" @@ -21,10 +20,10 @@ type SubjectMappingService struct { func NewRegistration() serviceregistry.Registration { return serviceregistry.Registration{ Namespace: "policy", - ServiceDesc: &subjectmapping.SubjectMappingService_ServiceDesc, + ServiceDesc: &sm.SubjectMappingService_ServiceDesc, RegisterFunc: func(srp serviceregistry.RegistrationParams) (any, serviceregistry.HandlerServer) { return &SubjectMappingService{dbClient: policydb.NewClient(*srp.DBClient)}, func(ctx context.Context, mux *runtime.ServeMux, s any) error { - return subjectmapping.RegisterSubjectMappingServiceHandlerServer(ctx, mux, s.(subjectmapping.SubjectMappingServiceServer)) + return sm.RegisterSubjectMappingServiceHandlerServer(ctx, mux, s.(sm.SubjectMappingServiceServer)) } }, } @@ -36,7 +35,7 @@ func (s SubjectMappingService) CreateSubjectMapping(ctx context.Context, rsp := &sm.CreateSubjectMappingResponse{} slog.Debug("creating subject mapping") - mappings, err := s.dbClient.CreateSubjectMapping(context.Background(), req.SubjectMapping) + mappings, err := s.dbClient.CreateSubjectMapping(context.Background(), req) if err != nil { return nil, services.HandleError(err, services.ErrCreationFailed, slog.String("subjectMapping", req.String())) } @@ -80,7 +79,7 @@ func (s SubjectMappingService) UpdateSubjectMapping(ctx context.Context, ) (*sm.UpdateSubjectMappingResponse, error) { rsp := &sm.UpdateSubjectMappingResponse{} - mapping, err := s.dbClient.UpdateSubjectMapping(ctx, req.Id, req.SubjectMapping) + mapping, err := s.dbClient.UpdateSubjectMapping(ctx, req) if err != nil { return nil, services.HandleError(err, services.ErrUpdateFailed, slog.String("id", req.Id), slog.String("subjectMapping", req.String())) } From 1303e2d836c5bdc23a2293704abe235292d5a352 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Tue, 5 Mar 2024 18:17:28 -0500 Subject: [PATCH 09/39] db layer and integration tests so far (passing) --- integration/subject_mappings_test.go | 401 +++++++++++++++++++++++++-- internal/db/errors.go | 3 +- internal/fixtures/db.go | 7 + internal/fixtures/fixtures.go | 12 +- internal/fixtures/fixtures.yaml | 35 ++- 5 files changed, 415 insertions(+), 43 deletions(-) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index ebd497004f..ba7f96dfd9 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -5,10 +5,9 @@ import ( "log/slog" "testing" - "github.com/opentdf/platform/protocol/go/authorization" - + "github.com/opentdf/platform/internal/db" "github.com/opentdf/platform/internal/fixtures" - "github.com/opentdf/platform/protocol/go/common" + "github.com/opentdf/platform/protocol/go/authorization" "github.com/opentdf/platform/protocol/go/policy/subjectmapping" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" @@ -36,66 +35,412 @@ func (s *SubjectMappingsSuite) TearDownSuite() { s.f.TearDown() } -func (s *SubjectMappingsSuite) Test_CreateSubjectMapping() { - s.T().Skip("after DB changes") - metadata := &common.MetadataMutable{} +// a set of easily accessible actions for use in tests +var ( + DECRYPT = "DECRYPT" + TRANSMIT = "TRANSMIT" + CUSTOM_DOWNLOAD = "CUSTOM_DOWNLOAD" + CUSTOM_UPLOAD = "CUSTOM_UPLOAD" + + fixtureActions = map[string]*authorization.Action{ + "DECRYPT": { + Value: &authorization.Action_Standard{ + Standard: authorization.Action_STANDARD_ACTION_DECRYPT, + }, + }, + "TRANSMIT": { + Value: &authorization.Action_Standard{ + Standard: authorization.Action_STANDARD_ACTION_TRANSMIT, + }, + }, + "CUSTOM_DOWNLOAD": { + Value: &authorization.Action_Custom{ + Custom: "DOWNLOAD", + }, + }, + "CUSTOM_UPLOAD": { + Value: &authorization.Action_Custom{ + Custom: "UPLOAD", + }, + }, + } + + nonExistentSubjectSetId = "9f9f3282-ffff-1111-924a-7b8eb43d5423" +) + +func (s *SubjectMappingsSuite) TestCreateSubjectMapping_ExistingSubjectConditionSetId() { + fixtureAttrValId := s.f.GetAttributeValueKey("example.net/attr/attr1/value/value2").Id + fixtureSCSId := s.f.GetSubjectConditionSetKey("subject_condition_set1").Id + + aDecrypt := fixtureActions[DECRYPT] + aTransmit := fixtureActions[TRANSMIT] + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrValId, + ExistingSubjectConditionSetId: fixtureSCSId, + Actions: []*authorization.Action{aDecrypt, aTransmit}, + } + + sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), sm) + assert.Equal(s.T(), new.AttributeValueId, sm.AttributeValue.Id) + assert.Equal(s.T(), new.ExistingSubjectConditionSetId, sm.SubjectConditionSet.Id) + assert.Equal(s.T(), 2, len(sm.Actions)) + assert.Equal(s.T(), sm.GetActions(), new.Actions) +} + +func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NewSubjectConditionSet() { + fixtureAttrValId := s.f.GetAttributeValueKey("example.net/attr/attr1/value/value2").Id + aTransmit := fixtureActions[TRANSMIT] + + scs := &subjectmapping.SubjectConditionSetCreate{ + SubjectSets: []*subjectmapping.SubjectSet{ + { + ConditionGroups: []*subjectmapping.ConditionGroup{ + { + BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_AND, + Conditions: []*subjectmapping.Condition{ + { + SubjectExternalField: "email", + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, + SubjectExternalValues: []string{"hello@email.com"}, + }, + }, + }, + }, + }, + }, + } + + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrValId, + Actions: []*authorization.Action{aTransmit}, + NewSubjectConditionSet: scs, + } + + sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), sm) + assert.Equal(s.T(), new.AttributeValueId, sm.AttributeValue.Id) + assert.Equal(s.T(), sm.GetActions(), new.Actions) + + // verify the new subject condition set created was returned properly + assert.NotNil(s.T(), sm.SubjectConditionSet) + assert.Equal(s.T(), len(scs.SubjectSets), len(sm.SubjectConditionSet.SubjectSets)) + + expectedCGroups := scs.SubjectSets[0].ConditionGroups + gotCGroups := sm.SubjectConditionSet.SubjectSets[0].ConditionGroups + assert.Equal(s.T(), len(expectedCGroups), len(gotCGroups)) + assert.Equal(s.T(), len(expectedCGroups[0].Conditions), len(gotCGroups[0].Conditions)) + + expectedCondition := expectedCGroups[0].Conditions[0] + gotCondition := sm.SubjectConditionSet.SubjectSets[0].ConditionGroups[0].Conditions[0] + assert.Equal(s.T(), expectedCondition.SubjectExternalField, gotCondition.SubjectExternalField) + assert.Equal(s.T(), expectedCondition.Operator, gotCondition.Operator) + assert.Equal(s.T(), expectedCondition.SubjectExternalValues, gotCondition.SubjectExternalValues) +} + +func (s *SubjectMappingsSuite) TestCreateSubjectMapping_PrefersExistingSubjectConditionSetIdWhenBothProvided() { + fixtureAttrValId := s.f.GetAttributeValueKey("example.com/attr/attr2/value/value1").Id + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") + aTransmit := fixtureActions[TRANSMIT] + + scs := &subjectmapping.SubjectConditionSetCreate{ + SubjectSets: []*subjectmapping.SubjectSet{ + { + ConditionGroups: []*subjectmapping.ConditionGroup{ + { + BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_AND, + Conditions: []*subjectmapping.Condition{ + { + SubjectExternalField: "field", + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, + SubjectExternalValues: []string{"value"}, + }, + }, + }, + }, + }, + }, + Name: "should_be_ignored", + } + + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrValId, + ExistingSubjectConditionSetId: fixtureScs.Id, + Actions: []*authorization.Action{aTransmit}, + NewSubjectConditionSet: scs, + } + + sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), sm) + + // verify the new subject condition set was not used + assert.NotNil(s.T(), sm.SubjectConditionSet) + assert.Equal(s.T(), fixtureScs.Id, sm.SubjectConditionSet.Id) + assert.NotEqual(s.T(), scs.Name, sm.SubjectConditionSet.Name) +} + +func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NoActions_Fails() { + fixtureAttrVal := s.f.GetAttributeValueKey("example.com/attr/attr2/value/value1") + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrVal.Id, + ExistingSubjectConditionSetId: fixtureScs.Id, + } + + sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), sm) + assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) +} + +func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NonExistentAttributeValueId_Fails() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") + aTransmit := fixtureActions[TRANSMIT] + new := &subjectmapping.CreateSubjectMappingRequest{ + Actions: []*authorization.Action{aTransmit}, + ExistingSubjectConditionSetId: fixtureScs.Id, + AttributeValueId: nonExistentAttributeValueUuid, + } + + sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), sm) + assert.ErrorIs(s.T(), err, db.ErrForeignKeyViolation) +} + +// TODO: FIXME +// func (s *SubjectMappingsSuite) TestGetSubjectMapping() { +// fixture := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute3") + +// sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, fixture.Id) +// assert.Nil(s.T(), err) +// assert.NotNil(s.T(), sm) +// assert.Equal(s.T(), fixture.Id, sm.Id) +// assert.Equal(s.T(), fixture.Actions, sm.Actions) +// assert.Equal(s.T(), fixture.AttributeValueId, sm.AttributeValue.Id) +// assert.Equal(s.T(), fixture.SubjectConditionSetId, sm.SubjectConditionSet.Id) +// } - attrValue := s.f.GetAttributeValueKey("example.com/attr/attr1/value/value1") - mapping := &subjectmapping.SubjectMappingCreateUpdate{ - AttributeValueId: attrValue.Id, - Metadata: metadata, +// CRUD tests for subject condition sets + +func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet_WithName() { + new := &subjectmapping.SubjectConditionSetCreate{ SubjectSets: []*subjectmapping.SubjectSet{ { ConditionGroups: []*subjectmapping.ConditionGroup{ { + BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_AND, Conditions: []*subjectmapping.Condition{ { - SubjectExternalField: "Department", + SubjectExternalField: "userId", Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, - SubjectExternalValues: []string{"Marketing", "Sales"}, + SubjectExternalValues: []string{"email@gmail.com", "hello@yahoo.com"}, + }, + }, + }, + }, + }, + }, + Name: "subject_condition_set_create", + } + + scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), scs) + assert.Equal(s.T(), scs.Name, "subject_condition_set_create") + assert.Equal(s.T(), len(new.SubjectSets), len(scs.SubjectSets)) +} + +func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet_NoOptionalName() { + new := &subjectmapping.SubjectConditionSetCreate{ + SubjectSets: []*subjectmapping.SubjectSet{ + { + ConditionGroups: []*subjectmapping.ConditionGroup{ + { + BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_OR, + Conditions: []*subjectmapping.Condition{ + { + SubjectExternalField: "some_field", + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN, + SubjectExternalValues: []string{"some_value"}, }, }, }, }, }, }, - Actions: []*authorization.Action{}, } - createdMapping, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, mapping) + + scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), scs) + assert.Equal(s.T(), "", scs.Name) +} + +func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet_OnNameConflict_Fails() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") + new := &subjectmapping.SubjectConditionSetCreate{ + // DB does not validate subject condition sets; only protos do + SubjectSets: []*subjectmapping.SubjectSet{}, + Name: fixtureScs.Name, + } + + scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), scs) + assert.ErrorIs(s.T(), err, db.ErrUniqueConstraintViolation) +} + +func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_ById() { + fixture := s.f.GetSubjectConditionSetKey("subject_condition_set1") + + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, fixture.Id, "") + assert.Nil(s.T(), err) + assert.NotNil(s.T(), scs) + assert.Equal(s.T(), fixture.Id, scs.Id) + assert.Equal(s.T(), fixture.Name, scs.Name) +} + +func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_ByName() { + fixture := s.f.GetSubjectConditionSetKey("subject_condition_set2") + + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "", fixture.Name) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), scs) + assert.Equal(s.T(), fixture.Id, scs.Id) + assert.Equal(s.T(), fixture.Name, scs.Name) +} + +func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_WithIdAndNamePrefersId() { + fixture := s.f.GetSubjectConditionSetKey("subject_condition_set2") + fixtureWrong := s.f.GetSubjectConditionSetKey("subject_condition_set1") + + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, fixture.Id, fixtureWrong.Name) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), scs) + assert.Equal(s.T(), fixture.Id, scs.Id) + assert.Equal(s.T(), fixture.Name, scs.Name) + assert.NotEqual(s.T(), fixtureWrong.Id, scs.Id) +} + +func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_WithNoIdOrName_Fails() { + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "", "") + assert.NotNil(s.T(), err) + assert.Nil(s.T(), scs) + assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) +} + +func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_NonexistentId_Fails() { + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, nonExistentSubjectSetId, "") + assert.NotNil(s.T(), err) + assert.Nil(s.T(), scs) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + +func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_NonexistentName_Fails() { + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "", "nonexistent_name") + assert.NotNil(s.T(), err) + assert.Nil(s.T(), scs) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + +func (s *SubjectMappingsSuite) TestListSubjectConditionSet() { + list, err := s.db.PolicyClient.ListSubjectConditionSets(s.ctx) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), list) + + fixture1 := s.f.GetSubjectConditionSetKey("subject_condition_set1") + found1 := false + fixture2 := s.f.GetSubjectConditionSetKey("subject_condition_set2") + found2 := false + fixture3 := s.f.GetSubjectConditionSetKey("subject_condition_set3") + found3 := false + fixture4 := s.f.GetSubjectConditionSetKey("subject_condition_omitted_optional_name") + found4 := false + + assert.GreaterOrEqual(s.T(), len(list), 3) + for _, scs := range list { + if scs.Id == fixture1.Id { + found1 = true + } else if scs.Id == fixture2.Id { + found2 = true + } else if scs.Id == fixture3.Id { + found3 = true + } else if scs.Id == fixture4.Id { + found4 = true + } + } + assert.True(s.T(), found1) + assert.True(s.T(), found2) + assert.True(s.T(), found3) + assert.True(s.T(), found4) +} + +func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet() { + // create a new subject condition set, delete it, and verify get fails with not found + new := &subjectmapping.SubjectConditionSetCreate{ + SubjectSets: []*subjectmapping.SubjectSet{}, + Name: "subject_condition_set_delete", + } + + scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), scs) + + deleted, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, scs.Id) assert.Nil(s.T(), err) - assert.NotNil(s.T(), createdMapping) + assert.NotNil(s.T(), deleted) + + scs, err = s.db.PolicyClient.GetSubjectConditionSet(s.ctx, scs.Id, "") + assert.NotNil(s.T(), err) + assert.Nil(s.T(), scs) + assert.ErrorIs(s.T(), err, db.ErrNotFound) + + scs, err = s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "", new.Name) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), scs) + assert.ErrorIs(s.T(), err, db.ErrNotFound) } -func (s *SubjectMappingsSuite) Test_GetSubjectMapping() { - s.T().Skip("after DB changes") - attrValue := s.f.GetAttributeValueKey("example.com/attr/attr1/value/value1") - mapping := &subjectmapping.SubjectMappingCreateUpdate{ - AttributeValueId: attrValue.Id, +func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet() { + new := &subjectmapping.SubjectConditionSetCreate{ SubjectSets: []*subjectmapping.SubjectSet{ { ConditionGroups: []*subjectmapping.ConditionGroup{ { + BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_AND, Conditions: []*subjectmapping.Condition{ { - SubjectExternalField: "usernames", + SubjectExternalField: "origin", Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, - SubjectExternalValues: []string{"hello@world.com", "tonystark@avengers.gov"}, + SubjectExternalValues: []string{"USA", "Canada"}, }, }, }, }, }, }, - Actions: []*authorization.Action{}, - Metadata: &common.MetadataMutable{}, + Name: "subject_condition_set_update", } - createdMapping, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, mapping) + + scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), createdMapping) + assert.NotNil(s.T(), scs) + + // update the subject condition set + newName := "subject_condition_set_update_updated" + update := &subjectmapping.SubjectConditionSetUpdate{ + UpdatedName: newName, + } - gotMapping, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdMapping.Id) + updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, scs.Id, update) assert.Nil(s.T(), err) - assert.NotNil(s.T(), gotMapping) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), scs.Id, updated.Id) + assert.Equal(s.T(), newName, updated.Name) } func TestSubjectMappingSuite(t *testing.T) { diff --git a/internal/db/errors.go b/internal/db/errors.go index 2d67556f93..ee0bb5cd13 100644 --- a/internal/db/errors.go +++ b/internal/db/errors.go @@ -25,7 +25,8 @@ const ( ErrNotFound DbError = "ErrNotFound: value not found" ErrEnumValueInvalid DbError = "ErrEnumValueInvalid: not a valid enum value" ErrUuidInvalid DbError = "ErrUuidInvalid: value not a valid UUID" - ErrFqnMissingValue DbError = "ErrFqnMissingValue: FQN must include a value" + ErrFqnMissingValue DbError = "ErrFqnMissingValue: FQN must include a value" + ErrMissingRequiredValue DbError = "ErrMissingRequiredValue: missing required value" ) // Get helpful error message for PostgreSQL violation diff --git a/internal/fixtures/db.go b/internal/fixtures/db.go index 786a0f005e..c1b700afd3 100644 --- a/internal/fixtures/db.go +++ b/internal/fixtures/db.go @@ -55,6 +55,13 @@ func (d *DBInterface) StringWrap(v string) string { return "'" + v + "'" } +func (d *DBInterface) OptionalStringWrap(v string) string { + if v == "" { + return "NULL" + } + return d.StringWrap(v) +} + func (d *DBInterface) BoolWrap(b bool) string { return strconv.FormatBool(b) } diff --git a/internal/fixtures/fixtures.go b/internal/fixtures/fixtures.go index 24de7fa990..c7e749d72d 100644 --- a/internal/fixtures/fixtures.go +++ b/internal/fixtures/fixtures.go @@ -183,6 +183,14 @@ func (f *Fixtures) GetSubjectMappingKey(key string) FixtureDataSubjectMapping { return fixtureData.SubjectMappings.Data[key] } +func (f *Fixtures) GetSubjectConditionSetKey(key string) SubjectConditionSet { + if fixtureData.SubjectConditionSet.Data[key].Id == "" { + slog.Error("could not find subject-condition-set", slog.String("id", key)) + panic("could not find subject-condition-set") + } + return fixtureData.SubjectConditionSet.Data[key] +} + func (f *Fixtures) GetResourceMappingKey(key string) FixtureDataResourceMapping { if fixtureData.ResourceMappings.Data[key].Id == "" { slog.Error("could not find resource-mappings", slog.String("id", key)) @@ -295,7 +303,7 @@ 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) + conditionJSON, err := json.Marshal(d.Condition.SubjectSets) if err != nil { slog.Error("⛔️ 📦 issue with subject condition set JSON - check fixtures.yaml for issues") panic("issue with subject condition set JSON") @@ -303,7 +311,7 @@ func (f *Fixtures) provisionSubjectConditionSet() int64 { values = append(values, []string{ f.db.StringWrap(d.Id), - f.db.StringWrap(d.Name), + f.db.OptionalStringWrap(d.Name), f.db.StringWrap(string(conditionJSON)), }) } diff --git a/internal/fixtures/fixtures.yaml b/internal/fixtures/fixtures.yaml index d0aa00d3d2..750d04df44 100644 --- a/internal/fixtures/fixtures.yaml +++ b/internal/fixtures/fixtures.yaml @@ -223,15 +223,15 @@ subject_condition_set: condition: subject_sets: - condition_groups: - - boolean_operator: AND + - boolean_operator: CONDITION_BOOLEAN_TYPE_ENUM_AND conditions: - subject_external_field: superhero_name - operator: IN + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN subject_external_values: - thor - captain_america - subject_external_field: superhero_group - operator: IN + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN subject_external_values: - avengers subject_condition_set2: @@ -240,15 +240,15 @@ subject_condition_set: condition: subject_sets: - condition_groups: - - boolean_operator: AND + - boolean_operator: CONDITION_BOOLEAN_TYPE_ENUM_AND conditions: - subject_external_field: department - operator: IN + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN subject_external_values: - marketing - sales - subject_external_field: role - operator: IN + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN subject_external_values: - senior_vice_president - vice_president @@ -259,29 +259,40 @@ subject_condition_set: condition: subject_sets: - condition_groups: - - boolean_operator: OR + - boolean_operator: CONDITION_BOOLEAN_TYPE_ENUM_OR conditions: - subject_external_field: fave_sport - operator: IN + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN subject_external_values: - futbol - soccer - subject_external_field: face_dessert - operator: NOT_IN + operator: SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN subject_external_values: - ice_cream - - boolean_operator: AND + - boolean_operator: CONDITION_BOOLEAN_TYPE_ENUM_AND conditions: - subject_external_field: department - operator: IN + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN subject_external_values: - engineering - subject_external_field: role - operator: NOT_IN + operator: SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN subject_external_values: - manager - director - vice_president + subject_condition_omitted_optional_name: + id: 3c623ede-df88-4906-8a78-ebdfacadcd57 + condition: + subject_sets: + - condition_groups: + - boolean_operator: CONDITION_BOOLEAN_TYPE_ENUM_OR + conditions: + - subject_external_field: some_field + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN + subject_external_values: + - some_value ## # Resource Mappings From 2d147b96d6118a93672993e02e3ebbfb942f8866 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 13:01:34 -0500 Subject: [PATCH 10/39] fully working integration tests for subjectmappings and subject condition sets --- integration/subject_mappings_test.go | 452 +++++++++++++++++++++++-- services/policy/db/subject_mappings.go | 81 +++-- 2 files changed, 480 insertions(+), 53 deletions(-) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index ba7f96dfd9..229ca2ec08 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -8,6 +8,7 @@ import ( "github.com/opentdf/platform/internal/db" "github.com/opentdf/platform/internal/fixtures" "github.com/opentdf/platform/protocol/go/authorization" + "github.com/opentdf/platform/protocol/go/common" "github.com/opentdf/platform/protocol/go/policy/subjectmapping" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" @@ -65,9 +66,14 @@ var ( }, } - nonExistentSubjectSetId = "9f9f3282-ffff-1111-924a-7b8eb43d5423" + nonExistentSubjectSetId = "9f9f3282-ffff-1111-924a-7b8eb43d5423" + nonExistentSubjectMappingId = "32977f0b-f2b9-44b5-8afd-e2e224ea8352" ) +/*-------------------------------------------------------- + *-------------------- SubjectMappings ------------------- + *-------------------------------------------------------*/ + func (s *SubjectMappingsSuite) TestCreateSubjectMapping_ExistingSubjectConditionSetId() { fixtureAttrValId := s.f.GetAttributeValueKey("example.net/attr/attr1/value/value2").Id fixtureSCSId := s.f.GetSubjectConditionSetKey("subject_condition_set1").Id @@ -211,22 +217,326 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NonExistentAttributeValu assert.ErrorIs(s.T(), err, db.ErrForeignKeyViolation) } -// TODO: FIXME -// func (s *SubjectMappingsSuite) TestGetSubjectMapping() { -// fixture := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute3") +func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NonExistentSubjectConditionSetId_Fails() { + fixtureAttrVal := s.f.GetAttributeValueKey("example.com/attr/attr2/value/value1") + aTransmit := fixtureActions[TRANSMIT] + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrVal.Id, + Actions: []*authorization.Action{aTransmit}, + ExistingSubjectConditionSetId: nonExistentSubjectSetId, + } + + sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), sm) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + +func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_Actions() { + // create a new one, update it, and verify the update + fixtureAttrValId := s.f.GetAttributeValueKey("example.net/attr/attr1/value/value2").Id + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set3") + aTransmit := fixtureActions[TRANSMIT] + aCustomUpload := fixtureActions[CUSTOM_UPLOAD] + + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrValId, + Actions: []*authorization.Action{aTransmit, aCustomUpload}, + ExistingSubjectConditionSetId: fixtureScs.Id, + } + + initialCreate, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), initialCreate) + + // update the subject mapping + newActions := []*authorization.Action{aTransmit} + update := &subjectmapping.UpdateSubjectMappingRequest{ + Id: initialCreate.Id, + UpdateActions: newActions, + } + + updated, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), initialCreate.Id, updated.Id) + assert.Equal(s.T(), len(newActions), len(updated.Actions)) + assert.Equal(s.T(), updated.GetActions(), newActions) + + // verify the actions were updated but nothing else + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, initialCreate.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), got) + assert.Equal(s.T(), len(newActions), len(got.Actions)) + assert.Equal(s.T(), got.GetActions(), newActions) + assert.Equal(s.T(), initialCreate.AttributeValue.Id, got.AttributeValue.Id) + assert.Equal(s.T(), initialCreate.SubjectConditionSet.Id, got.SubjectConditionSet.Id) +} + +func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_SubjectConditionSetId() { + // create a new one, update it, and verify the update + fixtureAttrValId := s.f.GetAttributeValueKey("example.net/attr/attr1/value/value1").Id + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") + aTransmit := fixtureActions[TRANSMIT] + + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrValId, + Actions: []*authorization.Action{aTransmit}, + ExistingSubjectConditionSetId: fixtureScs.Id, + } + + initialCreate, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), initialCreate) + + // update the subject mapping + newScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") + update := &subjectmapping.UpdateSubjectMappingRequest{ + Id: initialCreate.Id, + UpdateSubjectConditionSetId: newScs.Id, + } + + updated, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), initialCreate.Id, updated.Id) + assert.Equal(s.T(), initialCreate.AttributeValue.Id, updated.AttributeValue.Id) + assert.Equal(s.T(), newScs.Id, updated.SubjectConditionSet.Id) + + // verify the subject condition set was updated but nothing else + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, initialCreate.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), got) + assert.Equal(s.T(), initialCreate.AttributeValue.Id, got.AttributeValue.Id) + assert.Equal(s.T(), newScs.Id, got.SubjectConditionSet.Id) + assert.Equal(s.T(), len(initialCreate.Actions), len(got.Actions)) + assert.Equal(s.T(), got.GetActions(), initialCreate.GetActions()) +} + +func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_UpdateAllAllowedFields() { + // create a new one, update it, and verify the update + fixtureAttrValId := s.f.GetAttributeValueKey("example.net/attr/attr1/value/value1").Id + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") + aTransmit := fixtureActions[TRANSMIT] + + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrValId, + Actions: []*authorization.Action{aTransmit}, + ExistingSubjectConditionSetId: fixtureScs.Id, + } + + initialCreate, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), initialCreate) + + // update the subject mapping + newScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") + newActions := []*authorization.Action{fixtureActions[CUSTOM_DOWNLOAD]} + metadata := &common.MetadataMutable{ + Labels: map[string]string{"key": "value"}, + } + update := &subjectmapping.UpdateSubjectMappingRequest{ + Id: initialCreate.Id, + UpdateActions: newActions, + UpdateSubjectConditionSetId: newScs.Id, + UpdateMetadata: metadata, + } + + updated, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), initialCreate.Id, updated.Id) + assert.Equal(s.T(), initialCreate.AttributeValue.Id, updated.AttributeValue.Id) + assert.Equal(s.T(), newScs.Id, updated.SubjectConditionSet.Id) + assert.Equal(s.T(), len(newActions), len(updated.Actions)) + assert.Equal(s.T(), updated.GetActions(), newActions) + assert.Equal(s.T(), metadata.Labels["key"], updated.Metadata.Labels["key"]) + + // verify the subject mapping was updated + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, initialCreate.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), got) + assert.Equal(s.T(), initialCreate.Id, updated.Id) + assert.Equal(s.T(), initialCreate.AttributeValue.Id, updated.AttributeValue.Id) + assert.Equal(s.T(), newScs.Id, updated.SubjectConditionSet.Id) + assert.Equal(s.T(), len(newActions), len(updated.Actions)) + assert.Equal(s.T(), updated.GetActions(), newActions) + assert.Equal(s.T(), metadata.Labels["key"], updated.Metadata.Labels["key"]) +} + +func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_NonExistentId_Fails() { + update := &subjectmapping.UpdateSubjectMappingRequest{ + Id: nonExistentSubjectMappingId, + } + + sm, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), sm) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + +func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_NonExistentSubjectConditionSetId_Fails() { + update := &subjectmapping.UpdateSubjectMappingRequest{ + Id: s.f.GetSubjectMappingKey("subject_mapping_subject_attribute3").Id, + UpdateSubjectConditionSetId: nonExistentSubjectSetId, + } + + sm, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), sm) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + +func (s *SubjectMappingsSuite) TestGetSubjectMapping() { + fixture := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute3") + + sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, fixture.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), sm) + assert.Equal(s.T(), fixture.Id, sm.Id) + assert.Equal(s.T(), fixture.AttributeValueId, sm.AttributeValue.Id) + assert.Equal(s.T(), fixture.SubjectConditionSetId, sm.SubjectConditionSet.Id) + + // verify the actions + for i, a := range sm.Actions { + assert.NotNil(s.T(), a) + // In protos, standard actions are an enum and custom actions are a string, + // so their string representations are slightly different + if fixture.Actions[i].Standard != "" { + assert.Equal(s.T(), "standard:"+fixture.Actions[i].Standard, a.String()) + } else { + assert.Equal(s.T(), "custom:\""+fixture.Actions[i].Custom+"\"", a.String()) + } + } +} + +func (s *SubjectMappingsSuite) TestGetSubjectMapping_NonExistentId_Fails() { + sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, nonExistentSubjectMappingId) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), sm) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} -// sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, fixture.Id) -// assert.Nil(s.T(), err) -// assert.NotNil(s.T(), sm) -// assert.Equal(s.T(), fixture.Id, sm.Id) -// assert.Equal(s.T(), fixture.Actions, sm.Actions) -// assert.Equal(s.T(), fixture.AttributeValueId, sm.AttributeValue.Id) -// assert.Equal(s.T(), fixture.SubjectConditionSetId, sm.SubjectConditionSet.Id) -// } +func (s *SubjectMappingsSuite) TestListSubjectMappings() { + list, err := s.db.PolicyClient.ListSubjectMappings(s.ctx) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), list) -// CRUD tests for subject condition sets + fixture1 := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute1") + found1 := false + fixture2 := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute2") + found2 := false + fixture3 := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute3") + found3 := false + assert.GreaterOrEqual(s.T(), len(list), 3) -func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet_WithName() { + assertEqual := func(sm *subjectmapping.SubjectMapping, fixture fixtures.FixtureDataSubjectMapping) { + assert.Equal(s.T(), fixture.AttributeValueId, sm.AttributeValue.Id) + assert.Equal(s.T(), fixture.SubjectConditionSetId, sm.SubjectConditionSet.Id) + assert.Equal(s.T(), len(fixture.Actions), len(sm.Actions)) + } + for _, sm := range list { + if sm.Id == fixture1.Id { + assertEqual(sm, fixture1) + found1 = true + } + if sm.Id == fixture2.Id { + assertEqual(sm, fixture2) + found2 = true + } + if sm.Id == fixture3.Id { + assertEqual(sm, fixture3) + found3 = true + } + } + assert.True(s.T(), found1) + assert.True(s.T(), found2) + assert.True(s.T(), found3) +} + +func (s *SubjectMappingsSuite) TestDeleteSubjectMapping() { + // create a new subject mapping, delete it, and verify get fails with not found + fixtureAttrValId := s.f.GetAttributeValueKey("example.com/attr/attr2/value/value1").Id + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") + aTransmit := fixtureActions[TRANSMIT] + + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrValId, + Actions: []*authorization.Action{aTransmit}, + ExistingSubjectConditionSetId: fixtureScs.Id, + } + + sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), sm) + + deleted, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, sm.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), deleted) + + sm, err = s.db.PolicyClient.GetSubjectMapping(s.ctx, sm.Id) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), sm) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + +func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_WithNonExistentId_Fails() { + deleted, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, nonExistentSubjectMappingId) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), deleted) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + +func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_DoesNotDeleteSubjectConditionSet() { + // create a new subject mapping, delete it, and verify the subject condition set still exists + fixtureAttrValId := s.f.GetAttributeValueKey("example.com/attr/attr2/value/value2").Id + newScs := &subjectmapping.SubjectConditionSetCreate{ + SubjectSets: []*subjectmapping.SubjectSet{ + { + ConditionGroups: []*subjectmapping.ConditionGroup{ + { + BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_AND, + Conditions: []*subjectmapping.Condition{ + { + SubjectExternalField: "idp_field", + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, + SubjectExternalValues: []string{"idp_value"}, + }, + }, + }, + }, + }, + }, + Name: "delete_sm_does_not_cascade_delete_scs", + } + aTransmit := fixtureActions[TRANSMIT] + + new := &subjectmapping.CreateSubjectMappingRequest{ + AttributeValueId: fixtureAttrValId, + Actions: []*authorization.Action{aTransmit}, + NewSubjectConditionSet: newScs, + } + + sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), sm) + createdScsId := sm.SubjectConditionSet.Id + + deleted, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, sm.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), deleted) + + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdScsId, "") + assert.Nil(s.T(), err) + assert.NotNil(s.T(), scs) + assert.Equal(s.T(), createdScsId, scs.Id) +} + +/*-------------------------------------------------------- + *----------------- SubjectConditionSets ----------------- + *-------------------------------------------------------*/ + +func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet_WithOptionalName() { new := &subjectmapping.SubjectConditionSetCreate{ SubjectSets: []*subjectmapping.SubjectSet{ { @@ -333,14 +643,14 @@ func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_WithNoIdOrName_Fails() assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) } -func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_NonexistentId_Fails() { +func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_NonExistentId_Fails() { scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, nonExistentSubjectSetId, "") assert.NotNil(s.T(), err) assert.Nil(s.T(), scs) assert.ErrorIs(s.T(), err, db.ErrNotFound) } -func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_NonexistentName_Fails() { +func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_NonExistentName_Fails() { scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "", "nonexistent_name") assert.NotNil(s.T(), err) assert.Nil(s.T(), scs) @@ -405,7 +715,14 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet() { assert.ErrorIs(s.T(), err, db.ErrNotFound) } -func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet() { +func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet_WithNonExistentId_Fails() { + deleted, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, nonExistentSubjectSetId) + assert.NotNil(s.T(), err) + assert.Nil(s.T(), deleted) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + +func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_Name() { new := &subjectmapping.SubjectConditionSetCreate{ SubjectSets: []*subjectmapping.SubjectSet{ { @@ -423,15 +740,15 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet() { }, }, }, - Name: "subject_condition_set_update", + Name: "subject_condition_set_update_name", } scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) assert.NotNil(s.T(), scs) - // update the subject condition set - newName := "subject_condition_set_update_updated" + // update the name alone and verify nothing else changed + newName := "subject_condition_set_update_name_updated" update := &subjectmapping.SubjectConditionSetUpdate{ UpdatedName: newName, } @@ -441,6 +758,101 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet() { assert.NotNil(s.T(), updated) assert.Equal(s.T(), scs.Id, updated.Id) assert.Equal(s.T(), newName, updated.Name) + assert.Equal(s.T(), len(scs.SubjectSets), len(updated.SubjectSets)) + assert.Equal(s.T(), scs.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField, updated.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) +} + +func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { + // create a new one, update nothing but the subject sets, and verify the solo update + new := &subjectmapping.SubjectConditionSetCreate{ + SubjectSets: []*subjectmapping.SubjectSet{ + {}, + }, + Name: "subject_condition_set_update_subject_sets", + } + + scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), scs) + + // update the subject condition set + ss := []*subjectmapping.SubjectSet{ + { + ConditionGroups: []*subjectmapping.ConditionGroup{ + { + BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_OR, + Conditions: []*subjectmapping.Condition{ + { + SubjectExternalField: "origin", + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN, + SubjectExternalValues: []string{"USA", "Canada"}, + }, + }, + }, + }, + }, + } + + update := &subjectmapping.SubjectConditionSetUpdate{ + UpdatedSubjectSets: ss, + } + + updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, scs.Id, update) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), scs.Id, updated.Id) + assert.Equal(s.T(), new.Name, updated.Name) + assert.Equal(s.T(), len(ss), len(updated.SubjectSets)) + assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, updated.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) +} + +func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() { + // create a new one, update it, and verify the update + new := &subjectmapping.SubjectConditionSetCreate{ + SubjectSets: []*subjectmapping.SubjectSet{ + {}, + }, + Name: "subject_condition_set_update_all", + } + + scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), scs) + + // update the subject condition set + ss := []*subjectmapping.SubjectSet{ + { + ConditionGroups: []*subjectmapping.ConditionGroup{ + { + BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_OR, + Conditions: []*subjectmapping.Condition{ + { + SubjectExternalField: "somewhere", + Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN, + SubjectExternalValues: []string{"neither here", "nor there"}, + }, + }, + }, + }, + }, + } + metadata := &common.MetadataMutable{ + Labels: map[string]string{"key_example": "value_example"}, + } + update := &subjectmapping.SubjectConditionSetUpdate{ + UpdatedName: "subject_condition_set_update_all_updated", + UpdatedSubjectSets: ss, + UpdatedMetadata: metadata, + } + + updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, scs.Id, update) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), scs.Id, updated.Id) + assert.Equal(s.T(), update.UpdatedName, updated.Name) + assert.Equal(s.T(), len(ss), len(updated.SubjectSets)) + assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, updated.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) + assert.Equal(s.T(), metadata.Labels["somewhere"], updated.Metadata.Labels["somewhere"]) } func TestSubjectMappingSuite(t *testing.T) { diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 87e11c020d..8be5f863da 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -6,6 +6,7 @@ import ( "encoding/json" "errors" "fmt" + "log/slog" "github.com/opentdf/platform/protocol/go/authorization" @@ -33,14 +34,16 @@ func marshalSubjectSetsProto(subjectSet []*subjectmapping.SubjectSet) ([]byte, e // Helper to unmarshal SubjectSets from JSON (stored as JSONB in the database column) func unmarshalSubjectSetsProto(conditionJSON []byte) ([]*subjectmapping.SubjectSet, error) { - var raw []json.RawMessage + var ( + raw []json.RawMessage + ss []*subjectmapping.SubjectSet + ) if err := json.Unmarshal(conditionJSON, &raw); err != nil { return nil, err } - var ss []*subjectmapping.SubjectSet for _, r := range raw { - var s subjectmapping.SubjectSet + s := subjectmapping.SubjectSet{} if err := protojson.Unmarshal(r, &s); err != nil { return nil, err } @@ -63,21 +66,23 @@ func marshalActionsProto(actions []*authorization.Action) ([]byte, error) { return json.Marshal(raw) } -func unmarshalActionsProto(actions []byte) ([]*authorization.Action, error) { - var raw []json.RawMessage - if err := json.Unmarshal(actions, &raw); err != nil { +func unmarshalActionsProto(actionsJSON []byte) ([]*authorization.Action, error) { + var ( + raw []json.RawMessage + actions []*authorization.Action + ) + if err := json.Unmarshal(actionsJSON, &raw); err != nil { return nil, err } - var actionsProto []*authorization.Action for _, r := range raw { - var a authorization.Action + a := authorization.Action{} if err := protojson.Unmarshal(r, &a); err != nil { return nil, err } - actionsProto = append(actionsProto, &a) + actions = append(actions, &a) } - return actionsProto, nil + return actions, nil } func subjectConditionSetSelect() sq.SelectBuilder { @@ -167,16 +172,16 @@ func subjectMappingSelect() sq.SelectBuilder { ") AS attribute_value", ). LeftJoin(avT.Name() + " ON " + t.Field("attribute_value_id") + " = " + avT.Field("id")). - LeftJoin(scsT.Name() + " ON " + scsT.Field("id") + " = " + t.Field("subject_condition_set_id")). GroupBy(t.Field("id")). GroupBy(avT.Field("id")). + LeftJoin(scsT.Name() + " ON " + scsT.Field("id") + " = " + t.Field("subject_condition_set_id")). GroupBy(scsT.Field("id")) } func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, error) { var ( id string - actions []byte + actionsJSON []byte metadataJSON []byte scsJSON []byte attributeValueJSON []byte @@ -184,7 +189,7 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err err := row.Scan( &id, - &actions, + &actionsJSON, &metadataJSON, &scsJSON, &attributeValueJSON, @@ -196,29 +201,31 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err m := &common.Metadata{} if metadataJSON != nil { if err := protojson.Unmarshal(metadataJSON, m); err != nil { + slog.Error("could not unmarshal metadata", slog.String("error", err.Error())) return nil, err } } - v := &attributes.Value{} + av := attributes.Value{} if attributeValueJSON != nil { - if err := protojson.Unmarshal(attributeValueJSON, v); err != nil { + if err := protojson.Unmarshal(attributeValueJSON, &av); err != nil { + slog.Error("could not unmarshal attribute value", slog.String("error", err.Error())) return nil, err } } - a, err := unmarshalActionsProto(actions) - if err != nil { - return nil, err + a := []*authorization.Action{} + if actionsJSON != nil { + if a, err = unmarshalActionsProto(actionsJSON); err != nil { + slog.Error("could not unmarshal actions", slog.String("error", err.Error())) + return nil, err + } } - var scs *subjectmapping.SubjectConditionSet - var raw json.RawMessage + scs := subjectmapping.SubjectConditionSet{} if scsJSON != nil { - if err := json.Unmarshal(scsJSON, &raw); err != nil { - return nil, err - } - if err := protojson.Unmarshal(raw, scs); err != nil { + if err := protojson.Unmarshal(scsJSON, &scs); err != nil { + slog.Error("could not unmarshal subject condition set", slog.String("error", err.Error())) return nil, err } } @@ -226,8 +233,8 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err return &subjectmapping.SubjectMapping{ Id: id, Metadata: m, - AttributeValue: v, - SubjectConditionSet: scs, + AttributeValue: &av, + SubjectConditionSet: &scs, Actions: a, }, nil } @@ -388,6 +395,12 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string if err != nil { return nil, err } + } else { + subjectSets = prev.SubjectSets + } + + if s.UpdatedName == "" { + s.UpdatedName = prev.Name } sql, args, err := updateSubjectConditionSetSql( @@ -534,19 +547,13 @@ func getSubjectMappingSql(id string) (string, []interface{}, error) { func (c PolicyDbClient) GetSubjectMapping(ctx context.Context, id string) (*subjectmapping.SubjectMapping, error) { sql, args, err := getSubjectMappingSql(id) - fmt.Println("sql", sql, "args", args, "err", err) row, err := c.QueryRow(ctx, sql, args, err) if err != nil { return nil, err } - s, err := subjectMappingHydrateItem(row) - if err != nil { - return nil, err - } - - return s, nil + return subjectMappingHydrateItem(row) } func listSubjectMappingsSql() (string, []interface{}, error) { @@ -620,6 +627,14 @@ func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapp prev.Actions = r.UpdateActions } + if r.UpdateSubjectConditionSetId != "" { + new, err := c.GetSubjectConditionSet(ctx, r.UpdateSubjectConditionSetId, "") + if err != nil { + return nil, err + } + prev.SubjectConditionSet = new + } + sql, args, err := updateSubjectMappingSql( r.Id, metadataJson, From 8aa435134e4807562bf35190169d0c1f450b6fdd Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 13:04:37 -0500 Subject: [PATCH 11/39] remove extraneous error check --- integration/main_test.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/integration/main_test.go b/integration/main_test.go index 9e7d42a783..607bc380ff 100644 --- a/integration/main_test.go +++ b/integration/main_test.go @@ -112,10 +112,6 @@ func TestMain(m *testing.M) { conf.DB.Port = port.Int() db := fixtures.NewDBInterface(*Config) - if err != nil { - slog.Error("issue creating database client", slog.String("error", err.Error())) - panic(err) - } slog.Info("🚚 applying migrations") applied, err := db.Client.RunMigrations(ctx) From 1e24496ac3b63ff4efa5c814094022410b9f2ced Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 13:31:08 -0500 Subject: [PATCH 12/39] follow new policy proto norms for subject condition sets --- docs/grpc/index.html | 60 +- .../subject_mapping.swagger.json | 36 +- integration/subject_mappings_test.go | 29 +- .../subjectmapping/subject_mapping.pb.go | 598 ++++---- .../SubjectConditionSetUpdate.java | 1210 ----------------- .../SubjectConditionSetUpdateOrBuilder.java | 89 -- .../subjectmapping/SubjectMappingProto.java | 177 ++- .../UpdateSubjectConditionSetRequest.java | 805 +++++++++-- ...teSubjectConditionSetRequestOrBuilder.java | 80 +- services/policy/db/subject_mappings.go | 29 +- .../policy/subjectmapping/subject_mapping.go | 85 +- .../subjectmapping/subject_mapping.proto | 16 +- 12 files changed, 1279 insertions(+), 1935 deletions(-) delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java diff --git a/docs/grpc/index.html b/docs/grpc/index.html index 122ef19cac..aebcd0a286 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -779,10 +779,6 @@

    Table of Contents

    MSubjectConditionSetCreate -
  • - MSubjectConditionSetUpdate -
  • -
  • MSubjectMapping
  • @@ -5795,44 +5791,6 @@

    SubjectConditionSetCrea -

    SubjectConditionSetUpdate

    -

    - - -
    CreateSubjectMapping POST /subject-mappingssubject_mapping*
    UpdateSubjectMappingPOSTPATCH /subject-mappings/{id}subject_mapping*
    CreateSubjectConditionSet POST /subject-condition-setssubject_condition_set*
    UpdateSubjectConditionSet PATCH /subject-condition-sets/{id}subject_condition_set*
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    updated_namestring

    an optional name for ease of reference

    updated_metadatacommon.MetadataMutable

    updated_subject_setsSubjectSetrepeated

    Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions

    - - - - -

    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_condition_sets": [{subject_set_1},{subject_set_2}]

    "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}]

    }

    @@ -5927,12 +5885,26 @@

    UpdateSubjectCon - subject_condition_set - SubjectConditionSetUpdate + update_name + string + +

    an optional name for ease of reference

    + + + + update_metadata + common.MetadataMutable

    + + update_subject_sets + SubjectSet + repeated +

    if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions

    + + diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index bac20e2e9f..65c710b332 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -155,8 +155,20 @@ "schema": { "type": "object", "properties": { - "subjectConditionSet": { - "$ref": "#/definitions/subjectmappingSubjectConditionSetUpdate" + "updateName": { + "type": "string", + "title": "an optional name for ease of reference" + }, + "updateMetadata": { + "$ref": "#/definitions/commonMetadataMutable" + }, + "updateSubjectSets": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/subjectmappingSubjectSet" + }, + "title": "if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, \u0026 Conditions" } } } @@ -770,26 +782,6 @@ } } }, - "subjectmappingSubjectConditionSetUpdate": { - "type": "object", - "properties": { - "updatedName": { - "type": "string", - "title": "an optional name for ease of reference" - }, - "updatedMetadata": { - "$ref": "#/definitions/commonMetadataMutable" - }, - "updatedSubjectSets": { - "type": "array", - "items": { - "type": "object", - "$ref": "#/definitions/subjectmappingSubjectSet" - }, - "title": "Replaces entire existing graph relation of Subject Sets, Condition Groups, \u0026 Conditions" - } - } - }, "subjectmappingSubjectMapping": { "type": "object", "properties": { diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index 229ca2ec08..c545dabce2 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -2,6 +2,7 @@ package integration import ( "context" + "fmt" "log/slog" "testing" @@ -749,11 +750,12 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_Name() { // update the name alone and verify nothing else changed newName := "subject_condition_set_update_name_updated" - update := &subjectmapping.SubjectConditionSetUpdate{ - UpdatedName: newName, + update := &subjectmapping.UpdateSubjectConditionSetRequest{ + UpdateName: newName, + Id: scs.Id, } - updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, scs.Id, update) + updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) assert.Nil(s.T(), err) assert.NotNil(s.T(), updated) assert.Equal(s.T(), scs.Id, updated.Id) @@ -793,11 +795,12 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { }, } - update := &subjectmapping.SubjectConditionSetUpdate{ - UpdatedSubjectSets: ss, + update := &subjectmapping.UpdateSubjectConditionSetRequest{ + UpdateSubjectSets: ss, + Id: scs.Id, } - updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, scs.Id, update) + updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) assert.Nil(s.T(), err) assert.NotNil(s.T(), updated) assert.Equal(s.T(), scs.Id, updated.Id) @@ -839,17 +842,19 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() metadata := &common.MetadataMutable{ Labels: map[string]string{"key_example": "value_example"}, } - update := &subjectmapping.SubjectConditionSetUpdate{ - UpdatedName: "subject_condition_set_update_all_updated", - UpdatedSubjectSets: ss, - UpdatedMetadata: metadata, + update := &subjectmapping.UpdateSubjectConditionSetRequest{ + UpdateName: "subject_condition_set_update_all_updated", + UpdateSubjectSets: ss, + UpdateMetadata: metadata, + Id: scs.Id, } - updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, scs.Id, update) + updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) + fmt.Println("here ", err) assert.Nil(s.T(), err) assert.NotNil(s.T(), updated) assert.Equal(s.T(), scs.Id, updated.Id) - assert.Equal(s.T(), update.UpdatedName, updated.Name) + assert.Equal(s.T(), update.UpdateName, updated.Name) assert.Equal(s.T(), len(ss), len(updated.SubjectSets)) assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, updated.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) assert.Equal(s.T(), metadata.Labels["somewhere"], updated.Metadata.Labels["somewhere"]) diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 07249d88ef..40c44b5cee 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -1495,20 +1495,21 @@ func (x *CreateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectCon return nil } -type SubjectConditionSetUpdate struct { +type UpdateSubjectConditionSetRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // an optional name for ease of reference - UpdatedName string `protobuf:"bytes,1,opt,name=updated_name,json=updatedName,proto3" json:"updated_name,omitempty"` - UpdatedMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=updated_metadata,json=updatedMetadata,proto3" json:"updated_metadata,omitempty"` - // Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions - UpdatedSubjectSets []*SubjectSet `protobuf:"bytes,3,rep,name=updated_subject_sets,json=updatedSubjectSets,proto3" json:"updated_subject_sets,omitempty"` + UpdateName string `protobuf:"bytes,2,opt,name=update_name,json=updateName,proto3" json:"update_name,omitempty"` + UpdateMetadata *common.MetadataMutable `protobuf:"bytes,3,opt,name=update_metadata,json=updateMetadata,proto3" json:"update_metadata,omitempty"` + // if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions + UpdateSubjectSets []*SubjectSet `protobuf:"bytes,4,rep,name=update_subject_sets,json=updateSubjectSets,proto3" json:"update_subject_sets,omitempty"` } -func (x *SubjectConditionSetUpdate) Reset() { - *x = SubjectConditionSetUpdate{} +func (x *UpdateSubjectConditionSetRequest) Reset() { + *x = UpdateSubjectConditionSetRequest{} if protoimpl.UnsafeEnabled { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1516,13 +1517,13 @@ func (x *SubjectConditionSetUpdate) Reset() { } } -func (x *SubjectConditionSetUpdate) String() string { +func (x *UpdateSubjectConditionSetRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SubjectConditionSetUpdate) ProtoMessage() {} +func (*UpdateSubjectConditionSetRequest) ProtoMessage() {} -func (x *SubjectConditionSetUpdate) ProtoReflect() protoreflect.Message { +func (x *UpdateSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1534,83 +1535,35 @@ func (x *SubjectConditionSetUpdate) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SubjectConditionSetUpdate.ProtoReflect.Descriptor instead. -func (*SubjectConditionSetUpdate) Descriptor() ([]byte, []int) { +// Deprecated: Use UpdateSubjectConditionSetRequest.ProtoReflect.Descriptor instead. +func (*UpdateSubjectConditionSetRequest) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{25} } -func (x *SubjectConditionSetUpdate) GetUpdatedName() string { +func (x *UpdateSubjectConditionSetRequest) GetId() string { if x != nil { - return x.UpdatedName + return x.Id } return "" } -func (x *SubjectConditionSetUpdate) GetUpdatedMetadata() *common.MetadataMutable { +func (x *UpdateSubjectConditionSetRequest) GetUpdateName() string { if x != nil { - return x.UpdatedMetadata + return x.UpdateName } - return nil + return "" } -func (x *SubjectConditionSetUpdate) GetUpdatedSubjectSets() []*SubjectSet { +func (x *UpdateSubjectConditionSetRequest) GetUpdateMetadata() *common.MetadataMutable { if x != nil { - return x.UpdatedSubjectSets + return x.UpdateMetadata } return nil } -type UpdateSubjectConditionSetRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - SubjectConditionSet *SubjectConditionSetUpdate `protobuf:"bytes,2,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` -} - -func (x *UpdateSubjectConditionSetRequest) Reset() { - *x = UpdateSubjectConditionSetRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateSubjectConditionSetRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateSubjectConditionSetRequest) ProtoMessage() {} - -func (x *UpdateSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateSubjectConditionSetRequest.ProtoReflect.Descriptor instead. -func (*UpdateSubjectConditionSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{26} -} - -func (x *UpdateSubjectConditionSetRequest) GetId() string { +func (x *UpdateSubjectConditionSetRequest) GetUpdateSubjectSets() []*SubjectSet { if x != nil { - return x.Id - } - return "" -} - -func (x *UpdateSubjectConditionSetRequest) GetSubjectConditionSet() *SubjectConditionSetUpdate { - if x != nil { - return x.SubjectConditionSet + return x.UpdateSubjectSets } return nil } @@ -1626,7 +1579,7 @@ type UpdateSubjectConditionSetResponse struct { func (x *UpdateSubjectConditionSetResponse) Reset() { *x = UpdateSubjectConditionSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1639,7 +1592,7 @@ func (x *UpdateSubjectConditionSetResponse) String() string { func (*UpdateSubjectConditionSetResponse) ProtoMessage() {} func (x *UpdateSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1652,7 +1605,7 @@ func (x *UpdateSubjectConditionSetResponse) ProtoReflect() protoreflect.Message // Deprecated: Use UpdateSubjectConditionSetResponse.ProtoReflect.Descriptor instead. func (*UpdateSubjectConditionSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{27} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{26} } func (x *UpdateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { @@ -1673,7 +1626,7 @@ type DeleteSubjectConditionSetRequest struct { func (x *DeleteSubjectConditionSetRequest) Reset() { *x = DeleteSubjectConditionSetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1686,7 +1639,7 @@ func (x *DeleteSubjectConditionSetRequest) String() string { func (*DeleteSubjectConditionSetRequest) ProtoMessage() {} func (x *DeleteSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1699,7 +1652,7 @@ func (x *DeleteSubjectConditionSetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteSubjectConditionSetRequest.ProtoReflect.Descriptor instead. func (*DeleteSubjectConditionSetRequest) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{28} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{27} } func (x *DeleteSubjectConditionSetRequest) GetId() string { @@ -1720,7 +1673,7 @@ type DeleteSubjectConditionSetResponse struct { func (x *DeleteSubjectConditionSetResponse) Reset() { *x = DeleteSubjectConditionSetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[29] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1733,7 +1686,7 @@ func (x *DeleteSubjectConditionSetResponse) String() string { func (*DeleteSubjectConditionSetResponse) ProtoMessage() {} func (x *DeleteSubjectConditionSetResponse) ProtoReflect() protoreflect.Message { - mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[29] + mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1746,7 +1699,7 @@ func (x *DeleteSubjectConditionSetResponse) ProtoReflect() protoreflect.Message // Deprecated: Use DeleteSubjectConditionSetResponse.ProtoReflect.Descriptor instead. func (*DeleteSubjectConditionSetResponse) Descriptor() ([]byte, []int) { - return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{29} + return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{28} } func (x *DeleteSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { @@ -1994,205 +1947,196 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0xe1, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0f, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x5d, 0x0a, - 0x14, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 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, 0x42, 0x08, - 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, - 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, - 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, - 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 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, 0xe0, 0x0e, 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, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0xf0, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 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, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x5f, 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, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x21, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2a, 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, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, + 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 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, 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, 0xe0, 0x0e, 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, 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, + 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, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, + 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, + 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, - 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, - 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, 0x2e, 0x70, 0x6f, 0x6c, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, + 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 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, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 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, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, - 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x12, 0x34, 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, 0x2a, 0x16, 0x2f, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, + 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, + 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, + 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, - 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, + 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, + 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, - 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x2d, 0x73, 0x65, 0x74, 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, + 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, + 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, + 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, + 0x74, 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 ( @@ -2208,7 +2152,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, 30) +var file_policy_subjectmapping_subject_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 29) var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (SubjectMappingOperatorEnum)(0), // 0: policy.subjectmapping.SubjectMappingOperatorEnum (ConditionBooleanTypeEnum)(0), // 1: policy.subjectmapping.ConditionBooleanTypeEnum @@ -2237,80 +2181,78 @@ var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (*SubjectConditionSetCreate)(nil), // 24: policy.subjectmapping.SubjectConditionSetCreate (*CreateSubjectConditionSetRequest)(nil), // 25: policy.subjectmapping.CreateSubjectConditionSetRequest (*CreateSubjectConditionSetResponse)(nil), // 26: policy.subjectmapping.CreateSubjectConditionSetResponse - (*SubjectConditionSetUpdate)(nil), // 27: policy.subjectmapping.SubjectConditionSetUpdate - (*UpdateSubjectConditionSetRequest)(nil), // 28: policy.subjectmapping.UpdateSubjectConditionSetRequest - (*UpdateSubjectConditionSetResponse)(nil), // 29: policy.subjectmapping.UpdateSubjectConditionSetResponse - (*DeleteSubjectConditionSetRequest)(nil), // 30: policy.subjectmapping.DeleteSubjectConditionSetRequest - (*DeleteSubjectConditionSetResponse)(nil), // 31: policy.subjectmapping.DeleteSubjectConditionSetResponse - (*common.Metadata)(nil), // 32: common.Metadata - (*attributes.Value)(nil), // 33: policy.attributes.Value - (*authorization.Action)(nil), // 34: authorization.Action - (*structpb.Struct)(nil), // 35: google.protobuf.Struct - (*common.MetadataMutable)(nil), // 36: common.MetadataMutable + (*UpdateSubjectConditionSetRequest)(nil), // 27: policy.subjectmapping.UpdateSubjectConditionSetRequest + (*UpdateSubjectConditionSetResponse)(nil), // 28: policy.subjectmapping.UpdateSubjectConditionSetResponse + (*DeleteSubjectConditionSetRequest)(nil), // 29: policy.subjectmapping.DeleteSubjectConditionSetRequest + (*DeleteSubjectConditionSetResponse)(nil), // 30: policy.subjectmapping.DeleteSubjectConditionSetResponse + (*common.Metadata)(nil), // 31: common.Metadata + (*attributes.Value)(nil), // 32: policy.attributes.Value + (*authorization.Action)(nil), // 33: authorization.Action + (*structpb.Struct)(nil), // 34: google.protobuf.Struct + (*common.MetadataMutable)(nil), // 35: 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_operator:type_name -> policy.subjectmapping.ConditionBooleanTypeEnum 3, // 3: policy.subjectmapping.SubjectSet.condition_groups:type_name -> policy.subjectmapping.ConditionGroup - 32, // 4: policy.subjectmapping.SubjectConditionSet.metadata:type_name -> common.Metadata + 31, // 4: policy.subjectmapping.SubjectConditionSet.metadata:type_name -> common.Metadata 4, // 5: policy.subjectmapping.SubjectConditionSet.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 32, // 6: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata - 33, // 7: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value + 31, // 6: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata + 32, // 7: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value 5, // 8: policy.subjectmapping.SubjectMapping.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 34, // 9: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action - 35, // 10: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct + 33, // 9: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action + 34, // 10: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct 7, // 11: policy.subjectmapping.MatchSubjectMappingsRequest.subject:type_name -> policy.subjectmapping.Subject 6, // 12: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping 6, // 13: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping 6, // 14: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 36, // 15: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable + 35, // 15: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable 24, // 16: policy.subjectmapping.CreateSubjectMappingRequest.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 34, // 17: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action + 33, // 17: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action 6, // 18: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 36, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable - 34, // 20: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action + 35, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable + 33, // 20: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action 6, // 21: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping 6, // 22: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping 5, // 23: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet 6, // 24: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping 5, // 25: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet - 36, // 26: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable + 35, // 26: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable 4, // 27: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet 24, // 28: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate 5, // 29: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 36, // 30: policy.subjectmapping.SubjectConditionSetUpdate.updated_metadata:type_name -> common.MetadataMutable - 4, // 31: policy.subjectmapping.SubjectConditionSetUpdate.updated_subject_sets:type_name -> policy.subjectmapping.SubjectSet - 27, // 32: policy.subjectmapping.UpdateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetUpdate - 5, // 33: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 5, // 34: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 8, // 35: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest - 12, // 36: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest - 10, // 37: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest - 14, // 38: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest - 16, // 39: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest - 18, // 40: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest - 22, // 41: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest - 20, // 42: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest - 25, // 43: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest - 28, // 44: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest - 30, // 45: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest - 9, // 46: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse - 13, // 47: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse - 11, // 48: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse - 15, // 49: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse - 17, // 50: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse - 19, // 51: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse - 23, // 52: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse - 21, // 53: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse - 26, // 54: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse - 29, // 55: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse - 31, // 56: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse - 46, // [46:57] is the sub-list for method output_type - 35, // [35:46] is the sub-list for method input_type - 35, // [35:35] is the sub-list for extension type_name - 35, // [35:35] is the sub-list for extension extendee - 0, // [0:35] is the sub-list for field type_name + 35, // 30: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable + 4, // 31: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet + 5, // 32: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 5, // 33: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 8, // 34: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 35: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 36: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 14, // 37: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 16, // 38: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 18, // 39: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 22, // 40: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest + 20, // 41: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest + 25, // 42: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest + 27, // 43: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest + 29, // 44: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest + 9, // 45: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 46: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 47: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 15, // 48: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 17, // 49: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 19, // 50: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 23, // 51: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse + 21, // 52: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse + 26, // 53: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse + 28, // 54: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse + 30, // 55: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse + 45, // [45:56] is the sub-list for method output_type + 34, // [34:45] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } @@ -2620,18 +2562,6 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SubjectConditionSetUpdate); 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[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubjectConditionSetRequest); i { case 0: return &v.state @@ -2643,7 +2573,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[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UpdateSubjectConditionSetResponse); i { case 0: return &v.state @@ -2655,7 +2585,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[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSubjectConditionSetRequest); i { case 0: return &v.state @@ -2667,7 +2597,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { return nil } } - file_policy_subjectmapping_subject_mapping_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_policy_subjectmapping_subject_mapping_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DeleteSubjectConditionSetResponse); i { case 0: return &v.state @@ -2686,7 +2616,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: 30, + NumMessages: 29, NumExtensions: 0, NumServices: 1, }, diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java deleted file mode 100644 index 75a34ce455..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdate.java +++ /dev/null @@ -1,1210 +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.SubjectConditionSetUpdate} - */ -public final class SubjectConditionSetUpdate extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectConditionSetUpdate) - SubjectConditionSetUpdateOrBuilder { -private static final long serialVersionUID = 0L; - // Use SubjectConditionSetUpdate.newBuilder() to construct. - private SubjectConditionSetUpdate(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private SubjectConditionSetUpdate() { - updatedName_ = ""; - updatedSubjectSets_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new SubjectConditionSetUpdate(); - } - - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder.class); - } - - private int bitField0_; - public static final int UPDATED_NAME_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object updatedName_ = ""; - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string updated_name = 1 [json_name = "updatedName"]; - * @return The updatedName. - */ - @java.lang.Override - public java.lang.String getUpdatedName() { - java.lang.Object ref = updatedName_; - 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(); - updatedName_ = s; - return s; - } - } - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string updated_name = 1 [json_name = "updatedName"]; - * @return The bytes for updatedName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUpdatedNameBytes() { - java.lang.Object ref = updatedName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updatedName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UPDATED_METADATA_FIELD_NUMBER = 2; - private io.opentdf.platform.common.MetadataMutable updatedMetadata_; - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return Whether the updatedMetadata field is set. - */ - @java.lang.Override - public boolean hasUpdatedMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return The updatedMetadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getUpdatedMetadata() { - return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder() { - return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; - } - - public static final int UPDATED_SUBJECT_SETS_FIELD_NUMBER = 3; - @SuppressWarnings("serial") - private java.util.List updatedSubjectSets_; - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getUpdatedSubjectSetsList() { - return updatedSubjectSets_; - } - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getUpdatedSubjectSetsOrBuilderList() { - return updatedSubjectSets_; - } - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public int getUpdatedSubjectSetsCount() { - return updatedSubjectSets_.size(); - } - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdatedSubjectSets(int index) { - return updatedSubjectSets_.get(index); - } - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdatedSubjectSetsOrBuilder( - int index) { - return updatedSubjectSets_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updatedName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, updatedName_); - } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getUpdatedMetadata()); - } - for (int i = 0; i < updatedSubjectSets_.size(); i++) { - output.writeMessage(3, updatedSubjectSets_.get(i)); - } - 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(updatedName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, updatedName_); - } - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdatedMetadata()); - } - for (int i = 0; i < updatedSubjectSets_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, updatedSubjectSets_.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.SubjectConditionSetUpdate)) { - return super.equals(obj); - } - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate other = (io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate) obj; - - if (!getUpdatedName() - .equals(other.getUpdatedName())) return false; - if (hasUpdatedMetadata() != other.hasUpdatedMetadata()) return false; - if (hasUpdatedMetadata()) { - if (!getUpdatedMetadata() - .equals(other.getUpdatedMetadata())) return false; - } - if (!getUpdatedSubjectSetsList() - .equals(other.getUpdatedSubjectSetsList())) 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) + UPDATED_NAME_FIELD_NUMBER; - hash = (53 * hash) + getUpdatedName().hashCode(); - if (hasUpdatedMetadata()) { - hash = (37 * hash) + UPDATED_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUpdatedMetadata().hashCode(); - } - if (getUpdatedSubjectSetsCount() > 0) { - hash = (37 * hash) + UPDATED_SUBJECT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getUpdatedSubjectSetsList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate 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.SubjectConditionSetUpdate} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectConditionSetUpdate) - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable - .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.class, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder.class); - } - - // Construct using io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getUpdatedMetadataFieldBuilder(); - getUpdatedSubjectSetsFieldBuilder(); - } - } - @java.lang.Override - public Builder clear() { - super.clear(); - bitField0_ = 0; - updatedName_ = ""; - updatedMetadata_ = null; - if (updatedMetadataBuilder_ != null) { - updatedMetadataBuilder_.dispose(); - updatedMetadataBuilder_ = null; - } - if (updatedSubjectSetsBuilder_ == null) { - updatedSubjectSets_ = java.util.Collections.emptyList(); - } else { - updatedSubjectSets_ = null; - updatedSubjectSetsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance(); - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate build() { - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate buildPartial() { - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate(this); - buildPartialRepeatedFields(result); - if (bitField0_ != 0) { buildPartial0(result); } - onBuilt(); - return result; - } - - private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result) { - if (updatedSubjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { - updatedSubjectSets_ = java.util.Collections.unmodifiableList(updatedSubjectSets_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.updatedSubjectSets_ = updatedSubjectSets_; - } else { - result.updatedSubjectSets_ = updatedSubjectSetsBuilder_.build(); - } - } - - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate result) { - int from_bitField0_ = bitField0_; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.updatedName_ = updatedName_; - } - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.updatedMetadata_ = updatedMetadataBuilder_ == null - ? updatedMetadata_ - : updatedMetadataBuilder_.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.SubjectConditionSetUpdate) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate other) { - if (other == io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance()) return this; - if (!other.getUpdatedName().isEmpty()) { - updatedName_ = other.updatedName_; - bitField0_ |= 0x00000001; - onChanged(); - } - if (other.hasUpdatedMetadata()) { - mergeUpdatedMetadata(other.getUpdatedMetadata()); - } - if (updatedSubjectSetsBuilder_ == null) { - if (!other.updatedSubjectSets_.isEmpty()) { - if (updatedSubjectSets_.isEmpty()) { - updatedSubjectSets_ = other.updatedSubjectSets_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureUpdatedSubjectSetsIsMutable(); - updatedSubjectSets_.addAll(other.updatedSubjectSets_); - } - onChanged(); - } - } else { - if (!other.updatedSubjectSets_.isEmpty()) { - if (updatedSubjectSetsBuilder_.isEmpty()) { - updatedSubjectSetsBuilder_.dispose(); - updatedSubjectSetsBuilder_ = null; - updatedSubjectSets_ = other.updatedSubjectSets_; - bitField0_ = (bitField0_ & ~0x00000004); - updatedSubjectSetsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getUpdatedSubjectSetsFieldBuilder() : null; - } else { - updatedSubjectSetsBuilder_.addAllMessages(other.updatedSubjectSets_); - } - } - } - 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: { - updatedName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { - input.readMessage( - getUpdatedMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { - io.opentdf.platform.policy.subjectmapping.SubjectSet m = - input.readMessage( - io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), - extensionRegistry); - if (updatedSubjectSetsBuilder_ == null) { - ensureUpdatedSubjectSetsIsMutable(); - updatedSubjectSets_.add(m); - } else { - updatedSubjectSetsBuilder_.addMessage(m); - } - break; - } // case 26 - 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 updatedName_ = ""; - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string updated_name = 1 [json_name = "updatedName"]; - * @return The updatedName. - */ - public java.lang.String getUpdatedName() { - java.lang.Object ref = updatedName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - updatedName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string updated_name = 1 [json_name = "updatedName"]; - * @return The bytes for updatedName. - */ - public com.google.protobuf.ByteString - getUpdatedNameBytes() { - java.lang.Object ref = updatedName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updatedName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string updated_name = 1 [json_name = "updatedName"]; - * @param value The updatedName to set. - * @return This builder for chaining. - */ - public Builder setUpdatedName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - updatedName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string updated_name = 1 [json_name = "updatedName"]; - * @return This builder for chaining. - */ - public Builder clearUpdatedName() { - updatedName_ = getDefaultInstance().getUpdatedName(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string updated_name = 1 [json_name = "updatedName"]; - * @param value The bytes for updatedName to set. - * @return This builder for chaining. - */ - public Builder setUpdatedNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - updatedName_ = value; - bitField0_ |= 0x00000001; - onChanged(); - return this; - } - - private io.opentdf.platform.common.MetadataMutable updatedMetadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updatedMetadataBuilder_; - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return Whether the updatedMetadata field is set. - */ - public boolean hasUpdatedMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return The updatedMetadata. - */ - public io.opentdf.platform.common.MetadataMutable getUpdatedMetadata() { - if (updatedMetadataBuilder_ == null) { - return updatedMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; - } else { - return updatedMetadataBuilder_.getMessage(); - } - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - */ - public Builder setUpdatedMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updatedMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updatedMetadata_ = value; - } else { - updatedMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - */ - public Builder setUpdatedMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (updatedMetadataBuilder_ == null) { - updatedMetadata_ = builderForValue.build(); - } else { - updatedMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - */ - public Builder mergeUpdatedMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updatedMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - updatedMetadata_ != null && - updatedMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getUpdatedMetadataBuilder().mergeFrom(value); - } else { - updatedMetadata_ = value; - } - } else { - updatedMetadataBuilder_.mergeFrom(value); - } - if (updatedMetadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - */ - public Builder clearUpdatedMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - updatedMetadata_ = null; - if (updatedMetadataBuilder_ != null) { - updatedMetadataBuilder_.dispose(); - updatedMetadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getUpdatedMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getUpdatedMetadataFieldBuilder().getBuilder(); - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder() { - if (updatedMetadataBuilder_ != null) { - return updatedMetadataBuilder_.getMessageOrBuilder(); - } else { - return updatedMetadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updatedMetadata_; - } - } - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getUpdatedMetadataFieldBuilder() { - if (updatedMetadataBuilder_ == null) { - updatedMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getUpdatedMetadata(), - getParentForChildren(), - isClean()); - updatedMetadata_ = null; - } - return updatedMetadataBuilder_; - } - - private java.util.List updatedSubjectSets_ = - java.util.Collections.emptyList(); - private void ensureUpdatedSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { - updatedSubjectSets_ = new java.util.ArrayList(updatedSubjectSets_); - 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> updatedSubjectSetsBuilder_; - - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public java.util.List getUpdatedSubjectSetsList() { - if (updatedSubjectSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(updatedSubjectSets_); - } else { - return updatedSubjectSetsBuilder_.getMessageList(); - } - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public int getUpdatedSubjectSetsCount() { - if (updatedSubjectSetsBuilder_ == null) { - return updatedSubjectSets_.size(); - } else { - return updatedSubjectSetsBuilder_.getCount(); - } - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdatedSubjectSets(int index) { - if (updatedSubjectSetsBuilder_ == null) { - return updatedSubjectSets_.get(index); - } else { - return updatedSubjectSetsBuilder_.getMessage(index); - } - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public Builder setUpdatedSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (updatedSubjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUpdatedSubjectSetsIsMutable(); - updatedSubjectSets_.set(index, value); - onChanged(); - } else { - updatedSubjectSetsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public Builder setUpdatedSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (updatedSubjectSetsBuilder_ == null) { - ensureUpdatedSubjectSetsIsMutable(); - updatedSubjectSets_.set(index, builderForValue.build()); - onChanged(); - } else { - updatedSubjectSetsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public Builder addUpdatedSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (updatedSubjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUpdatedSubjectSetsIsMutable(); - updatedSubjectSets_.add(value); - onChanged(); - } else { - updatedSubjectSetsBuilder_.addMessage(value); - } - return this; - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public Builder addUpdatedSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (updatedSubjectSetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureUpdatedSubjectSetsIsMutable(); - updatedSubjectSets_.add(index, value); - onChanged(); - } else { - updatedSubjectSetsBuilder_.addMessage(index, value); - } - return this; - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public Builder addUpdatedSubjectSets( - io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (updatedSubjectSetsBuilder_ == null) { - ensureUpdatedSubjectSetsIsMutable(); - updatedSubjectSets_.add(builderForValue.build()); - onChanged(); - } else { - updatedSubjectSetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public Builder addUpdatedSubjectSets( - int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (updatedSubjectSetsBuilder_ == null) { - ensureUpdatedSubjectSetsIsMutable(); - updatedSubjectSets_.add(index, builderForValue.build()); - onChanged(); - } else { - updatedSubjectSetsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public Builder addAllUpdatedSubjectSets( - java.lang.Iterable values) { - if (updatedSubjectSetsBuilder_ == null) { - ensureUpdatedSubjectSetsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, updatedSubjectSets_); - onChanged(); - } else { - updatedSubjectSetsBuilder_.addAllMessages(values); - } - return this; - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public Builder clearUpdatedSubjectSets() { - if (updatedSubjectSetsBuilder_ == null) { - updatedSubjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - updatedSubjectSetsBuilder_.clear(); - } - return this; - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public Builder removeUpdatedSubjectSets(int index) { - if (updatedSubjectSetsBuilder_ == null) { - ensureUpdatedSubjectSetsIsMutable(); - updatedSubjectSets_.remove(index); - onChanged(); - } else { - updatedSubjectSetsBuilder_.remove(index); - } - return this; - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getUpdatedSubjectSetsBuilder( - int index) { - return getUpdatedSubjectSetsFieldBuilder().getBuilder(index); - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdatedSubjectSetsOrBuilder( - int index) { - if (updatedSubjectSetsBuilder_ == null) { - return updatedSubjectSets_.get(index); } else { - return updatedSubjectSetsBuilder_.getMessageOrBuilder(index); - } - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public java.util.List - getUpdatedSubjectSetsOrBuilderList() { - if (updatedSubjectSetsBuilder_ != null) { - return updatedSubjectSetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(updatedSubjectSets_); - } - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdatedSubjectSetsBuilder() { - return getUpdatedSubjectSetsFieldBuilder().addBuilder( - io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdatedSubjectSetsBuilder( - int index) { - return getUpdatedSubjectSetsFieldBuilder().addBuilder( - index, io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); - } - /** - *
    -     * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - public java.util.List - getUpdatedSubjectSetsBuilderList() { - return getUpdatedSubjectSetsFieldBuilder().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> - getUpdatedSubjectSetsFieldBuilder() { - if (updatedSubjectSetsBuilder_ == null) { - updatedSubjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( - updatedSubjectSets_, - ((bitField0_ & 0x00000004) != 0), - getParentForChildren(), - isClean()); - updatedSubjectSets_ = null; - } - return updatedSubjectSetsBuilder_; - } - @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.SubjectConditionSetUpdate) - } - - // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectConditionSetUpdate) - private static final io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate(); - } - - public static io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubjectConditionSetUpdate 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.SubjectConditionSetUpdate getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - -} - diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java deleted file mode 100644 index f7e3d91f59..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetUpdateOrBuilder.java +++ /dev/null @@ -1,89 +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 SubjectConditionSetUpdateOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectConditionSetUpdate) - com.google.protobuf.MessageOrBuilder { - - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string updated_name = 1 [json_name = "updatedName"]; - * @return The updatedName. - */ - java.lang.String getUpdatedName(); - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string updated_name = 1 [json_name = "updatedName"]; - * @return The bytes for updatedName. - */ - com.google.protobuf.ByteString - getUpdatedNameBytes(); - - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return Whether the updatedMetadata field is set. - */ - boolean hasUpdatedMetadata(); - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - * @return The updatedMetadata. - */ - io.opentdf.platform.common.MetadataMutable getUpdatedMetadata(); - /** - * .common.MetadataMutable updated_metadata = 2 [json_name = "updatedMetadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getUpdatedMetadataOrBuilder(); - - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - java.util.List - getUpdatedSubjectSetsList(); - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdatedSubjectSets(int index); - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - int getUpdatedSubjectSetsCount(); - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - java.util.List - getUpdatedSubjectSetsOrBuilderList(); - /** - *
    -   * Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet updated_subject_sets = 3 [json_name = "updatedSubjectSets", (.buf.validate.field) = { ... } - */ - io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdatedSubjectSetsOrBuilder( - int index); -} 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 38d991f851..01d5bd9699 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 @@ -140,11 +140,6 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor; - static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor; static final @@ -268,86 +263,82 @@ public static void registerAllExtensions( "reateSubjectConditionSetResponse\022^\n\025subj" + "ect_condition_set\030\001 \001(\0132*.policy.subject" + "mapping.SubjectConditionSetR\023subjectCond" + - "itionSet\"\341\001\n\031SubjectConditionSetUpdate\022!" + - "\n\014updated_name\030\001 \001(\tR\013updatedName\022B\n\020upd" + - "ated_metadata\030\002 \001(\0132\027.common.MetadataMut" + - "ableR\017updatedMetadata\022]\n\024updated_subject" + - "_sets\030\003 \003(\0132!.policy.subjectmapping.Subj" + - "ectSetB\010\272H\005\222\001\002\010\001R\022updatedSubjectSets\"\240\001\n" + - " UpdateSubjectConditionSetRequest\022\026\n\002id\030" + - "\001 \001(\tB\006\272H\003\310\001\001R\002id\022d\n\025subject_condition_s" + - "et\030\002 \001(\01320.policy.subjectmapping.Subject" + - "ConditionSetUpdateR\023subjectConditionSet\"" + - "\203\001\n!UpdateSubjectConditionSetResponse\022^\n" + - "\025subject_condition_set\030\001 \001(\0132*.policy.su" + - "bjectmapping.SubjectConditionSetR\023subjec" + - "tConditionSet\":\n DeleteSubjectConditionS" + - "etRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\203\001\n!De" + - "leteSubjectConditionSetResponse\022^\n\025subje" + - "ct_condition_set\030\001 \001(\0132*.policy.subjectm" + - "apping.SubjectConditionSetR\023subjectCondi" + - "tionSet*\233\001\n\032SubjectMappingOperatorEnum\022-" + - "\n)SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIF" + - "IED\020\000\022$\n SUBJECT_MAPPING_OPERATOR_ENUM_I" + - "N\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_ENUM_NOT" + - "_IN\020\002*\220\001\n\030ConditionBooleanTypeEnum\022+\n\'CO" + - "NDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022" + - "#\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036" + - "CONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n\025Sub" + - "jectMappingService\022\251\001\n\024MatchSubjectMappi" + - "ngs\0222.policy.subjectmapping.MatchSubject" + - "MappingsRequest\0323.policy.subjectmapping." + - "MatchSubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/s" + - "ubject-mappings/match:\007subject\022\227\001\n\023ListS" + - "ubjectMappings\0221.policy.subjectmapping.L" + - "istSubjectMappingsRequest\0322.policy.subje" + - "ctmapping.ListSubjectMappingsResponse\"\031\202" + - "\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSubjectM" + - "apping\022/.policy.subjectmapping.GetSubjec" + - "tMappingRequest\0320.policy.subjectmapping." + - "GetSubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subj" + - "ect-mappings/{id}\022\235\001\n\024CreateSubjectMappi" + - "ng\0222.policy.subjectmapping.CreateSubject" + - "MappingRequest\0323.policy.subjectmapping.C" + - "reateSubjectMappingResponse\"\034\202\323\344\223\002\026\"\021/su" + - "bject-mappings:\001*\022\242\001\n\024UpdateSubjectMappi" + - "ng\0222.policy.subjectmapping.UpdateSubject" + - "MappingRequest\0323.policy.subjectmapping.U" + - "pdateSubjectMappingResponse\"!\202\323\344\223\002\0332\026/su" + - "bject-mappings/{id}:\001*\022\237\001\n\024DeleteSubject" + - "Mapping\0222.policy.subjectmapping.DeleteSu" + - "bjectMappingRequest\0323.policy.subjectmapp" + - "ing.DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030" + - "*\026/subject-mappings/{id}\022\254\001\n\030ListSubject" + - "ConditionSets\0226.policy.subjectmapping.Li" + - "stSubjectConditionSetsRequest\0327.policy.s" + - "ubjectmapping.ListSubjectConditionSetsRe" + - "sponse\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022" + - "\253\001\n\026GetSubjectConditionSet\0224.policy.subj" + - "ectmapping.GetSubjectConditionSetRequest" + - "\0325.policy.subjectmapping.GetSubjectCondi" + - "tionSetResponse\"$\202\323\344\223\002\036\022\034/subject-condit" + - "ion-sets/{id}\022\262\001\n\031CreateSubjectCondition" + - "Set\0227.policy.subjectmapping.CreateSubjec" + - "tConditionSetRequest\0328.policy.subjectmap" + - "ping.CreateSubjectConditionSetResponse\"\"" + - "\202\323\344\223\002\034\"\027/subject-condition-sets:\001*\022\267\001\n\031U" + - "pdateSubjectConditionSet\0227.policy.subjec" + - "tmapping.UpdateSubjectConditionSetReques" + - "t\0328.policy.subjectmapping.UpdateSubjectC" + - "onditionSetResponse\"\'\202\323\344\223\002!2\034/subject-co" + - "ndition-sets/{id}:\001*\022\264\001\n\031DeleteSubjectCo" + - "nditionSet\0227.policy.subjectmapping.Delet" + - "eSubjectConditionSetRequest\0328.policy.sub" + - "jectmapping.DeleteSubjectConditionSetRes" + - "ponse\"$\202\323\344\223\002\036*\034/subject-condition-sets/{" + - "id}B\364\001\n)io.opentdf.platform.policy.subje" + - "ctmappingB\023SubjectMappingProtoP\001Z=github" + - ".com/opentdf/platform/protocol/go/policy" + - "/subjectmapping\242\002\003PSX\252\002\025Policy.Subjectma" + - "pping\312\002\025Policy\\Subjectmapping\342\002!Policy\\S" + - "ubjectmapping\\GPBMetadata\352\002\026Policy::Subj" + - "ectmappingb\006proto3" + "itionSet\"\360\001\n UpdateSubjectConditionSetRe" + + "quest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022\037\n\013update_" + + "name\030\002 \001(\tR\nupdateName\022@\n\017update_metadat" + + "a\030\003 \001(\0132\027.common.MetadataMutableR\016update" + + "Metadata\022Q\n\023update_subject_sets\030\004 \003(\0132!." + + "policy.subjectmapping.SubjectSetR\021update" + + "SubjectSets\"\203\001\n!UpdateSubjectConditionSe" + + "tResponse\022^\n\025subject_condition_set\030\001 \001(\013" + + "2*.policy.subjectmapping.SubjectConditio" + + "nSetR\023subjectConditionSet\":\n DeleteSubje" + + "ctConditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001" + + "\001R\002id\"\203\001\n!DeleteSubjectConditionSetRespo" + + "nse\022^\n\025subject_condition_set\030\001 \001(\0132*.pol" + + "icy.subjectmapping.SubjectConditionSetR\023" + + "subjectConditionSet*\233\001\n\032SubjectMappingOp" + + "eratorEnum\022-\n)SUBJECT_MAPPING_OPERATOR_E" + + "NUM_UNSPECIFIED\020\000\022$\n SUBJECT_MAPPING_OPE" + + "RATOR_ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERA" + + "TOR_ENUM_NOT_IN\020\002*\220\001\n\030ConditionBooleanTy" + + "peEnum\022+\n\'CONDITION_BOOLEAN_TYPE_ENUM_UN" + + "SPECIFIED\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_EN" + + "UM_AND\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_" + + "OR\020\0022\340\016\n\025SubjectMappingService\022\251\001\n\024Match" + + "SubjectMappings\0222.policy.subjectmapping." + + "MatchSubjectMappingsRequest\0323.policy.sub" + + "jectmapping.MatchSubjectMappingsResponse" + + "\"(\202\323\344\223\002\"\"\027/subject-mappings/match:\007subje" + + "ct\022\227\001\n\023ListSubjectMappings\0221.policy.subj" + + "ectmapping.ListSubjectMappingsRequest\0322." + + "policy.subjectmapping.ListSubjectMapping" + + "sResponse\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n" + + "\021GetSubjectMapping\022/.policy.subjectmappi" + + "ng.GetSubjectMappingRequest\0320.policy.sub" + + "jectmapping.GetSubjectMappingResponse\"\036\202" + + "\323\344\223\002\030\022\026/subject-mappings/{id}\022\235\001\n\024Create" + + "SubjectMapping\0222.policy.subjectmapping.C" + + "reateSubjectMappingRequest\0323.policy.subj" + + "ectmapping.CreateSubjectMappingResponse\"" + + "\034\202\323\344\223\002\026\"\021/subject-mappings:\001*\022\242\001\n\024Update" + + "SubjectMapping\0222.policy.subjectmapping.U" + + "pdateSubjectMappingRequest\0323.policy.subj" + + "ectmapping.UpdateSubjectMappingResponse\"" + + "!\202\323\344\223\002\0332\026/subject-mappings/{id}:\001*\022\237\001\n\024D" + + "eleteSubjectMapping\0222.policy.subjectmapp" + + "ing.DeleteSubjectMappingRequest\0323.policy" + + ".subjectmapping.DeleteSubjectMappingResp" + + "onse\"\036\202\323\344\223\002\030*\026/subject-mappings/{id}\022\254\001\n" + + "\030ListSubjectConditionSets\0226.policy.subje" + + "ctmapping.ListSubjectConditionSetsReques" + + "t\0327.policy.subjectmapping.ListSubjectCon" + + "ditionSetsResponse\"\037\202\323\344\223\002\031\022\027/subject-con" + + "dition-sets\022\253\001\n\026GetSubjectConditionSet\0224" + + ".policy.subjectmapping.GetSubjectConditi" + + "onSetRequest\0325.policy.subjectmapping.Get" + + "SubjectConditionSetResponse\"$\202\323\344\223\002\036\022\034/su" + + "bject-condition-sets/{id}\022\262\001\n\031CreateSubj" + + "ectConditionSet\0227.policy.subjectmapping." + + "CreateSubjectConditionSetRequest\0328.polic" + + "y.subjectmapping.CreateSubjectConditionS" + + "etResponse\"\"\202\323\344\223\002\034\"\027/subject-condition-s" + + "ets:\001*\022\267\001\n\031UpdateSubjectConditionSet\0227.p" + + "olicy.subjectmapping.UpdateSubjectCondit" + + "ionSetRequest\0328.policy.subjectmapping.Up" + + "dateSubjectConditionSetResponse\"\'\202\323\344\223\002!2" + + "\034/subject-condition-sets/{id}:\001*\022\264\001\n\031Del" + + "eteSubjectConditionSet\0227.policy.subjectm" + + "apping.DeleteSubjectConditionSetRequest\032" + + "8.policy.subjectmapping.DeleteSubjectCon" + + "ditionSetResponse\"$\202\323\344\223\002\036*\034/subject-cond" + + "ition-sets/{id}B\364\001\n)io.opentdf.platform." + + "policy.subjectmappingB\023SubjectMappingPro" + + "toP\001Z=github.com/opentdf/platform/protoc" + + "ol/go/policy/subjectmapping\242\002\003PSX\252\002\025Poli" + + "cy.Subjectmapping\312\002\025Policy\\Subjectmappin" + + "g\342\002!Policy\\Subjectmapping\\GPBMetadata\352\002\026" + + "Policy::Subjectmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -509,32 +500,26 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor, new java.lang.String[] { "SubjectConditionSet", }); - internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor = - getDescriptor().getMessageTypes().get(25); - internal_static_policy_subjectmapping_SubjectConditionSetUpdate_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_SubjectConditionSetUpdate_descriptor, - new java.lang.String[] { "UpdatedName", "UpdatedMetadata", "UpdatedSubjectSets", }); internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(26); + getDescriptor().getMessageTypes().get(25); internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor, - new java.lang.String[] { "Id", "SubjectConditionSet", }); + new java.lang.String[] { "Id", "UpdateName", "UpdateMetadata", "UpdateSubjectSets", }); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(27); + getDescriptor().getMessageTypes().get(26); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor, new java.lang.String[] { "SubjectConditionSet", }); internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor = - getDescriptor().getMessageTypes().get(28); + getDescriptor().getMessageTypes().get(27); internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor, new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor = - getDescriptor().getMessageTypes().get(29); + getDescriptor().getMessageTypes().get(28); internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor, diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java index e10b15fb8a..f84bddda4d 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java @@ -18,6 +18,8 @@ private UpdateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3. } private UpdateSubjectConditionSetRequest() { id_ = ""; + updateName_ = ""; + updateSubjectSets_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -80,30 +82,138 @@ public java.lang.String getId() { } } - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 2; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate subjectConditionSet_; + public static final int UPDATE_NAME_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object updateName_ = ""; + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string update_name = 2 [json_name = "updateName"]; + * @return The updateName. + */ + @java.lang.Override + public java.lang.String getUpdateName() { + java.lang.Object ref = updateName_; + 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(); + updateName_ = s; + return s; + } + } + /** + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string update_name = 2 [json_name = "updateName"]; + * @return The bytes for updateName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getUpdateNameBytes() { + java.lang.Object ref = updateName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int UPDATE_METADATA_FIELD_NUMBER = 3; + private io.opentdf.platform.common.MetadataMutable updateMetadata_; /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * @return Whether the updateMetadata field is set. */ @java.lang.Override - public boolean hasSubjectConditionSet() { + public boolean hasUpdateMetadata() { return ((bitField0_ & 0x00000001) != 0); } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * @return The updateMetadata. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance() : subjectConditionSet_; + public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { + return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance() : subjectConditionSet_; + public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { + return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; + } + + public static final int UPDATE_SUBJECT_SETS_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private java.util.List updateSubjectSets_; + /** + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + @java.lang.Override + public java.util.List getUpdateSubjectSetsList() { + return updateSubjectSets_; + } + /** + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + @java.lang.Override + public java.util.List + getUpdateSubjectSetsOrBuilderList() { + return updateSubjectSets_; + } + /** + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + @java.lang.Override + public int getUpdateSubjectSetsCount() { + return updateSubjectSets_.size(); + } + /** + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index) { + return updateSubjectSets_.get(index); + } + /** + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( + int index) { + return updateSubjectSets_.get(index); } private byte memoizedIsInitialized = -1; @@ -123,8 +233,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, updateName_); + } if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getSubjectConditionSet()); + output.writeMessage(3, getUpdateMetadata()); + } + for (int i = 0; i < updateSubjectSets_.size(); i++) { + output.writeMessage(4, updateSubjectSets_.get(i)); } getUnknownFields().writeTo(output); } @@ -138,9 +254,16 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, updateName_); + } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getSubjectConditionSet()); + .computeMessageSize(3, getUpdateMetadata()); + } + for (int i = 0; i < updateSubjectSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, updateSubjectSets_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -159,11 +282,15 @@ public boolean equals(final java.lang.Object obj) { if (!getId() .equals(other.getId())) return false; - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; + if (!getUpdateName() + .equals(other.getUpdateName())) return false; + if (hasUpdateMetadata() != other.hasUpdateMetadata()) return false; + if (hasUpdateMetadata()) { + if (!getUpdateMetadata() + .equals(other.getUpdateMetadata())) return false; } + if (!getUpdateSubjectSetsList() + .equals(other.getUpdateSubjectSetsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -177,9 +304,15 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); + hash = (37 * hash) + UPDATE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateName().hashCode(); + if (hasUpdateMetadata()) { + hash = (37 * hash) + UPDATE_METADATA_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMetadata().hashCode(); + } + if (getUpdateSubjectSetsCount() > 0) { + hash = (37 * hash) + UPDATE_SUBJECT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getUpdateSubjectSetsList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -311,7 +444,8 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getSubjectConditionSetFieldBuilder(); + getUpdateMetadataFieldBuilder(); + getUpdateSubjectSetsFieldBuilder(); } } @java.lang.Override @@ -319,11 +453,19 @@ public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; + updateName_ = ""; + updateMetadata_ = null; + if (updateMetadataBuilder_ != null) { + updateMetadataBuilder_.dispose(); + updateMetadataBuilder_ = null; } + if (updateSubjectSetsBuilder_ == null) { + updateSubjectSets_ = java.util.Collections.emptyList(); + } else { + updateSubjectSets_ = null; + updateSubjectSetsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -350,21 +492,37 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetReques @java.lang.Override public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest buildPartial() { io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result = new io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { + if (updateSubjectSetsBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0)) { + updateSubjectSets_ = java.util.Collections.unmodifiableList(updateSubjectSets_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.updateSubjectSets_ = updateSubjectSets_; + } else { + result.updateSubjectSets_ = updateSubjectSetsBuilder_.build(); + } + } + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); + result.updateName_ = updateName_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000004) != 0)) { + result.updateMetadata_ = updateMetadataBuilder_ == null + ? updateMetadata_ + : updateMetadataBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; @@ -419,8 +577,39 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject bitField0_ |= 0x00000001; onChanged(); } - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); + if (!other.getUpdateName().isEmpty()) { + updateName_ = other.updateName_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.hasUpdateMetadata()) { + mergeUpdateMetadata(other.getUpdateMetadata()); + } + if (updateSubjectSetsBuilder_ == null) { + if (!other.updateSubjectSets_.isEmpty()) { + if (updateSubjectSets_.isEmpty()) { + updateSubjectSets_ = other.updateSubjectSets_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureUpdateSubjectSetsIsMutable(); + updateSubjectSets_.addAll(other.updateSubjectSets_); + } + onChanged(); + } + } else { + if (!other.updateSubjectSets_.isEmpty()) { + if (updateSubjectSetsBuilder_.isEmpty()) { + updateSubjectSetsBuilder_.dispose(); + updateSubjectSetsBuilder_ = null; + updateSubjectSets_ = other.updateSubjectSets_; + bitField0_ = (bitField0_ & ~0x00000008); + updateSubjectSetsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getUpdateSubjectSetsFieldBuilder() : null; + } else { + updateSubjectSetsBuilder_.addAllMessages(other.updateSubjectSets_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -454,12 +643,30 @@ public Builder mergeFrom( break; } // case 10 case 18: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); + updateName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 + case 26: { + input.readMessage( + getUpdateMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + io.opentdf.platform.policy.subjectmapping.SubjectSet m = + input.readMessage( + io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), + extensionRegistry); + if (updateSubjectSetsBuilder_ == null) { + ensureUpdateSubjectSetsIsMutable(); + updateSubjectSets_.add(m); + } else { + updateSubjectSetsBuilder_.addMessage(m); + } + break; + } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -549,125 +756,529 @@ public Builder setIdBytes( return this; } - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate subjectConditionSet_; + private java.lang.Object updateName_ = ""; + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string update_name = 2 [json_name = "updateName"]; + * @return The updateName. + */ + public java.lang.String getUpdateName() { + java.lang.Object ref = updateName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + updateName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string update_name = 2 [json_name = "updateName"]; + * @return The bytes for updateName. + */ + public com.google.protobuf.ByteString + getUpdateNameBytes() { + java.lang.Object ref = updateName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + updateName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string update_name = 2 [json_name = "updateName"]; + * @param value The updateName to set. + * @return This builder for chaining. + */ + public Builder setUpdateName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + updateName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string update_name = 2 [json_name = "updateName"]; + * @return This builder for chaining. + */ + public Builder clearUpdateName() { + updateName_ = getDefaultInstance().getUpdateName(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + *
    +     * an optional name for ease of reference
    +     * 
    + * + * string update_name = 2 [json_name = "updateName"]; + * @param value The bytes for updateName to set. + * @return This builder for chaining. + */ + public Builder setUpdateNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + updateName_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private io.opentdf.platform.common.MetadataMutable updateMetadata_; private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder> subjectConditionSetBuilder_; + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updateMetadataBuilder_; /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * @return Whether the updateMetadata field is set. */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000002) != 0); + public boolean hasUpdateMetadata() { + return ((bitField0_ & 0x00000004) != 0); } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * @return The updateMetadata. */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance() : subjectConditionSet_; + public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { + if (updateMetadataBuilder_ == null) { + return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } else { - return subjectConditionSetBuilder_.getMessage(); + return updateMetadataBuilder_.getMessage(); } } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate value) { - if (subjectConditionSetBuilder_ == null) { + public Builder setUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updateMetadataBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - subjectConditionSet_ = value; + updateMetadata_ = value; } else { - subjectConditionSetBuilder_.setMessage(value); + updateMetadataBuilder_.setMessage(value); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); + public Builder setUpdateMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (updateMetadataBuilder_ == null) { + updateMetadata_ = builderForValue.build(); } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); + updateMetadataBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000004; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); + public Builder mergeUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (updateMetadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + updateMetadata_ != null && + updateMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getUpdateMetadataBuilder().mergeFrom(value); } else { - subjectConditionSet_ = value; + updateMetadata_ = value; } } else { - subjectConditionSetBuilder_.mergeFrom(value); + updateMetadataBuilder_.mergeFrom(value); } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000002; + if (updateMetadata_ != null) { + bitField0_ |= 0x00000004; onChanged(); } return this; } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; */ - public Builder clearSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000002); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; + public Builder clearUpdateMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + updateMetadata_ = null; + if (updateMetadataBuilder_ != null) { + updateMetadataBuilder_.dispose(); + updateMetadataBuilder_ = null; } onChanged(); return this; } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder getSubjectConditionSetBuilder() { - bitField0_ |= 0x00000002; + public io.opentdf.platform.common.MetadataMutable.Builder getUpdateMetadataBuilder() { + bitField0_ |= 0x00000004; onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); + return getUpdateMetadataFieldBuilder().getBuilder(); } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); + public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { + if (updateMetadataBuilder_ != null) { + return updateMetadataBuilder_.getMessageOrBuilder(); } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.getDefaultInstance() : subjectConditionSet_; + return updateMetadata_ == null ? + io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } } /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; */ private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder>( - getSubjectConditionSet(), + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> + getUpdateMetadataFieldBuilder() { + if (updateMetadataBuilder_ == null) { + updateMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( + getUpdateMetadata(), + getParentForChildren(), + isClean()); + updateMetadata_ = null; + } + return updateMetadataBuilder_; + } + + private java.util.List updateSubjectSets_ = + java.util.Collections.emptyList(); + private void ensureUpdateSubjectSetsIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + updateSubjectSets_ = new java.util.ArrayList(updateSubjectSets_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> updateSubjectSetsBuilder_; + + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public java.util.List getUpdateSubjectSetsList() { + if (updateSubjectSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(updateSubjectSets_); + } else { + return updateSubjectSetsBuilder_.getMessageList(); + } + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public int getUpdateSubjectSetsCount() { + if (updateSubjectSetsBuilder_ == null) { + return updateSubjectSets_.size(); + } else { + return updateSubjectSetsBuilder_.getCount(); + } + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index) { + if (updateSubjectSetsBuilder_ == null) { + return updateSubjectSets_.get(index); + } else { + return updateSubjectSetsBuilder_.getMessage(index); + } + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public Builder setUpdateSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (updateSubjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdateSubjectSetsIsMutable(); + updateSubjectSets_.set(index, value); + onChanged(); + } else { + updateSubjectSetsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public Builder setUpdateSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { + if (updateSubjectSetsBuilder_ == null) { + ensureUpdateSubjectSetsIsMutable(); + updateSubjectSets_.set(index, builderForValue.build()); + onChanged(); + } else { + updateSubjectSetsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public Builder addUpdateSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (updateSubjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdateSubjectSetsIsMutable(); + updateSubjectSets_.add(value); + onChanged(); + } else { + updateSubjectSetsBuilder_.addMessage(value); + } + return this; + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public Builder addUpdateSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (updateSubjectSetsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureUpdateSubjectSetsIsMutable(); + updateSubjectSets_.add(index, value); + onChanged(); + } else { + updateSubjectSetsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public Builder addUpdateSubjectSets( + io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { + if (updateSubjectSetsBuilder_ == null) { + ensureUpdateSubjectSetsIsMutable(); + updateSubjectSets_.add(builderForValue.build()); + onChanged(); + } else { + updateSubjectSetsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public Builder addUpdateSubjectSets( + int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { + if (updateSubjectSetsBuilder_ == null) { + ensureUpdateSubjectSetsIsMutable(); + updateSubjectSets_.add(index, builderForValue.build()); + onChanged(); + } else { + updateSubjectSetsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public Builder addAllUpdateSubjectSets( + java.lang.Iterable values) { + if (updateSubjectSetsBuilder_ == null) { + ensureUpdateSubjectSetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, updateSubjectSets_); + onChanged(); + } else { + updateSubjectSetsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public Builder clearUpdateSubjectSets() { + if (updateSubjectSetsBuilder_ == null) { + updateSubjectSets_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + updateSubjectSetsBuilder_.clear(); + } + return this; + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public Builder removeUpdateSubjectSets(int index) { + if (updateSubjectSetsBuilder_ == null) { + ensureUpdateSubjectSetsIsMutable(); + updateSubjectSets_.remove(index); + onChanged(); + } else { + updateSubjectSetsBuilder_.remove(index); + } + return this; + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getUpdateSubjectSetsBuilder( + int index) { + return getUpdateSubjectSetsFieldBuilder().getBuilder(index); + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( + int index) { + if (updateSubjectSetsBuilder_ == null) { + return updateSubjectSets_.get(index); } else { + return updateSubjectSetsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public java.util.List + getUpdateSubjectSetsOrBuilderList() { + if (updateSubjectSetsBuilder_ != null) { + return updateSubjectSetsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(updateSubjectSets_); + } + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSubjectSetsBuilder() { + return getUpdateSubjectSetsFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSubjectSetsBuilder( + int index) { + return getUpdateSubjectSetsFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); + } + /** + *
    +     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + public java.util.List + getUpdateSubjectSetsBuilderList() { + return getUpdateSubjectSetsFieldBuilder().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> + getUpdateSubjectSetsFieldBuilder() { + if (updateSubjectSetsBuilder_ == null) { + updateSubjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( + updateSubjectSets_, + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); - subjectConditionSet_ = null; + updateSubjectSets_ = null; } - return subjectConditionSetBuilder_; + return updateSubjectSetsBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java index b91bdfba2e..2cd3aeb309 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java @@ -21,17 +21,81 @@ public interface UpdateSubjectConditionSetRequestOrBuilder extends getIdBytes(); /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string update_name = 2 [json_name = "updateName"]; + * @return The updateName. */ - boolean hasSubjectConditionSet(); + java.lang.String getUpdateName(); /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. + *
    +   * an optional name for ease of reference
    +   * 
    + * + * string update_name = 2 [json_name = "updateName"]; + * @return The bytes for updateName. */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdate getSubjectConditionSet(); + com.google.protobuf.ByteString + getUpdateNameBytes(); + + /** + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * @return Whether the updateMetadata field is set. + */ + boolean hasUpdateMetadata(); + /** + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * @return The updateMetadata. + */ + io.opentdf.platform.common.MetadataMutable getUpdateMetadata(); + /** + * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder(); + + /** + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + java.util.List + getUpdateSubjectSetsList(); + /** + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index); + /** + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + int getUpdateSubjectSetsCount(); + /** + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + */ + java.util.List + getUpdateSubjectSetsOrBuilderList(); /** - * .policy.subjectmapping.SubjectConditionSetUpdate subject_condition_set = 2 [json_name = "subjectConditionSet"]; + *
    +   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * 
    + * + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetUpdateOrBuilder getSubjectConditionSetOrBuilder(); + io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( + int index); } diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 8be5f863da..eaf7a69df0 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -372,25 +372,26 @@ func updateSubjectConditionSetSql(id string, name string, metadata []byte, condi ToSql() } -func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string, s *subjectmapping.SubjectConditionSetUpdate) (*subjectmapping.SubjectConditionSet, error) { +func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, s *subjectmapping.UpdateSubjectConditionSetRequest) (*subjectmapping.SubjectConditionSet, error) { var ( subjectSets []*subjectmapping.SubjectSet condition []byte + name string ) // While an SCS can be retrieved by 'name', an 'id' is required to update one - prev, err := c.GetSubjectConditionSet(ctx, id, "") + prev, err := c.GetSubjectConditionSet(ctx, s.Id, "") if err != nil { return nil, err } - metadataJSON, metadata, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdatedMetadata) + metadataJSON, metadata, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdateMetadata) if err != nil { return nil, err } - if s.UpdatedSubjectSets != nil { - subjectSets = s.UpdatedSubjectSets + if s.UpdateSubjectSets != nil { + subjectSets = s.UpdateSubjectSets condition, err = marshalSubjectSetsProto(subjectSets) if err != nil { return nil, err @@ -399,13 +400,15 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string subjectSets = prev.SubjectSets } - if s.UpdatedName == "" { - s.UpdatedName = prev.Name + if s.UpdateName != "" { + name = s.UpdateName + } else { + name = prev.Name } sql, args, err := updateSubjectConditionSetSql( - id, - s.UpdatedName, + s.Id, + name, metadataJSON, condition, ) @@ -415,8 +418,8 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, id string } return &subjectmapping.SubjectConditionSet{ - Id: id, - Name: s.UpdatedName, + Id: s.Id, + Name: name, Metadata: metadata, SubjectSets: subjectSets, }, nil @@ -492,7 +495,7 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp return nil, err } } else { - return nil, fmt.Errorf("no subject condition set provided") + return nil, errors.Join(db.ErrMissingRequiredValue, errors.New("either an existing Subject Condition Set ID or a new one is required when creating a subject mapping")) } metadataJSON, metadata, err := db.MarshalCreateMetadata(s.Metadata) @@ -500,7 +503,7 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp return nil, err } if s.Actions == nil { - return nil, errors.Join(db.ErrMissingRequiredValue) + return nil, errors.Join(db.ErrMissingRequiredValue, errors.New("actions are required when creating a subject mapping")) } actionsJSON, err := marshalActionsProto(s.Actions) if err != nil { diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index 45caa204b9..29c6933644 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -29,6 +29,10 @@ func NewRegistration() serviceregistry.Registration { } } +/* --------------------------------------------------- + * ----------------- SubjectMappings ----------------- + * --------------------------------------------------*/ + func (s SubjectMappingService) CreateSubjectMapping(ctx context.Context, req *sm.CreateSubjectMappingRequest, ) (*sm.CreateSubjectMappingResponse, error) { @@ -81,7 +85,7 @@ func (s SubjectMappingService) UpdateSubjectMapping(ctx context.Context, mapping, err := s.dbClient.UpdateSubjectMapping(ctx, req) if err != nil { - return nil, services.HandleError(err, services.ErrUpdateFailed, slog.String("id", req.Id), slog.String("subjectMapping", req.String())) + return nil, services.HandleError(err, services.ErrUpdateFailed, slog.String("id", req.Id), slog.String("subjectMapping fields", req.String())) } rsp.SubjectMapping = mapping @@ -103,3 +107,82 @@ func (s SubjectMappingService) DeleteSubjectMapping(ctx context.Context, return rsp, nil } + +/* -------------------------------------------------------- + * ----------------- SubjectConditionSets ----------------- + * -------------------------------------------------------*/ + +func (s SubjectMappingService) GetSubjectConditionSet(ctx context.Context, + req *sm.GetSubjectConditionSetRequest, +) (*sm.GetSubjectConditionSetResponse, error) { + rsp := &sm.GetSubjectConditionSetResponse{} + + conditionSet, err := s.dbClient.GetSubjectConditionSet(ctx, req.Id, "") + if err != nil { + return nil, services.HandleError(err, services.ErrGetRetrievalFailed, slog.String("id", req.Id)) + } + + rsp.SubjectConditionSet = conditionSet + + return rsp, nil +} + +func (s SubjectMappingService) ListSubjectConditionSets(ctx context.Context, + req *sm.ListSubjectConditionSetsRequest, +) (*sm.ListSubjectConditionSetsResponse, error) { + rsp := &sm.ListSubjectConditionSetsResponse{} + + conditionSets, err := s.dbClient.ListSubjectConditionSets(ctx) + if err != nil { + return nil, services.HandleError(err, services.ErrListRetrievalFailed) + } + + rsp.SubjectConditionSets = conditionSets + + return rsp, nil +} + +func (s SubjectMappingService) CreateSubjectConditionSet(ctx context.Context, + req *sm.CreateSubjectConditionSetRequest, +) (*sm.CreateSubjectConditionSetResponse, error) { + rsp := &sm.CreateSubjectConditionSetResponse{} + slog.Debug("creating subject condition set") + + conditionSet, err := s.dbClient.CreateSubjectConditionSet(context.Background(), req.SubjectConditionSet) + if err != nil { + return nil, services.HandleError(err, services.ErrCreationFailed, slog.String("subjectConditionSet", req.String())) + } + rsp.SubjectConditionSet = conditionSet + + return rsp, nil +} + +func (s SubjectMappingService) UpdateSubjectConditionSet(ctx context.Context, + req *sm.UpdateSubjectConditionSetRequest, +) (*sm.UpdateSubjectConditionSetResponse, error) { + rsp := &sm.UpdateSubjectConditionSetResponse{} + + conditionSet, err := s.dbClient.UpdateSubjectConditionSet(ctx, req) + if err != nil { + return nil, services.HandleError(err, services.ErrUpdateFailed, slog.String("id", req.Id), slog.String("subjectConditionSet fields", req.String())) + } + + rsp.SubjectConditionSet = conditionSet + + return rsp, nil +} + +func (s SubjectMappingService) DeleteSubjectConditionSet(ctx context.Context, + req *sm.DeleteSubjectConditionSetRequest, +) (*sm.DeleteSubjectConditionSetResponse, error) { + rsp := &sm.DeleteSubjectConditionSetResponse{} + + conditionSet, err := s.dbClient.DeleteSubjectConditionSet(ctx, req.Id) + if err != nil { + return nil, services.HandleError(err, services.ErrDeletionFailed, slog.String("id", req.Id)) + } + + rsp.SubjectConditionSet = conditionSet + + return rsp, nil +} diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index d98670e1b5..6bc4e567ba 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -270,18 +270,16 @@ message CreateSubjectConditionSetResponse { SubjectConditionSet subject_condition_set = 1; } -message SubjectConditionSetUpdate { +message UpdateSubjectConditionSetRequest { + string id = 1 [(buf.validate.field).required = true]; + // an optional name for ease of reference - string updated_name = 1; + string update_name = 2; - common.MetadataMutable updated_metadata = 2; + common.MetadataMutable update_metadata = 3; - // Replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions - repeated SubjectSet updated_subject_sets = 3 [(buf.validate.field).repeated.min_items = 1]; -} -message UpdateSubjectConditionSetRequest { - string id = 1 [(buf.validate.field).required = true]; - SubjectConditionSetUpdate subject_condition_set = 2; + // if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions + repeated SubjectSet update_subject_sets = 4; } message UpdateSubjectConditionSetResponse { SubjectConditionSet subject_condition_set = 1; From 1a55c661059e89aa0663ab170bb41d0bbe75ac58 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 13:42:58 -0500 Subject: [PATCH 13/39] provide back active state of attribute values with attributes when getting/listing subject mappings (and test for it) --- integration/subject_mappings_test.go | 2 ++ services/policy/db/subject_mappings.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index c545dabce2..c2a9bd37e4 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -396,6 +396,7 @@ func (s *SubjectMappingsSuite) TestGetSubjectMapping() { assert.NotNil(s.T(), sm) assert.Equal(s.T(), fixture.Id, sm.Id) assert.Equal(s.T(), fixture.AttributeValueId, sm.AttributeValue.Id) + assert.True(s.T(), sm.AttributeValue.Active.Value) assert.Equal(s.T(), fixture.SubjectConditionSetId, sm.SubjectConditionSet.Id) // verify the actions @@ -433,6 +434,7 @@ func (s *SubjectMappingsSuite) TestListSubjectMappings() { assertEqual := func(sm *subjectmapping.SubjectMapping, fixture fixtures.FixtureDataSubjectMapping) { assert.Equal(s.T(), fixture.AttributeValueId, sm.AttributeValue.Id) + assert.True(s.T(), sm.AttributeValue.Active.Value) assert.Equal(s.T(), fixture.SubjectConditionSetId, sm.SubjectConditionSet.Id) assert.Equal(s.T(), len(fixture.Actions), len(sm.Actions)) } diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index d5a5f39664..600afd872b 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -163,11 +163,11 @@ func subjectMappingSelect() sq.SelectBuilder { "'metadata', "+scsT.Field("metadata")+", "+ "'subject_sets', "+scsT.Field("condition")+ ") AS subject_condition_set", - // TODO: verify we don't need more info about the attribute value here on the JOIN here "JSON_BUILD_OBJECT("+ "'id', "+avT.Field("id")+", "+ "'value', "+avT.Field("value")+", "+ - "'members', "+avT.Field("members")+ + "'members', "+avT.Field("members")+", "+ + "'active'", avT.Field("active")+ ") AS attribute_value", ). LeftJoin(avT.Name() + " ON " + t.Field("attribute_value_id") + " = " + avT.Field("id")). From 25e87e1657f17dff02cf72fa6e95b70fbf6f3026 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 13:46:55 -0500 Subject: [PATCH 14/39] cleanup --- services/policy/db/subject_mappings.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 600afd872b..e16590b199 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -5,7 +5,6 @@ import ( "database/sql" "encoding/json" "errors" - "fmt" "log/slog" sq "github.com/Masterminds/squirrel" @@ -112,10 +111,6 @@ func subjectConditionSetHydrateItem(row pgx.Row) (*subjectmapping.SubjectConditi return nil, db.WrapIfKnownInvalidQueryErr(err) } - // TODO: do we actually need this check here? Add an integration test for it. - if condition == nil { - return nil, errors.Join(db.ErrNotNullViolation, fmt.Errorf("condition not found for subject condition set %s", id)) - } m := &common.Metadata{} if metadata != nil { if err := protojson.Unmarshal(metadata, m); err != nil { From f9db1b20b369b04e5847e491e76fa237518fe9c4 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 13:55:08 -0500 Subject: [PATCH 15/39] clean subjectmappings proto comments --- docs/grpc/index.html | 2 +- .../subject_mapping.swagger.json | 2 +- .../subjectmapping/subject_mapping.pb.go | 2 +- .../policy/subjectmapping/SubjectMapping.java | 4 +-- .../subjectmapping/subject_mapping.proto | 29 +++++++++++++++---- 5 files changed, 29 insertions(+), 10 deletions(-) diff --git a/docs/grpc/index.html b/docs/grpc/index.html index ee51de9262..b4260f7293 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -5792,7 +5792,7 @@

    SubjectConditionSetCrea

    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_condition_sets": [{subject_set_1},{subject_set_2}]

    "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}]

    }

    +

    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_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...},

    "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}]

    }

    diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 65c710b332..5aff7059cf 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -808,7 +808,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_condition_sets\": [{subject_set_1},{subject_set_2}]\n\"actions\": [{\"standard\": \"STANDARD_ACTION_DECRYPT\"}\", {\"standard\": \"STANDARD_ACTION_TRANSMIT\"}]\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_condition_set\": {\"subject_sets\":[{subject_set_1},{subject_set_2}]...},\n\"actions\": [{\"standard\": \"STANDARD_ACTION_DECRYPT\"}\", {\"standard\": \"STANDARD_ACTION_TRANSMIT\"}]\n}", "title": "Subject Mapping: A Policy assigning Subject Set(s) to a permitted attribute value + action(s) combination" }, "subjectmappingSubjectMappingOperatorEnum": { diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 40c44b5cee..82581a624c 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -397,7 +397,7 @@ func (x *SubjectConditionSet) GetSubjectSets() []*SubjectSet { // { // "id": "someid", // "attribute_value": {example_one_attribute_value...}, -// "subject_condition_sets": [{subject_set_1},{subject_set_2}] +// "subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...}, // "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] // } type SubjectMapping struct { 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 6a81890a1b..defee7c4b0 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 @@ -14,7 +14,7 @@ *{ *"id": "someid", *"attribute_value": {example_one_attribute_value...}, - *"subject_condition_sets": [{subject_set_1},{subject_set_2}] + *"subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...}, *"actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] *} * @@ -485,7 +485,7 @@ protected Builder newBuilderForType( *{ *"id": "someid", *"attribute_value": {example_one_attribute_value...}, - *"subject_condition_sets": [{subject_set_1},{subject_set_2}] + *"subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...}, *"actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] *} * diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 6bc4e567ba..ee42265e2b 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -33,9 +33,28 @@ import "policy/attributes/attributes.proto"; } }, "attribute_value_id": "12345678-1234-1234-1234-123456789012", - "subject_set_ids": [ - "0000-1111-2222" - ], + # optional to eitherprovide existing SubjectConditionSet (which takes precedence) + "existing_subject_condition_set_id": "0000-1111-2222", + # or to create new SubjectConditionSet + "new_subject_condition_set": { + "name": "sample-subject-condition-set", + "subject_sets": [ + { + "condition_groups": [ + { + "conditions": [ + { + "subject_external_field": "division", + "operator": "IN", + "subject_external_values": ["Sales", "Marketing"] + } + ], + "boolean_operator": "AND" + } + ] + } + ] + }, "actions": [ { "standard": "STANDARD_ACTION_TRANSMIT" @@ -45,7 +64,7 @@ import "policy/attributes/attributes.proto"; } ] } - }' localhost:8080 SubjectMappingService.CreateSubjectMapping + }' localhost:8080 policy.subjectmapping.SubjectMappingService.CreateSubjectMapping ``` ## Find matching subject mappings for Subject alice: @@ -146,7 +165,7 @@ message SubjectConditionSet { { "id": "someid", "attribute_value": {example_one_attribute_value...}, - "subject_condition_sets": [{subject_set_1},{subject_set_2}] + "subject_condition_set": {"subject_sets":[{subject_set_1},{subject_set_2}]...}, "actions": [{"standard": "STANDARD_ACTION_DECRYPT"}", {"standard": "STANDARD_ACTION_TRANSMIT"}] } */ From ab555ce95a5855fa1f5fbfd6fdb46e26a5f39503 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 14:31:24 -0500 Subject: [PATCH 16/39] remove name as a column and proto field on subject condition sets, sticking with pattern of putting any name within labels --- docs/grpc/index.html | 16 +- .../subject_mapping.swagger.json | 10 +- integration/subject_mappings_test.go | 184 +------- internal/fixtures/fixtures.go | 2 - internal/fixtures/fixtures.yaml | 4 - ...240304000000_add_subject_condition_sets.md | 1 - ...40304000000_add_subject_condition_sets.sql | 1 - .../subjectmapping/subject_mapping.pb.go | 415 +++++++++--------- .../SubjectConditionSetCreate.java | 236 ++-------- .../SubjectConditionSetCreateOrBuilder.java | 30 +- .../subjectmapping/SubjectMappingProto.java | 177 ++++---- .../UpdateSubjectConditionSetRequest.java | 334 ++++---------- ...teSubjectConditionSetRequestOrBuilder.java | 46 +- services/policy/db/subject_mappings.go | 57 +-- .../policy/subjectmapping/subject_mapping.go | 2 +- .../subjectmapping/subject_mapping.proto | 14 +- 16 files changed, 451 insertions(+), 1078 deletions(-) diff --git a/docs/grpc/index.html b/docs/grpc/index.html index b4260f7293..e0ac2fecae 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -5770,13 +5770,6 @@

    SubjectConditionSetCrea

    - - - - - - - @@ -5884,13 +5877,6 @@

    UpdateSubjectCon

    - - - - - - - @@ -5902,7 +5888,7 @@

    UpdateSubjectCon

    - + diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 5aff7059cf..9de322ec41 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -155,10 +155,6 @@ "schema": { "type": "object", "properties": { - "updateName": { - "type": "string", - "title": "an optional name for ease of reference" - }, "updateMetadata": { "$ref": "#/definitions/commonMetadataMutable" }, @@ -168,7 +164,7 @@ "type": "object", "$ref": "#/definitions/subjectmappingSubjectSet" }, - "title": "if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, \u0026 Conditions" + "title": "if provided, replaces entire existing structure of Subject Sets, Condition Groups, \u0026 Conditions" } } } @@ -768,10 +764,6 @@ "metadata": { "$ref": "#/definitions/commonMetadataMutable" }, - "name": { - "type": "string", - "title": "an optional name for ease of reference" - }, "subjectSets": { "type": "array", "items": { diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index c2a9bd37e4..fec7c80fa9 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -147,48 +147,6 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NewSubjectConditionSet() assert.Equal(s.T(), expectedCondition.SubjectExternalValues, gotCondition.SubjectExternalValues) } -func (s *SubjectMappingsSuite) TestCreateSubjectMapping_PrefersExistingSubjectConditionSetIdWhenBothProvided() { - fixtureAttrValId := s.f.GetAttributeValueKey("example.com/attr/attr2/value/value1").Id - fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") - aTransmit := fixtureActions[TRANSMIT] - - scs := &subjectmapping.SubjectConditionSetCreate{ - SubjectSets: []*subjectmapping.SubjectSet{ - { - ConditionGroups: []*subjectmapping.ConditionGroup{ - { - BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_AND, - Conditions: []*subjectmapping.Condition{ - { - SubjectExternalField: "field", - Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, - SubjectExternalValues: []string{"value"}, - }, - }, - }, - }, - }, - }, - Name: "should_be_ignored", - } - - new := &subjectmapping.CreateSubjectMappingRequest{ - AttributeValueId: fixtureAttrValId, - ExistingSubjectConditionSetId: fixtureScs.Id, - Actions: []*authorization.Action{aTransmit}, - NewSubjectConditionSet: scs, - } - - sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) - assert.Nil(s.T(), err) - assert.NotNil(s.T(), sm) - - // verify the new subject condition set was not used - assert.NotNil(s.T(), sm.SubjectConditionSet) - assert.Equal(s.T(), fixtureScs.Id, sm.SubjectConditionSet.Id) - assert.NotEqual(s.T(), scs.Name, sm.SubjectConditionSet.Name) -} - func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NoActions_Fails() { fixtureAttrVal := s.f.GetAttributeValueKey("example.com/attr/attr2/value/value1") fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") @@ -510,7 +468,6 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_DoesNotDeleteSubjectCond }, }, }, - Name: "delete_sm_does_not_cascade_delete_scs", } aTransmit := fixtureActions[TRANSMIT] @@ -529,7 +486,7 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_DoesNotDeleteSubjectCond assert.Nil(s.T(), err) assert.NotNil(s.T(), deleted) - scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdScsId, "") + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdScsId) assert.Nil(s.T(), err) assert.NotNil(s.T(), scs) assert.Equal(s.T(), createdScsId, scs.Id) @@ -539,35 +496,7 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_DoesNotDeleteSubjectCond *----------------- SubjectConditionSets ----------------- *-------------------------------------------------------*/ -func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet_WithOptionalName() { - new := &subjectmapping.SubjectConditionSetCreate{ - SubjectSets: []*subjectmapping.SubjectSet{ - { - ConditionGroups: []*subjectmapping.ConditionGroup{ - { - BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_AND, - Conditions: []*subjectmapping.Condition{ - { - SubjectExternalField: "userId", - Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, - SubjectExternalValues: []string{"email@gmail.com", "hello@yahoo.com"}, - }, - }, - }, - }, - }, - }, - Name: "subject_condition_set_create", - } - - scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) - assert.Nil(s.T(), err) - assert.NotNil(s.T(), scs) - assert.Equal(s.T(), scs.Name, "subject_condition_set_create") - assert.Equal(s.T(), len(new.SubjectSets), len(scs.SubjectSets)) -} - -func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet_NoOptionalName() { +func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet() { new := &subjectmapping.SubjectConditionSetCreate{ SubjectSets: []*subjectmapping.SubjectSet{ { @@ -590,71 +519,26 @@ func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet_NoOptionalName() { scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) assert.NotNil(s.T(), scs) - assert.Equal(s.T(), "", scs.Name) -} - -func (s *SubjectMappingsSuite) TestCreateSubjectConditionSet_OnNameConflict_Fails() { - fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") - new := &subjectmapping.SubjectConditionSetCreate{ - // DB does not validate subject condition sets; only protos do - SubjectSets: []*subjectmapping.SubjectSet{}, - Name: fixtureScs.Name, - } - - scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) - assert.NotNil(s.T(), err) - assert.Nil(s.T(), scs) - assert.ErrorIs(s.T(), err, db.ErrUniqueConstraintViolation) } func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_ById() { fixture := s.f.GetSubjectConditionSetKey("subject_condition_set1") - scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, fixture.Id, "") - assert.Nil(s.T(), err) - assert.NotNil(s.T(), scs) - assert.Equal(s.T(), fixture.Id, scs.Id) - assert.Equal(s.T(), fixture.Name, scs.Name) -} - -func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_ByName() { - fixture := s.f.GetSubjectConditionSetKey("subject_condition_set2") - - scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "", fixture.Name) - assert.Nil(s.T(), err) - assert.NotNil(s.T(), scs) - assert.Equal(s.T(), fixture.Id, scs.Id) - assert.Equal(s.T(), fixture.Name, scs.Name) -} - -func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_WithIdAndNamePrefersId() { - fixture := s.f.GetSubjectConditionSetKey("subject_condition_set2") - fixtureWrong := s.f.GetSubjectConditionSetKey("subject_condition_set1") - - scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, fixture.Id, fixtureWrong.Name) + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, fixture.Id) assert.Nil(s.T(), err) assert.NotNil(s.T(), scs) assert.Equal(s.T(), fixture.Id, scs.Id) - assert.Equal(s.T(), fixture.Name, scs.Name) - assert.NotEqual(s.T(), fixtureWrong.Id, scs.Id) } -func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_WithNoIdOrName_Fails() { - scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "", "") +func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_WithNoId_Fails() { + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "") assert.NotNil(s.T(), err) assert.Nil(s.T(), scs) - assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) + assert.ErrorIs(s.T(), err, db.ErrUuidInvalid) } func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_NonExistentId_Fails() { - scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, nonExistentSubjectSetId, "") - assert.NotNil(s.T(), err) - assert.Nil(s.T(), scs) - assert.ErrorIs(s.T(), err, db.ErrNotFound) -} - -func (s *SubjectMappingsSuite) TestGetSubjectConditionSet_NonExistentName_Fails() { - scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "", "nonexistent_name") + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, nonExistentSubjectSetId) assert.NotNil(s.T(), err) assert.Nil(s.T(), scs) assert.ErrorIs(s.T(), err, db.ErrNotFound) @@ -696,7 +580,6 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet() { // create a new subject condition set, delete it, and verify get fails with not found new := &subjectmapping.SubjectConditionSetCreate{ SubjectSets: []*subjectmapping.SubjectSet{}, - Name: "subject_condition_set_delete", } scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) @@ -707,12 +590,7 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet() { assert.Nil(s.T(), err) assert.NotNil(s.T(), deleted) - scs, err = s.db.PolicyClient.GetSubjectConditionSet(s.ctx, scs.Id, "") - assert.NotNil(s.T(), err) - assert.Nil(s.T(), scs) - assert.ErrorIs(s.T(), err, db.ErrNotFound) - - scs, err = s.db.PolicyClient.GetSubjectConditionSet(s.ctx, "", new.Name) + scs, err = s.db.PolicyClient.GetSubjectConditionSet(s.ctx, scs.Id) assert.NotNil(s.T(), err) assert.Nil(s.T(), scs) assert.ErrorIs(s.T(), err, db.ErrNotFound) @@ -725,54 +603,12 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet_WithNonExistentId_F assert.ErrorIs(s.T(), err, db.ErrNotFound) } -func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_Name() { - new := &subjectmapping.SubjectConditionSetCreate{ - SubjectSets: []*subjectmapping.SubjectSet{ - { - ConditionGroups: []*subjectmapping.ConditionGroup{ - { - BooleanOperator: subjectmapping.ConditionBooleanTypeEnum_CONDITION_BOOLEAN_TYPE_ENUM_AND, - Conditions: []*subjectmapping.Condition{ - { - SubjectExternalField: "origin", - Operator: subjectmapping.SubjectMappingOperatorEnum_SUBJECT_MAPPING_OPERATOR_ENUM_IN, - SubjectExternalValues: []string{"USA", "Canada"}, - }, - }, - }, - }, - }, - }, - Name: "subject_condition_set_update_name", - } - - scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) - assert.Nil(s.T(), err) - assert.NotNil(s.T(), scs) - - // update the name alone and verify nothing else changed - newName := "subject_condition_set_update_name_updated" - update := &subjectmapping.UpdateSubjectConditionSetRequest{ - UpdateName: newName, - Id: scs.Id, - } - - updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) - assert.Nil(s.T(), err) - assert.NotNil(s.T(), updated) - assert.Equal(s.T(), scs.Id, updated.Id) - assert.Equal(s.T(), newName, updated.Name) - assert.Equal(s.T(), len(scs.SubjectSets), len(updated.SubjectSets)) - assert.Equal(s.T(), scs.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField, updated.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) -} - func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { // create a new one, update nothing but the subject sets, and verify the solo update new := &subjectmapping.SubjectConditionSetCreate{ SubjectSets: []*subjectmapping.SubjectSet{ {}, }, - Name: "subject_condition_set_update_subject_sets", } scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) @@ -806,7 +642,6 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { assert.Nil(s.T(), err) assert.NotNil(s.T(), updated) assert.Equal(s.T(), scs.Id, updated.Id) - assert.Equal(s.T(), new.Name, updated.Name) assert.Equal(s.T(), len(ss), len(updated.SubjectSets)) assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, updated.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) } @@ -817,7 +652,6 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() SubjectSets: []*subjectmapping.SubjectSet{ {}, }, - Name: "subject_condition_set_update_all", } scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) @@ -845,7 +679,6 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() Labels: map[string]string{"key_example": "value_example"}, } update := &subjectmapping.UpdateSubjectConditionSetRequest{ - UpdateName: "subject_condition_set_update_all_updated", UpdateSubjectSets: ss, UpdateMetadata: metadata, Id: scs.Id, @@ -856,7 +689,6 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() assert.Nil(s.T(), err) assert.NotNil(s.T(), updated) assert.Equal(s.T(), scs.Id, updated.Id) - assert.Equal(s.T(), update.UpdateName, updated.Name) assert.Equal(s.T(), len(ss), len(updated.SubjectSets)) assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, updated.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) assert.Equal(s.T(), metadata.Labels["somewhere"], updated.Metadata.Labels["somewhere"]) diff --git a/internal/fixtures/fixtures.go b/internal/fixtures/fixtures.go index c7e749d72d..c95de56fc1 100644 --- a/internal/fixtures/fixtures.go +++ b/internal/fixtures/fixtures.go @@ -64,7 +64,6 @@ type FixtureDataSubjectMapping struct { type SubjectConditionSet struct { Id string `yaml:"id"` - Name string `yaml:"name"` Condition struct { SubjectSets []struct { ConditionGroups []struct { @@ -311,7 +310,6 @@ func (f *Fixtures) provisionSubjectConditionSet() int64 { values = append(values, []string{ f.db.StringWrap(d.Id), - f.db.OptionalStringWrap(d.Name), f.db.StringWrap(string(conditionJSON)), }) } diff --git a/internal/fixtures/fixtures.yaml b/internal/fixtures/fixtures.yaml index 750d04df44..62467dac27 100644 --- a/internal/fixtures/fixtures.yaml +++ b/internal/fixtures/fixtures.yaml @@ -214,12 +214,10 @@ subject_condition_set: table_name: subject_condition_set columns: - id - - name - condition data: subject_condition_set1: id: b3903282-06f9-41a4-924a-7b8eb43dffe0 - name: avenger_hammer_wielders condition: subject_sets: - condition_groups: @@ -236,7 +234,6 @@ subject_condition_set: - avengers subject_condition_set2: id: 798aacd2-abaf-4623-975e-3bb8ca43e318 - name: sales_and_marketing_executives condition: subject_sets: - condition_groups: @@ -255,7 +252,6 @@ subject_condition_set: - director subject_condition_set3: id: eaf866c0-327f-4826-846a-5041c3c22f06 - name: engineering_non_managers_who_like_soccer_or_not_ice_cream condition: subject_sets: - condition_groups: diff --git a/migrations/20240304000000_add_subject_condition_sets.md b/migrations/20240304000000_add_subject_condition_sets.md index 4d8fbe0766..87554bf3c0 100644 --- a/migrations/20240304000000_add_subject_condition_sets.md +++ b/migrations/20240304000000_add_subject_condition_sets.md @@ -116,7 +116,6 @@ erDiagram SubjectConditionSet { uuid id PK - varchar name "optional, but unique if provided" jsonb metadata jsonb condition "marshaled proto SubjectSets -> ConditionGroups -> Conditions" } diff --git a/migrations/20240304000000_add_subject_condition_sets.sql b/migrations/20240304000000_add_subject_condition_sets.sql index 46cf08813f..e5f8590a98 100644 --- a/migrations/20240304000000_add_subject_condition_sets.sql +++ b/migrations/20240304000000_add_subject_condition_sets.sql @@ -3,7 +3,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 ); diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 82581a624c..d5e61b0d5c 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -1342,10 +1342,8 @@ type SubjectConditionSetCreate struct { unknownFields protoimpl.UnknownFields Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - // an optional name for ease of reference - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // multiple Subject Sets are evaluated with AND logic - SubjectSets []*SubjectSet `protobuf:"bytes,3,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` + SubjectSets []*SubjectSet `protobuf:"bytes,2,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` } func (x *SubjectConditionSetCreate) Reset() { @@ -1387,13 +1385,6 @@ func (x *SubjectConditionSetCreate) GetMetadata() *common.MetadataMutable { return nil } -func (x *SubjectConditionSetCreate) GetName() string { - if x != nil { - return x.Name - } - return "" -} - func (x *SubjectConditionSetCreate) GetSubjectSets() []*SubjectSet { if x != nil { return x.SubjectSets @@ -1500,12 +1491,10 @@ type UpdateSubjectConditionSetRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // an optional name for ease of reference - UpdateName string `protobuf:"bytes,2,opt,name=update_name,json=updateName,proto3" json:"update_name,omitempty"` - UpdateMetadata *common.MetadataMutable `protobuf:"bytes,3,opt,name=update_metadata,json=updateMetadata,proto3" json:"update_metadata,omitempty"` - // if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions - UpdateSubjectSets []*SubjectSet `protobuf:"bytes,4,rep,name=update_subject_sets,json=updateSubjectSets,proto3" json:"update_subject_sets,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + UpdateMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=update_metadata,json=updateMetadata,proto3" json:"update_metadata,omitempty"` + // if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions + UpdateSubjectSets []*SubjectSet `protobuf:"bytes,3,rep,name=update_subject_sets,json=updateSubjectSets,proto3" json:"update_subject_sets,omitempty"` } func (x *UpdateSubjectConditionSetRequest) Reset() { @@ -1547,13 +1536,6 @@ func (x *UpdateSubjectConditionSetRequest) GetId() string { return "" } -func (x *UpdateSubjectConditionSetRequest) GetUpdateName() string { - if x != nil { - return x.UpdateName - } - return "" -} - func (x *UpdateSubjectConditionSetRequest) GetUpdateMetadata() *common.MetadataMutable { if x != nil { return x.UpdateMetadata @@ -1919,224 +1901,221 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, - 0x22, 0xb4, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x22, 0xa0, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 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, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4e, 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, - 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, + 0x61, 0x74, 0x61, 0x12, 0x4e, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, + 0x65, 0x74, 0x73, 0x18, 0x02, 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, 0x42, 0x08, 0xba, 0x48, + 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, + 0x65, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0xf0, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 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, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 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, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x21, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, + 0x01, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, + 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, - 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 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, + 0x53, 0x65, 0x74, 0x52, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, + 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 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, + 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, 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, 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, 0xe0, 0x0e, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, - 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, - 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, - 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x5f, 0x4f, 0x52, 0x10, 0x02, 0x32, + 0xe0, 0x0e, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x12, 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x12, 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, 0x21, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, + 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, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 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, - 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, + 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, 0x12, + 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, + 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, - 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, - 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, - 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, + 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, + 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, + 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, + 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, + 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, - 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, - 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, - 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, + 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, - 0x74, 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, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 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 ( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java index adcde3c75b..4327f011c0 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java @@ -17,7 +17,6 @@ private SubjectConditionSetCreate(com.google.protobuf.GeneratedMessageV3.Builder super(builder); } private SubjectConditionSetCreate() { - name_ = ""; subjectSets_ = java.util.Collections.emptyList(); } @@ -68,54 +67,7 @@ public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder( return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; } - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string name = 2 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string name = 2 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SUBJECT_SETS_FIELD_NUMBER = 3; + public static final int SUBJECT_SETS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List subjectSets_; /** @@ -123,7 +75,7 @@ public java.lang.String getName() { * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List getSubjectSetsList() { @@ -134,7 +86,7 @@ public java.util.List getS * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List @@ -146,7 +98,7 @@ public java.util.List getS * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public int getSubjectSetsCount() { @@ -157,7 +109,7 @@ public int getSubjectSetsCount() { * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { @@ -168,7 +120,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int i * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( @@ -193,11 +145,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getMetadata()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); - } for (int i = 0; i < subjectSets_.size(); i++) { - output.writeMessage(3, subjectSets_.get(i)); + output.writeMessage(2, subjectSets_.get(i)); } getUnknownFields().writeTo(output); } @@ -212,12 +161,9 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getMetadata()); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } for (int i = 0; i < subjectSets_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, subjectSets_.get(i)); + .computeMessageSize(2, subjectSets_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -239,8 +185,6 @@ public boolean equals(final java.lang.Object obj) { if (!getMetadata() .equals(other.getMetadata())) return false; } - if (!getName() - .equals(other.getName())) return false; if (!getSubjectSetsList() .equals(other.getSubjectSetsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; @@ -258,8 +202,6 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + getMetadata().hashCode(); } - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); if (getSubjectSetsCount() > 0) { hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; hash = (53 * hash) + getSubjectSetsList().hashCode(); @@ -407,14 +349,13 @@ public Builder clear() { metadataBuilder_.dispose(); metadataBuilder_ = null; } - name_ = ""; if (subjectSetsBuilder_ == null) { subjectSets_ = java.util.Collections.emptyList(); } else { subjectSets_ = null; subjectSetsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -449,9 +390,9 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate build private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result) { if (subjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); } result.subjectSets_ = subjectSets_; } else { @@ -468,9 +409,6 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectCond : metadataBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } result.bitField0_ |= to_bitField0_; } @@ -521,16 +459,11 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectCondit if (other.hasMetadata()) { mergeMetadata(other.getMetadata()); } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } if (subjectSetsBuilder_ == null) { if (!other.subjectSets_.isEmpty()) { if (subjectSets_.isEmpty()) { subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureSubjectSetsIsMutable(); subjectSets_.addAll(other.subjectSets_); @@ -543,7 +476,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectCondit subjectSetsBuilder_.dispose(); subjectSetsBuilder_ = null; subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); subjectSetsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubjectSetsFieldBuilder() : null; @@ -586,11 +519,6 @@ public Builder mergeFrom( break; } // case 10 case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { io.opentdf.platform.policy.subjectmapping.SubjectSet m = input.readMessage( io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), @@ -602,7 +530,7 @@ public Builder mergeFrom( subjectSetsBuilder_.addMessage(m); } break; - } // case 26 + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -741,104 +669,12 @@ public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder( return metadataBuilder_; } - private java.lang.Object name_ = ""; - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - private java.util.List subjectSets_ = java.util.Collections.emptyList(); private void ensureSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { subjectSets_ = new java.util.ArrayList(subjectSets_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; } } @@ -850,7 +686,7 @@ private void ensureSubjectSetsIsMutable() { * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsList() { if (subjectSetsBuilder_ == null) { @@ -864,7 +700,7 @@ public java.util.List getS * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public int getSubjectSetsCount() { if (subjectSetsBuilder_ == null) { @@ -878,7 +714,7 @@ public int getSubjectSetsCount() { * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { if (subjectSetsBuilder_ == null) { @@ -892,7 +728,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int i * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -913,7 +749,7 @@ public Builder setSubjectSets( * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -931,7 +767,7 @@ public Builder setSubjectSets( * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { if (subjectSetsBuilder_ == null) { @@ -951,7 +787,7 @@ public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectS * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -972,7 +808,7 @@ public Builder addSubjectSets( * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -990,7 +826,7 @@ public Builder addSubjectSets( * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1008,7 +844,7 @@ public Builder addSubjectSets( * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addAllSubjectSets( java.lang.Iterable values) { @@ -1027,12 +863,12 @@ public Builder addAllSubjectSets( * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder clearSubjectSets() { if (subjectSetsBuilder_ == null) { subjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { subjectSetsBuilder_.clear(); @@ -1044,7 +880,7 @@ public Builder clearSubjectSets() { * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder removeSubjectSets(int index) { if (subjectSetsBuilder_ == null) { @@ -1061,7 +897,7 @@ public Builder removeSubjectSets(int index) { * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetsBuilder( int index) { @@ -1072,7 +908,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSe * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index) { @@ -1086,7 +922,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsOrBuilderList() { @@ -1101,7 +937,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder() { return getSubjectSetsFieldBuilder().addBuilder( @@ -1112,7 +948,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder( int index) { @@ -1124,7 +960,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsBuilderList() { @@ -1137,7 +973,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe 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), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); subjectSets_ = null; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java index c57e6e324f..5dabf06b05 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java @@ -23,32 +23,12 @@ public interface SubjectConditionSetCreateOrBuilder extends */ io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string name = 2 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string name = 2 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - /** *
        * multiple Subject Sets are evaluated with AND logic
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ java.util.List getSubjectSetsList(); @@ -57,7 +37,7 @@ public interface SubjectConditionSetCreateOrBuilder extends * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index); /** @@ -65,7 +45,7 @@ public interface SubjectConditionSetCreateOrBuilder extends * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ int getSubjectSetsCount(); /** @@ -73,7 +53,7 @@ public interface SubjectConditionSetCreateOrBuilder extends * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ java.util.List getSubjectSetsOrBuilderList(); @@ -82,7 +62,7 @@ public interface SubjectConditionSetCreateOrBuilder extends * multiple Subject Sets are evaluated with AND logic * * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index); 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 01d5bd9699..9469715196 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 @@ -251,94 +251,93 @@ public static void registerAllExtensions( "ditionSetsRequest\"\204\001\n ListSubjectConditi" + "onSetsResponse\022`\n\026subject_condition_sets" + "\030\001 \003(\0132*.policy.subjectmapping.SubjectCo" + - "nditionSetR\024subjectConditionSets\"\264\001\n\031Sub" + + "nditionSetR\024subjectConditionSets\"\240\001\n\031Sub" + "jectConditionSetCreate\0223\n\010metadata\030\001 \001(\013" + - "2\027.common.MetadataMutableR\010metadata\022\022\n\004n" + - "ame\030\002 \001(\tR\004name\022N\n\014subject_sets\030\003 \003(\0132!." + - "policy.subjectmapping.SubjectSetB\010\272H\005\222\001\002" + - "\010\001R\013subjectSets\"\210\001\n CreateSubjectConditi" + - "onSetRequest\022d\n\025subject_condition_set\030\001 " + - "\001(\01320.policy.subjectmapping.SubjectCondi" + - "tionSetCreateR\023subjectConditionSet\"\203\001\n!C" + - "reateSubjectConditionSetResponse\022^\n\025subj" + - "ect_condition_set\030\001 \001(\0132*.policy.subject" + - "mapping.SubjectConditionSetR\023subjectCond" + - "itionSet\"\360\001\n UpdateSubjectConditionSetRe" + - "quest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022\037\n\013update_" + - "name\030\002 \001(\tR\nupdateName\022@\n\017update_metadat" + - "a\030\003 \001(\0132\027.common.MetadataMutableR\016update" + - "Metadata\022Q\n\023update_subject_sets\030\004 \003(\0132!." + - "policy.subjectmapping.SubjectSetR\021update" + - "SubjectSets\"\203\001\n!UpdateSubjectConditionSe" + - "tResponse\022^\n\025subject_condition_set\030\001 \001(\013" + - "2*.policy.subjectmapping.SubjectConditio" + - "nSetR\023subjectConditionSet\":\n DeleteSubje" + - "ctConditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001" + - "\001R\002id\"\203\001\n!DeleteSubjectConditionSetRespo" + - "nse\022^\n\025subject_condition_set\030\001 \001(\0132*.pol" + - "icy.subjectmapping.SubjectConditionSetR\023" + - "subjectConditionSet*\233\001\n\032SubjectMappingOp" + - "eratorEnum\022-\n)SUBJECT_MAPPING_OPERATOR_E" + - "NUM_UNSPECIFIED\020\000\022$\n SUBJECT_MAPPING_OPE" + - "RATOR_ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERA" + - "TOR_ENUM_NOT_IN\020\002*\220\001\n\030ConditionBooleanTy" + - "peEnum\022+\n\'CONDITION_BOOLEAN_TYPE_ENUM_UN" + - "SPECIFIED\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_EN" + - "UM_AND\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_" + - "OR\020\0022\340\016\n\025SubjectMappingService\022\251\001\n\024Match" + - "SubjectMappings\0222.policy.subjectmapping." + - "MatchSubjectMappingsRequest\0323.policy.sub" + - "jectmapping.MatchSubjectMappingsResponse" + - "\"(\202\323\344\223\002\"\"\027/subject-mappings/match:\007subje" + - "ct\022\227\001\n\023ListSubjectMappings\0221.policy.subj" + - "ectmapping.ListSubjectMappingsRequest\0322." + - "policy.subjectmapping.ListSubjectMapping" + - "sResponse\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n" + - "\021GetSubjectMapping\022/.policy.subjectmappi" + - "ng.GetSubjectMappingRequest\0320.policy.sub" + - "jectmapping.GetSubjectMappingResponse\"\036\202" + - "\323\344\223\002\030\022\026/subject-mappings/{id}\022\235\001\n\024Create" + - "SubjectMapping\0222.policy.subjectmapping.C" + - "reateSubjectMappingRequest\0323.policy.subj" + - "ectmapping.CreateSubjectMappingResponse\"" + - "\034\202\323\344\223\002\026\"\021/subject-mappings:\001*\022\242\001\n\024Update" + - "SubjectMapping\0222.policy.subjectmapping.U" + - "pdateSubjectMappingRequest\0323.policy.subj" + - "ectmapping.UpdateSubjectMappingResponse\"" + - "!\202\323\344\223\002\0332\026/subject-mappings/{id}:\001*\022\237\001\n\024D" + - "eleteSubjectMapping\0222.policy.subjectmapp" + - "ing.DeleteSubjectMappingRequest\0323.policy" + - ".subjectmapping.DeleteSubjectMappingResp" + - "onse\"\036\202\323\344\223\002\030*\026/subject-mappings/{id}\022\254\001\n" + - "\030ListSubjectConditionSets\0226.policy.subje" + - "ctmapping.ListSubjectConditionSetsReques" + - "t\0327.policy.subjectmapping.ListSubjectCon" + - "ditionSetsResponse\"\037\202\323\344\223\002\031\022\027/subject-con" + - "dition-sets\022\253\001\n\026GetSubjectConditionSet\0224" + - ".policy.subjectmapping.GetSubjectConditi" + - "onSetRequest\0325.policy.subjectmapping.Get" + - "SubjectConditionSetResponse\"$\202\323\344\223\002\036\022\034/su" + - "bject-condition-sets/{id}\022\262\001\n\031CreateSubj" + - "ectConditionSet\0227.policy.subjectmapping." + - "CreateSubjectConditionSetRequest\0328.polic" + - "y.subjectmapping.CreateSubjectConditionS" + - "etResponse\"\"\202\323\344\223\002\034\"\027/subject-condition-s" + - "ets:\001*\022\267\001\n\031UpdateSubjectConditionSet\0227.p" + - "olicy.subjectmapping.UpdateSubjectCondit" + - "ionSetRequest\0328.policy.subjectmapping.Up" + - "dateSubjectConditionSetResponse\"\'\202\323\344\223\002!2" + - "\034/subject-condition-sets/{id}:\001*\022\264\001\n\031Del" + - "eteSubjectConditionSet\0227.policy.subjectm" + - "apping.DeleteSubjectConditionSetRequest\032" + - "8.policy.subjectmapping.DeleteSubjectCon" + - "ditionSetResponse\"$\202\323\344\223\002\036*\034/subject-cond" + - "ition-sets/{id}B\364\001\n)io.opentdf.platform." + - "policy.subjectmappingB\023SubjectMappingPro" + - "toP\001Z=github.com/opentdf/platform/protoc" + - "ol/go/policy/subjectmapping\242\002\003PSX\252\002\025Poli" + - "cy.Subjectmapping\312\002\025Policy\\Subjectmappin" + - "g\342\002!Policy\\Subjectmapping\\GPBMetadata\352\002\026" + - "Policy::Subjectmappingb\006proto3" + "2\027.common.MetadataMutableR\010metadata\022N\n\014s" + + "ubject_sets\030\002 \003(\0132!.policy.subjectmappin" + + "g.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\210\001\n " + + "CreateSubjectConditionSetRequest\022d\n\025subj" + + "ect_condition_set\030\001 \001(\01320.policy.subject" + + "mapping.SubjectConditionSetCreateR\023subje" + + "ctConditionSet\"\203\001\n!CreateSubjectConditio" + + "nSetResponse\022^\n\025subject_condition_set\030\001 " + + "\001(\0132*.policy.subjectmapping.SubjectCondi" + + "tionSetR\023subjectConditionSet\"\317\001\n UpdateS" + + "ubjectConditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272" + + "H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132\027.com" + + "mon.MetadataMutableR\016updateMetadata\022Q\n\023u" + + "pdate_subject_sets\030\003 \003(\0132!.policy.subjec" + + "tmapping.SubjectSetR\021updateSubjectSets\"\203" + + "\001\n!UpdateSubjectConditionSetResponse\022^\n\025" + + "subject_condition_set\030\001 \001(\0132*.policy.sub" + + "jectmapping.SubjectConditionSetR\023subject" + + "ConditionSet\":\n DeleteSubjectConditionSe" + + "tRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\203\001\n!Del" + + "eteSubjectConditionSetResponse\022^\n\025subjec" + + "t_condition_set\030\001 \001(\0132*.policy.subjectma" + + "pping.SubjectConditionSetR\023subjectCondit" + + "ionSet*\233\001\n\032SubjectMappingOperatorEnum\022-\n" + + ")SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFI" + + "ED\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\'CON" + + "DITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022#" + + "\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036C" + + "ONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n\025Subj" + + "ectMappingService\022\251\001\n\024MatchSubjectMappin" + + "gs\0222.policy.subjectmapping.MatchSubjectM" + + "appingsRequest\0323.policy.subjectmapping.M" + + "atchSubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/su" + + "bject-mappings/match:\007subject\022\227\001\n\023ListSu" + + "bjectMappings\0221.policy.subjectmapping.Li" + + "stSubjectMappingsRequest\0322.policy.subjec" + + "tmapping.ListSubjectMappingsResponse\"\031\202\323" + + "\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSubjectMa" + + "pping\022/.policy.subjectmapping.GetSubject" + + "MappingRequest\0320.policy.subjectmapping.G" + + "etSubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subje" + + "ct-mappings/{id}\022\235\001\n\024CreateSubjectMappin" + + "g\0222.policy.subjectmapping.CreateSubjectM" + + "appingRequest\0323.policy.subjectmapping.Cr" + + "eateSubjectMappingResponse\"\034\202\323\344\223\002\026\"\021/sub" + + "ject-mappings:\001*\022\242\001\n\024UpdateSubjectMappin" + + "g\0222.policy.subjectmapping.UpdateSubjectM" + + "appingRequest\0323.policy.subjectmapping.Up" + + "dateSubjectMappingResponse\"!\202\323\344\223\002\0332\026/sub" + + "ject-mappings/{id}:\001*\022\237\001\n\024DeleteSubjectM" + + "apping\0222.policy.subjectmapping.DeleteSub" + + "jectMappingRequest\0323.policy.subjectmappi" + + "ng.DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030*" + + "\026/subject-mappings/{id}\022\254\001\n\030ListSubjectC" + + "onditionSets\0226.policy.subjectmapping.Lis" + + "tSubjectConditionSetsRequest\0327.policy.su" + + "bjectmapping.ListSubjectConditionSetsRes" + + "ponse\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022\253" + + "\001\n\026GetSubjectConditionSet\0224.policy.subje" + + "ctmapping.GetSubjectConditionSetRequest\032" + + "5.policy.subjectmapping.GetSubjectCondit" + + "ionSetResponse\"$\202\323\344\223\002\036\022\034/subject-conditi" + + "on-sets/{id}\022\262\001\n\031CreateSubjectConditionS" + + "et\0227.policy.subjectmapping.CreateSubject" + + "ConditionSetRequest\0328.policy.subjectmapp" + + "ing.CreateSubjectConditionSetResponse\"\"\202" + + "\323\344\223\002\034\"\027/subject-condition-sets:\001*\022\267\001\n\031Up" + + "dateSubjectConditionSet\0227.policy.subject" + + "mapping.UpdateSubjectConditionSetRequest" + + "\0328.policy.subjectmapping.UpdateSubjectCo" + + "nditionSetResponse\"\'\202\323\344\223\002!2\034/subject-con" + + "dition-sets/{id}:\001*\022\264\001\n\031DeleteSubjectCon" + + "ditionSet\0227.policy.subjectmapping.Delete" + + "SubjectConditionSetRequest\0328.policy.subj" + + "ectmapping.DeleteSubjectConditionSetResp" + + "onse\"$\202\323\344\223\002\036*\034/subject-condition-sets/{i" + + "d}B\364\001\n)io.opentdf.platform.policy.subjec" + + "tmappingB\023SubjectMappingProtoP\001Z=github." + + "com/opentdf/platform/protocol/go/policy/" + + "subjectmapping\242\002\003PSX\252\002\025Policy.Subjectmap" + + "ping\312\002\025Policy\\Subjectmapping\342\002!Policy\\Su" + + "bjectmapping\\GPBMetadata\352\002\026Policy::Subje" + + "ctmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -487,7 +486,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor, - new java.lang.String[] { "Metadata", "Name", "SubjectSets", }); + new java.lang.String[] { "Metadata", "SubjectSets", }); internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor = getDescriptor().getMessageTypes().get(23); internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable = new @@ -505,7 +504,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor, - new java.lang.String[] { "Id", "UpdateName", "UpdateMetadata", "UpdateSubjectSets", }); + new java.lang.String[] { "Id", "UpdateMetadata", "UpdateSubjectSets", }); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java index f84bddda4d..3b16b059ab 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java @@ -18,7 +18,6 @@ private UpdateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3. } private UpdateSubjectConditionSetRequest() { id_ = ""; - updateName_ = ""; updateSubjectSets_ = java.util.Collections.emptyList(); } @@ -82,57 +81,10 @@ public java.lang.String getId() { } } - public static final int UPDATE_NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object updateName_ = ""; - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string update_name = 2 [json_name = "updateName"]; - * @return The updateName. - */ - @java.lang.Override - public java.lang.String getUpdateName() { - java.lang.Object ref = updateName_; - 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(); - updateName_ = s; - return s; - } - } - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string update_name = 2 [json_name = "updateName"]; - * @return The bytes for updateName. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getUpdateNameBytes() { - java.lang.Object ref = updateName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UPDATE_METADATA_FIELD_NUMBER = 3; + public static final int UPDATE_METADATA_FIELD_NUMBER = 2; private io.opentdf.platform.common.MetadataMutable updateMetadata_; /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; * @return Whether the updateMetadata field is set. */ @java.lang.Override @@ -140,7 +92,7 @@ public boolean hasUpdateMetadata() { return ((bitField0_ & 0x00000001) != 0); } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; * @return The updateMetadata. */ @java.lang.Override @@ -148,22 +100,22 @@ public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ @java.lang.Override public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; } - public static final int UPDATE_SUBJECT_SETS_FIELD_NUMBER = 4; + public static final int UPDATE_SUBJECT_SETS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List updateSubjectSets_; /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ @java.lang.Override public java.util.List getUpdateSubjectSetsList() { @@ -171,10 +123,10 @@ public java.util.List getU } /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ @java.lang.Override public java.util.List @@ -183,10 +135,10 @@ public java.util.List getU } /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ @java.lang.Override public int getUpdateSubjectSetsCount() { @@ -194,10 +146,10 @@ public int getUpdateSubjectSetsCount() { } /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index) { @@ -205,10 +157,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets } /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( @@ -233,14 +185,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateName_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, updateName_); - } if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getUpdateMetadata()); + output.writeMessage(2, getUpdateMetadata()); } for (int i = 0; i < updateSubjectSets_.size(); i++) { - output.writeMessage(4, updateSubjectSets_.get(i)); + output.writeMessage(3, updateSubjectSets_.get(i)); } getUnknownFields().writeTo(output); } @@ -254,16 +203,13 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateName_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, updateName_); - } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUpdateMetadata()); + .computeMessageSize(2, getUpdateMetadata()); } for (int i = 0; i < updateSubjectSets_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, updateSubjectSets_.get(i)); + .computeMessageSize(3, updateSubjectSets_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -282,8 +228,6 @@ public boolean equals(final java.lang.Object obj) { if (!getId() .equals(other.getId())) return false; - if (!getUpdateName() - .equals(other.getUpdateName())) return false; if (hasUpdateMetadata() != other.hasUpdateMetadata()) return false; if (hasUpdateMetadata()) { if (!getUpdateMetadata() @@ -304,8 +248,6 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + UPDATE_NAME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateName().hashCode(); if (hasUpdateMetadata()) { hash = (37 * hash) + UPDATE_METADATA_FIELD_NUMBER; hash = (53 * hash) + getUpdateMetadata().hashCode(); @@ -453,7 +395,6 @@ public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; - updateName_ = ""; updateMetadata_ = null; if (updateMetadataBuilder_ != null) { updateMetadataBuilder_.dispose(); @@ -465,7 +406,7 @@ public Builder clear() { updateSubjectSets_ = null; updateSubjectSetsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -500,9 +441,9 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetReques private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { if (updateSubjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000004) != 0)) { updateSubjectSets_ = java.util.Collections.unmodifiableList(updateSubjectSets_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); } result.updateSubjectSets_ = updateSubjectSets_; } else { @@ -515,11 +456,8 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubje if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.updateName_ = updateName_; - } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000004) != 0)) { + if (((from_bitField0_ & 0x00000002) != 0)) { result.updateMetadata_ = updateMetadataBuilder_ == null ? updateMetadata_ : updateMetadataBuilder_.build(); @@ -577,11 +515,6 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject bitField0_ |= 0x00000001; onChanged(); } - if (!other.getUpdateName().isEmpty()) { - updateName_ = other.updateName_; - bitField0_ |= 0x00000002; - onChanged(); - } if (other.hasUpdateMetadata()) { mergeUpdateMetadata(other.getUpdateMetadata()); } @@ -589,7 +522,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject if (!other.updateSubjectSets_.isEmpty()) { if (updateSubjectSets_.isEmpty()) { updateSubjectSets_ = other.updateSubjectSets_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); } else { ensureUpdateSubjectSetsIsMutable(); updateSubjectSets_.addAll(other.updateSubjectSets_); @@ -602,7 +535,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject updateSubjectSetsBuilder_.dispose(); updateSubjectSetsBuilder_ = null; updateSubjectSets_ = other.updateSubjectSets_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); updateSubjectSetsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getUpdateSubjectSetsFieldBuilder() : null; @@ -643,18 +576,13 @@ public Builder mergeFrom( break; } // case 10 case 18: { - updateName_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { input.readMessage( getUpdateMetadataFieldBuilder().getBuilder(), extensionRegistry); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; break; - } // case 26 - case 34: { + } // case 18 + case 26: { io.opentdf.platform.policy.subjectmapping.SubjectSet m = input.readMessage( io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), @@ -666,7 +594,7 @@ public Builder mergeFrom( updateSubjectSetsBuilder_.addMessage(m); } break; - } // case 34 + } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -756,110 +684,18 @@ public Builder setIdBytes( return this; } - private java.lang.Object updateName_ = ""; - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string update_name = 2 [json_name = "updateName"]; - * @return The updateName. - */ - public java.lang.String getUpdateName() { - java.lang.Object ref = updateName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - updateName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string update_name = 2 [json_name = "updateName"]; - * @return The bytes for updateName. - */ - public com.google.protobuf.ByteString - getUpdateNameBytes() { - java.lang.Object ref = updateName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - updateName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string update_name = 2 [json_name = "updateName"]; - * @param value The updateName to set. - * @return This builder for chaining. - */ - public Builder setUpdateName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - updateName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string update_name = 2 [json_name = "updateName"]; - * @return This builder for chaining. - */ - public Builder clearUpdateName() { - updateName_ = getDefaultInstance().getUpdateName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string update_name = 2 [json_name = "updateName"]; - * @param value The bytes for updateName to set. - * @return This builder for chaining. - */ - public Builder setUpdateNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - updateName_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - private io.opentdf.platform.common.MetadataMutable updateMetadata_; private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updateMetadataBuilder_; /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; * @return Whether the updateMetadata field is set. */ public boolean hasUpdateMetadata() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; * @return The updateMetadata. */ public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { @@ -870,7 +706,7 @@ public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { } } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ public Builder setUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { if (updateMetadataBuilder_ == null) { @@ -881,12 +717,12 @@ public Builder setUpdateMetadata(io.opentdf.platform.common.MetadataMutable valu } else { updateMetadataBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ public Builder setUpdateMetadata( io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { @@ -895,16 +731,16 @@ public Builder setUpdateMetadata( } else { updateMetadataBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ public Builder mergeUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { if (updateMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && + if (((bitField0_ & 0x00000002) != 0) && updateMetadata_ != null && updateMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { getUpdateMetadataBuilder().mergeFrom(value); @@ -915,16 +751,16 @@ public Builder mergeUpdateMetadata(io.opentdf.platform.common.MetadataMutable va updateMetadataBuilder_.mergeFrom(value); } if (updateMetadata_ != null) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); } return this; } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ public Builder clearUpdateMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); updateMetadata_ = null; if (updateMetadataBuilder_ != null) { updateMetadataBuilder_.dispose(); @@ -934,15 +770,15 @@ public Builder clearUpdateMetadata() { return this; } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ public io.opentdf.platform.common.MetadataMutable.Builder getUpdateMetadataBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return getUpdateMetadataFieldBuilder().getBuilder(); } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { if (updateMetadataBuilder_ != null) { @@ -953,7 +789,7 @@ public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBu } } /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> @@ -972,9 +808,9 @@ public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBu private java.util.List updateSubjectSets_ = java.util.Collections.emptyList(); private void ensureUpdateSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { + if (!((bitField0_ & 0x00000004) != 0)) { updateSubjectSets_ = new java.util.ArrayList(updateSubjectSets_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; } } @@ -983,10 +819,10 @@ private void ensureUpdateSubjectSetsIsMutable() { /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public java.util.List getUpdateSubjectSetsList() { if (updateSubjectSetsBuilder_ == null) { @@ -997,10 +833,10 @@ public java.util.List getU } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public int getUpdateSubjectSetsCount() { if (updateSubjectSetsBuilder_ == null) { @@ -1011,10 +847,10 @@ public int getUpdateSubjectSetsCount() { } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index) { if (updateSubjectSetsBuilder_ == null) { @@ -1025,10 +861,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public Builder setUpdateSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -1046,10 +882,10 @@ public Builder setUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public Builder setUpdateSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1064,10 +900,10 @@ public Builder setUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public Builder addUpdateSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { if (updateSubjectSetsBuilder_ == null) { @@ -1084,10 +920,10 @@ public Builder addUpdateSubjectSets(io.opentdf.platform.policy.subjectmapping.Su } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public Builder addUpdateSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -1105,10 +941,10 @@ public Builder addUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public Builder addUpdateSubjectSets( io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1123,10 +959,10 @@ public Builder addUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public Builder addUpdateSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1141,10 +977,10 @@ public Builder addUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public Builder addAllUpdateSubjectSets( java.lang.Iterable values) { @@ -1160,15 +996,15 @@ public Builder addAllUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public Builder clearUpdateSubjectSets() { if (updateSubjectSetsBuilder_ == null) { updateSubjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { updateSubjectSetsBuilder_.clear(); @@ -1177,10 +1013,10 @@ public Builder clearUpdateSubjectSets() { } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public Builder removeUpdateSubjectSets(int index) { if (updateSubjectSetsBuilder_ == null) { @@ -1194,10 +1030,10 @@ public Builder removeUpdateSubjectSets(int index) { } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getUpdateSubjectSetsBuilder( int index) { @@ -1205,10 +1041,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getUpdateSub } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( int index) { @@ -1219,10 +1055,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSu } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public java.util.List getUpdateSubjectSetsOrBuilderList() { @@ -1234,10 +1070,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSu } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSubjectSetsBuilder() { return getUpdateSubjectSetsFieldBuilder().addBuilder( @@ -1245,10 +1081,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSub } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSubjectSetsBuilder( int index) { @@ -1257,10 +1093,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSub } /** *
    -     * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ public java.util.List getUpdateSubjectSetsBuilderList() { @@ -1273,7 +1109,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSub updateSubjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( updateSubjectSets_, - ((bitField0_ & 0x00000008) != 0), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); updateSubjectSets_ = null; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java index 2cd3aeb309..82db9ac7fd 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java @@ -21,80 +21,60 @@ public interface UpdateSubjectConditionSetRequestOrBuilder extends getIdBytes(); /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string update_name = 2 [json_name = "updateName"]; - * @return The updateName. - */ - java.lang.String getUpdateName(); - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string update_name = 2 [json_name = "updateName"]; - * @return The bytes for updateName. - */ - com.google.protobuf.ByteString - getUpdateNameBytes(); - - /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; * @return Whether the updateMetadata field is set. */ boolean hasUpdateMetadata(); /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; * @return The updateMetadata. */ io.opentdf.platform.common.MetadataMutable getUpdateMetadata(); /** - * .common.MetadataMutable update_metadata = 3 [json_name = "updateMetadata"]; + * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; */ io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder(); /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ java.util.List getUpdateSubjectSetsList(); /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index); /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ int getUpdateSubjectSetsCount(); /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ java.util.List getUpdateSubjectSetsOrBuilderList(); /** *
    -   * if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions
    +   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 4 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; */ io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( int index); diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index e16590b199..d38f9d2c52 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -2,7 +2,6 @@ package db import ( "context" - "database/sql" "encoding/json" "errors" "log/slog" @@ -87,7 +86,6 @@ func subjectConditionSetSelect() sq.SelectBuilder { t := db.Tables.SubjectConditionSet return db.NewStatementBuilder().Select( t.Field("id"), - t.Field("name"), t.Field("metadata"), t.Field("condition"), ) @@ -96,14 +94,12 @@ func subjectConditionSetSelect() sq.SelectBuilder { func subjectConditionSetHydrateItem(row pgx.Row) (*subjectmapping.SubjectConditionSet, error) { var ( id string - name sql.NullString metadata []byte condition []byte ) err := row.Scan( &id, - &name, &metadata, &condition, ) @@ -125,7 +121,6 @@ func subjectConditionSetHydrateItem(row pgx.Row) (*subjectmapping.SubjectConditi return &subjectmapping.SubjectConditionSet{ Id: id, - Name: name.String, SubjectSets: ss, Metadata: m, }, nil @@ -154,7 +149,6 @@ func subjectMappingSelect() sq.SelectBuilder { t.Field("metadata"), "JSON_BUILD_OBJECT("+ "'id', "+scsT.Field("id")+", "+ - "'name', "+scsT.Field("name")+", "+ "'metadata', "+scsT.Field("metadata")+", "+ "'subject_sets', "+scsT.Field("condition")+ ") AS subject_condition_set", @@ -245,7 +239,7 @@ func subjectMappingHydrateList(rows pgx.Rows) ([]*subjectmapping.SubjectMapping, return list, nil } -func createSubjectConditionSetSql(subjectSets []*subjectmapping.SubjectSet, metadataJSON []byte, name string) (string, []interface{}, error) { +func createSubjectConditionSetSql(subjectSets []*subjectmapping.SubjectSet, metadataJSON []byte) (string, []interface{}, error) { t := db.Tables.SubjectConditionSet conditionJSON, err := marshalSubjectSetsProto(subjectSets) if err != nil { @@ -254,10 +248,6 @@ func createSubjectConditionSetSql(subjectSets []*subjectmapping.SubjectSet, meta columns := []string{"condition", "metadata"} values := []interface{}{conditionJSON, metadataJSON} - if name != "" { - columns = append(columns, "name") - values = append(values, name) - } return db.NewStatementBuilder(). Insert(t.Name()). Columns(columns...). @@ -272,12 +262,11 @@ func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjec return nil, err } new := &subjectmapping.SubjectConditionSet{ - Name: s.Name, SubjectSets: s.SubjectSets, Metadata: m, } - sql, args, err := createSubjectConditionSetSql(s.SubjectSets, metadataJSON, s.Name) + sql, args, err := createSubjectConditionSetSql(s.SubjectSets, metadataJSON) if err != nil { return nil, err } @@ -294,22 +283,14 @@ func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjec return new, nil } -func getSubjectConditionSetSql(id string, name string) (string, []interface{}, error) { +func getSubjectConditionSetSql(id string) (string, []interface{}, error) { t := db.Tables.SubjectConditionSet - sb := subjectConditionSetSelect(). - From(t.Name()) - - if id != "" { - return sb.Where(sq.Eq{t.Field("id"): id}).ToSql() - } - if name != "" { - return sb.Where(sq.Eq{t.Field("name"): name}).ToSql() - } - return "", nil, errors.Join(db.ErrMissingRequiredValue, errors.New("error: Subject Condition Set id or name must be provided")) + return subjectConditionSetSelect(). + From(t.Name()).Where(sq.Eq{t.Field("id"): id}).ToSql() } -func (c PolicyDbClient) GetSubjectConditionSet(ctx context.Context, id string, name string) (*subjectmapping.SubjectConditionSet, error) { - sql, args, err := getSubjectConditionSetSql(id, name) +func (c PolicyDbClient) GetSubjectConditionSet(ctx context.Context, id string) (*subjectmapping.SubjectConditionSet, error) { + sql, args, err := getSubjectConditionSetSql(id) if err != nil { return nil, err } @@ -344,16 +325,12 @@ func (c PolicyDbClient) ListSubjectConditionSets(ctx context.Context) ([]*subjec return subjectConditionSetHydrateList(rows) } -func updateSubjectConditionSetSql(id string, name string, metadata []byte, condition []byte) (string, []interface{}, error) { +func updateSubjectConditionSetSql(id string, metadata []byte, condition []byte) (string, []interface{}, error) { t := db.Tables.SubjectConditionSet sb := db.NewStatementBuilder(). Update(t.Name()) - if name != "" { - sb = sb.Set("name", name) - } - if metadata != nil { sb = sb.Set("metadata", metadata) } @@ -370,11 +347,9 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, s *subjec var ( subjectSets []*subjectmapping.SubjectSet condition []byte - name string ) - // While an SCS can be retrieved by 'name', an 'id' is required to update one - prev, err := c.GetSubjectConditionSet(ctx, s.Id, "") + prev, err := c.GetSubjectConditionSet(ctx, s.Id) if err != nil { return nil, err } @@ -394,15 +369,8 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, s *subjec subjectSets = prev.SubjectSets } - if s.UpdateName != "" { - name = s.UpdateName - } else { - name = prev.Name - } - sql, args, err := updateSubjectConditionSetSql( s.Id, - name, metadataJSON, condition, ) @@ -413,7 +381,6 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, s *subjec return &subjectmapping.SubjectConditionSet{ Id: s.Id, - Name: name, Metadata: metadata, SubjectSets: subjectSets, }, nil @@ -428,7 +395,7 @@ func deleteSubjectConditionSetSql(id string) (string, []interface{}, error) { } func (c PolicyDbClient) DeleteSubjectConditionSet(ctx context.Context, id string) (*subjectmapping.SubjectConditionSet, error) { - prev, err := c.GetSubjectConditionSet(ctx, id, "") + prev, err := c.GetSubjectConditionSet(ctx, id) if err != nil { return nil, err } @@ -478,7 +445,7 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp // Prefer existing id over new creation per documented proto behavior. if s.ExistingSubjectConditionSetId != "" { // get the existing subject condition set - scs, err = c.GetSubjectConditionSet(ctx, s.ExistingSubjectConditionSetId, "") + scs, err = c.GetSubjectConditionSet(ctx, s.ExistingSubjectConditionSetId) if err != nil { return nil, err } @@ -625,7 +592,7 @@ func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapp } if r.UpdateSubjectConditionSetId != "" { - new, err := c.GetSubjectConditionSet(ctx, r.UpdateSubjectConditionSetId, "") + new, err := c.GetSubjectConditionSet(ctx, r.UpdateSubjectConditionSetId) if err != nil { return nil, err } diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index 29c6933644..f2b125dc71 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -117,7 +117,7 @@ func (s SubjectMappingService) GetSubjectConditionSet(ctx context.Context, ) (*sm.GetSubjectConditionSetResponse, error) { rsp := &sm.GetSubjectConditionSetResponse{} - conditionSet, err := s.dbClient.GetSubjectConditionSet(ctx, req.Id, "") + conditionSet, err := s.dbClient.GetSubjectConditionSet(ctx, req.Id) if err != nil { return nil, services.HandleError(err, services.ErrGetRetrievalFailed, slog.String("id", req.Id)) } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index ee42265e2b..8c1869e61d 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -276,11 +276,8 @@ message ListSubjectConditionSetsResponse { message SubjectConditionSetCreate { common.MetadataMutable metadata = 1; - // an optional name for ease of reference - string name = 2; - // multiple Subject Sets are evaluated with AND logic - repeated SubjectSet subject_sets = 3 [(buf.validate.field).repeated.min_items = 1]; + repeated SubjectSet subject_sets = 2 [(buf.validate.field).repeated.min_items = 1]; } message CreateSubjectConditionSetRequest { SubjectConditionSetCreate subject_condition_set = 1; @@ -291,14 +288,11 @@ message CreateSubjectConditionSetResponse { message UpdateSubjectConditionSetRequest { string id = 1 [(buf.validate.field).required = true]; - - // an optional name for ease of reference - string update_name = 2; - common.MetadataMutable update_metadata = 3; + common.MetadataMutable update_metadata = 2; - // if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions - repeated SubjectSet update_subject_sets = 4; + // if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions + repeated SubjectSet update_subject_sets = 3; } message UpdateSubjectConditionSetResponse { SubjectConditionSet subject_condition_set = 1; From 32cd6aea2a150b9de86dc84d0aa74b887e632ddd Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 14:32:17 -0500 Subject: [PATCH 17/39] cleanup --- integration/namespaces_test.go | 1 - integration/subject_mappings_test.go | 2 -- 2 files changed, 3 deletions(-) diff --git a/integration/namespaces_test.go b/integration/namespaces_test.go index 2034a44b1d..5b38929985 100644 --- a/integration/namespaces_test.go +++ b/integration/namespaces_test.go @@ -179,7 +179,6 @@ func (s *NamespacesSuite) Test_DeleteNamespace() { // Deleted namespace should not be found on Get _, err = s.db.PolicyClient.GetNamespace(s.ctx, newNamespaceId) - fmt.Println(err) assert.NotNil(s.T(), err) } diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index fec7c80fa9..54b235d654 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -2,7 +2,6 @@ package integration import ( "context" - "fmt" "log/slog" "testing" @@ -685,7 +684,6 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() } updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) - fmt.Println("here ", err) assert.Nil(s.T(), err) assert.NotNil(s.T(), updated) assert.Equal(s.T(), scs.Id, updated.Id) From 71f46dda927906aeb5211b621439ffab48afc1db Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 16:47:02 -0500 Subject: [PATCH 18/39] make delete, update, create only return id for subject mappings and subject condition sets, and reflect that in tests and service rpcs --- docs/grpc/index.html | 24 +- .../subject_mapping.swagger.json | 24 +- integration/subject_mappings_test.go | 200 +++---- .../subjectmapping/subject_mapping.pb.go | 518 ++++++++---------- .../CreateSubjectConditionSetResponse.java | 241 ++++---- ...eSubjectConditionSetResponseOrBuilder.java | 17 +- .../CreateSubjectMappingResponse.java | 241 ++++---- ...CreateSubjectMappingResponseOrBuilder.java | 17 +- .../DeleteSubjectConditionSetResponse.java | 241 ++++---- ...eSubjectConditionSetResponseOrBuilder.java | 17 +- .../DeleteSubjectMappingResponse.java | 241 ++++---- ...DeleteSubjectMappingResponseOrBuilder.java | 17 +- .../subjectmapping/SubjectMappingProto.java | 227 ++++---- .../UpdateSubjectConditionSetResponse.java | 241 ++++---- ...eSubjectConditionSetResponseOrBuilder.java | 17 +- .../UpdateSubjectMappingResponse.java | 241 ++++---- ...UpdateSubjectMappingResponseOrBuilder.java | 17 +- services/policy/db/subject_mappings.go | 150 +++-- .../policy/subjectmapping/subject_mapping.go | 42 +- .../subjectmapping/subject_mapping.proto | 12 +- 20 files changed, 1161 insertions(+), 1584 deletions(-) diff --git a/docs/grpc/index.html b/docs/grpc/index.html index e0ac2fecae..d9917a315d 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -5286,8 +5286,8 @@

    CreateSubjectCo

    - - + + @@ -5362,8 +5362,8 @@

    CreateSubjectMapping

    - - + + @@ -5410,8 +5410,8 @@

    DeleteSubjectCo

    - - + + @@ -5458,8 +5458,8 @@

    DeleteSubjectMapping

    - - + + @@ -5909,8 +5909,8 @@

    UpdateSubjectCo

    - - + + @@ -5978,8 +5978,8 @@

    UpdateSubjectMapping

    - - + + diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 9de322ec41..ddf344cedf 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -608,8 +608,8 @@ "subjectmappingCreateSubjectConditionSetResponse": { "type": "object", "properties": { - "subjectConditionSet": { - "$ref": "#/definitions/subjectmappingSubjectConditionSet" + "id": { + "type": "string" } } }, @@ -644,24 +644,24 @@ "subjectmappingCreateSubjectMappingResponse": { "type": "object", "properties": { - "subjectMapping": { - "$ref": "#/definitions/subjectmappingSubjectMapping" + "id": { + "type": "string" } } }, "subjectmappingDeleteSubjectConditionSetResponse": { "type": "object", "properties": { - "subjectConditionSet": { - "$ref": "#/definitions/subjectmappingSubjectConditionSet" + "id": { + "type": "string" } } }, "subjectmappingDeleteSubjectMappingResponse": { "type": "object", "properties": { - "subjectMapping": { - "$ref": "#/definitions/subjectmappingSubjectMapping" + "id": { + "type": "string" } } }, @@ -830,16 +830,16 @@ "subjectmappingUpdateSubjectConditionSetResponse": { "type": "object", "properties": { - "subjectConditionSet": { - "$ref": "#/definitions/subjectmappingSubjectConditionSet" + "id": { + "type": "string" } } }, "subjectmappingUpdateSubjectMappingResponse": { "type": "object", "properties": { - "subjectMapping": { - "$ref": "#/definitions/subjectmappingSubjectMapping" + "id": { + "type": "string" } } } diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index 54b235d654..fb7dd53369 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -2,6 +2,7 @@ package integration import ( "context" + "fmt" "log/slog" "testing" @@ -86,9 +87,13 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_ExistingSubjectCondition Actions: []*authorization.Action{aDecrypt, aTransmit}, } - sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + smId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + assert.Nil(s.T(), err) + assert.NotEqual(s.T(), "", smId) + + // verify the subject mapping was created + sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, smId) assert.Nil(s.T(), err) - assert.NotNil(s.T(), sm) assert.Equal(s.T(), new.AttributeValueId, sm.AttributeValue.Id) assert.Equal(s.T(), new.ExistingSubjectConditionSetId, sm.SubjectConditionSet.Id) assert.Equal(s.T(), 2, len(sm.Actions)) @@ -124,13 +129,14 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NewSubjectConditionSet() NewSubjectConditionSet: scs, } - sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + smId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), sm) - assert.Equal(s.T(), new.AttributeValueId, sm.AttributeValue.Id) - assert.Equal(s.T(), sm.GetActions(), new.Actions) + assert.NotEqual(s.T(), "", smId) + fmt.Println("outside creation of subject mapping") // verify the new subject condition set created was returned properly + sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, smId) + assert.Nil(s.T(), err) assert.NotNil(s.T(), sm.SubjectConditionSet) assert.Equal(s.T(), len(scs.SubjectSets), len(sm.SubjectConditionSet.SubjectSets)) @@ -154,9 +160,9 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NoActions_Fails() { ExistingSubjectConditionSetId: fixtureScs.Id, } - sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.NotNil(s.T(), err) - assert.Nil(s.T(), sm) + assert.Zero(s.T(), createdId) assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) } @@ -169,9 +175,9 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NonExistentAttributeValu AttributeValueId: nonExistentAttributeValueUuid, } - sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.NotNil(s.T(), err) - assert.Nil(s.T(), sm) + assert.Zero(s.T(), createdId) assert.ErrorIs(s.T(), err, db.ErrForeignKeyViolation) } @@ -184,9 +190,9 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NonExistentSubjectCondit ExistingSubjectConditionSetId: nonExistentSubjectSetId, } - sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.NotNil(s.T(), err) - assert.Nil(s.T(), sm) + assert.Zero(s.T(), createdId) assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -203,32 +209,29 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_Actions() { ExistingSubjectConditionSetId: fixtureScs.Id, } - initialCreate, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), initialCreate) + assert.NotEqual(s.T(), "", createdId) // update the subject mapping newActions := []*authorization.Action{aTransmit} update := &subjectmapping.UpdateSubjectMappingRequest{ - Id: initialCreate.Id, + Id: createdId, UpdateActions: newActions, } - updated, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + updatedId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.Nil(s.T(), err) - assert.NotNil(s.T(), updated) - assert.Equal(s.T(), initialCreate.Id, updated.Id) - assert.Equal(s.T(), len(newActions), len(updated.Actions)) - assert.Equal(s.T(), updated.GetActions(), newActions) + assert.Equal(s.T(), createdId, updatedId) // verify the actions were updated but nothing else - got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, initialCreate.Id) + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) assert.Nil(s.T(), err) assert.NotNil(s.T(), got) assert.Equal(s.T(), len(newActions), len(got.Actions)) assert.Equal(s.T(), got.GetActions(), newActions) - assert.Equal(s.T(), initialCreate.AttributeValue.Id, got.AttributeValue.Id) - assert.Equal(s.T(), initialCreate.SubjectConditionSet.Id, got.SubjectConditionSet.Id) + assert.Equal(s.T(), new.AttributeValueId, got.AttributeValue.Id) + assert.Equal(s.T(), new.ExistingSubjectConditionSetId, got.SubjectConditionSet.Id) } func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_SubjectConditionSetId() { @@ -243,32 +246,29 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_SubjectConditionSetId() ExistingSubjectConditionSetId: fixtureScs.Id, } - initialCreate, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), initialCreate) + assert.NotEqual(s.T(), "", createdId) // update the subject mapping newScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") update := &subjectmapping.UpdateSubjectMappingRequest{ - Id: initialCreate.Id, + Id: createdId, UpdateSubjectConditionSetId: newScs.Id, } - updated, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + updatedId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.Nil(s.T(), err) - assert.NotNil(s.T(), updated) - assert.Equal(s.T(), initialCreate.Id, updated.Id) - assert.Equal(s.T(), initialCreate.AttributeValue.Id, updated.AttributeValue.Id) - assert.Equal(s.T(), newScs.Id, updated.SubjectConditionSet.Id) + assert.Equal(s.T(), createdId, updatedId) // verify the subject condition set was updated but nothing else - got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, initialCreate.Id) + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) assert.Nil(s.T(), err) assert.NotNil(s.T(), got) - assert.Equal(s.T(), initialCreate.AttributeValue.Id, got.AttributeValue.Id) + assert.Equal(s.T(), new.AttributeValueId, got.AttributeValue.Id) assert.Equal(s.T(), newScs.Id, got.SubjectConditionSet.Id) - assert.Equal(s.T(), len(initialCreate.Actions), len(got.Actions)) - assert.Equal(s.T(), got.GetActions(), initialCreate.GetActions()) + assert.Equal(s.T(), len(new.Actions), len(got.Actions)) + assert.Equal(s.T(), new.Actions, got.GetActions()) } func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_UpdateAllAllowedFields() { @@ -283,9 +283,9 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_UpdateAllAllowedFields() ExistingSubjectConditionSetId: fixtureScs.Id, } - initialCreate, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), initialCreate) + assert.NotEqual(s.T(), "", createdId) // update the subject mapping newScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") @@ -294,32 +294,26 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_UpdateAllAllowedFields() Labels: map[string]string{"key": "value"}, } update := &subjectmapping.UpdateSubjectMappingRequest{ - Id: initialCreate.Id, + Id: createdId, UpdateActions: newActions, UpdateSubjectConditionSetId: newScs.Id, UpdateMetadata: metadata, } - updated, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + updatedId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.Nil(s.T(), err) - assert.NotNil(s.T(), updated) - assert.Equal(s.T(), initialCreate.Id, updated.Id) - assert.Equal(s.T(), initialCreate.AttributeValue.Id, updated.AttributeValue.Id) - assert.Equal(s.T(), newScs.Id, updated.SubjectConditionSet.Id) - assert.Equal(s.T(), len(newActions), len(updated.Actions)) - assert.Equal(s.T(), updated.GetActions(), newActions) - assert.Equal(s.T(), metadata.Labels["key"], updated.Metadata.Labels["key"]) + assert.Equal(s.T(), createdId, updatedId) // verify the subject mapping was updated - got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, initialCreate.Id) + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) assert.Nil(s.T(), err) assert.NotNil(s.T(), got) - assert.Equal(s.T(), initialCreate.Id, updated.Id) - assert.Equal(s.T(), initialCreate.AttributeValue.Id, updated.AttributeValue.Id) - assert.Equal(s.T(), newScs.Id, updated.SubjectConditionSet.Id) - assert.Equal(s.T(), len(newActions), len(updated.Actions)) - assert.Equal(s.T(), updated.GetActions(), newActions) - assert.Equal(s.T(), metadata.Labels["key"], updated.Metadata.Labels["key"]) + assert.Equal(s.T(), createdId, got.Id) + assert.Equal(s.T(), new.AttributeValueId, got.AttributeValue.Id) + assert.Equal(s.T(), newScs.Id, got.SubjectConditionSet.Id) + assert.Equal(s.T(), len(newActions), len(got.Actions)) + assert.Equal(s.T(), newActions, got.GetActions()) + assert.Equal(s.T(), metadata.Labels["key"], got.Metadata.Labels["key"]) } func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_NonExistentId_Fails() { @@ -327,9 +321,9 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_NonExistentId_Fails() { Id: nonExistentSubjectMappingId, } - sm, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + smId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.NotNil(s.T(), err) - assert.Nil(s.T(), sm) + assert.Equal(s.T(), smId, "") assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -339,9 +333,9 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_NonExistentSubjectCondit UpdateSubjectConditionSetId: nonExistentSubjectSetId, } - sm, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + smId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.NotNil(s.T(), err) - assert.Nil(s.T(), sm) + assert.Equal(s.T(), smId, "") assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -426,24 +420,24 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping() { ExistingSubjectConditionSetId: fixtureScs.Id, } - sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), sm) + assert.NotEqual(s.T(), "", createdId) - deleted, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, sm.Id) + deletedId, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, createdId) assert.Nil(s.T(), err) - assert.NotNil(s.T(), deleted) + assert.NotNil(s.T(), createdId, deletedId) - sm, err = s.db.PolicyClient.GetSubjectMapping(s.ctx, sm.Id) + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) assert.NotNil(s.T(), err) - assert.Nil(s.T(), sm) + assert.Nil(s.T(), got) assert.ErrorIs(s.T(), err, db.ErrNotFound) } func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_WithNonExistentId_Fails() { - deleted, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, nonExistentSubjectMappingId) + deletedId, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, nonExistentSubjectMappingId) assert.NotNil(s.T(), err) - assert.Nil(s.T(), deleted) + assert.Equal(s.T(), deletedId, "") assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -476,19 +470,20 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_DoesNotDeleteSubjectCond NewSubjectConditionSet: newScs, } - sm, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), sm) - createdScsId := sm.SubjectConditionSet.Id + assert.NotEqual(s.T(), "", createdId) - deleted, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, sm.Id) + sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) assert.Nil(s.T(), err) - assert.NotNil(s.T(), deleted) + deletedId, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, sm.Id) + assert.Nil(s.T(), err) + assert.NotEqual(s.T(), "", deletedId) - scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdScsId) + scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, sm.SubjectConditionSet.Id) assert.Nil(s.T(), err) assert.NotNil(s.T(), scs) - assert.Equal(s.T(), createdScsId, scs.Id) + assert.Equal(s.T(), sm.SubjectConditionSet.Id, scs.Id) } /*-------------------------------------------------------- @@ -581,24 +576,24 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet() { SubjectSets: []*subjectmapping.SubjectSet{}, } - scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), scs) + assert.NotEqual(s.T(), "", createdId) - deleted, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, scs.Id) + deletedId, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, createdId) assert.Nil(s.T(), err) - assert.NotNil(s.T(), deleted) + assert.Equal(s.T(), createdId, deletedId) - scs, err = s.db.PolicyClient.GetSubjectConditionSet(s.ctx, scs.Id) + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdId) assert.NotNil(s.T(), err) - assert.Nil(s.T(), scs) + assert.Nil(s.T(), got) assert.ErrorIs(s.T(), err, db.ErrNotFound) } func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet_WithNonExistentId_Fails() { - deleted, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, nonExistentSubjectSetId) + deletedId, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, nonExistentSubjectSetId) assert.NotNil(s.T(), err) - assert.Nil(s.T(), deleted) + assert.Equal(s.T(), deletedId, "") assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -610,9 +605,11 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { }, } - scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), scs) + // TODO: see if this is reusable + assert.NotZero(s.T(), createdId) + assert.NotEqual(s.T(), "", createdId) // update the subject condition set ss := []*subjectmapping.SubjectSet{ @@ -634,15 +631,19 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { update := &subjectmapping.UpdateSubjectConditionSetRequest{ UpdateSubjectSets: ss, - Id: scs.Id, + Id: createdId, } - updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) + id, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) assert.Nil(s.T(), err) - assert.NotNil(s.T(), updated) - assert.Equal(s.T(), scs.Id, updated.Id) - assert.Equal(s.T(), len(ss), len(updated.SubjectSets)) - assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, updated.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) + assert.Equal(s.T(), createdId, id) + + // verify the subject condition set was updated + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdId) + assert.Nil(s.T(), err) + assert.Equal(s.T(), createdId, got.Id) + assert.Equal(s.T(), len(ss), len(got.SubjectSets)) + assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, got.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) } func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() { @@ -653,9 +654,9 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() }, } - scs, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotNil(s.T(), scs) + assert.NotZero(s.T(), createdId) // update the subject condition set ss := []*subjectmapping.SubjectSet{ @@ -680,16 +681,21 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() update := &subjectmapping.UpdateSubjectConditionSetRequest{ UpdateSubjectSets: ss, UpdateMetadata: metadata, - Id: scs.Id, + Id: createdId, } - updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) + id, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) assert.Nil(s.T(), err) - assert.NotNil(s.T(), updated) - assert.Equal(s.T(), scs.Id, updated.Id) - assert.Equal(s.T(), len(ss), len(updated.SubjectSets)) - assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, updated.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) - assert.Equal(s.T(), metadata.Labels["somewhere"], updated.Metadata.Labels["somewhere"]) + assert.Equal(s.T(), createdId, id) + + // verify the subject condition set was updated + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdId) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), got) + assert.Equal(s.T(), createdId, got.Id) + assert.Equal(s.T(), len(ss), len(got.SubjectSets)) + assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, got.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) + assert.Equal(s.T(), metadata.Labels["key_example"], got.Metadata.Labels["key_example"]) } func TestSubjectMappingSuite(t *testing.T) { diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index d5e61b0d5c..9ec2944018 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -892,7 +892,7 @@ type CreateSubjectMappingResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *CreateSubjectMappingResponse) Reset() { @@ -927,11 +927,11 @@ func (*CreateSubjectMappingResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{13} } -func (x *CreateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { +func (x *CreateSubjectMappingResponse) GetId() string { if x != nil { - return x.SubjectMapping + return x.Id } - return nil + return "" } type UpdateSubjectMappingRequest struct { @@ -1012,7 +1012,7 @@ type UpdateSubjectMappingResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *UpdateSubjectMappingResponse) Reset() { @@ -1047,11 +1047,11 @@ func (*UpdateSubjectMappingResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{15} } -func (x *UpdateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { +func (x *UpdateSubjectMappingResponse) GetId() string { if x != nil { - return x.SubjectMapping + return x.Id } - return nil + return "" } type DeleteSubjectMappingRequest struct { @@ -1106,7 +1106,7 @@ type DeleteSubjectMappingResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *DeleteSubjectMappingResponse) Reset() { @@ -1141,11 +1141,11 @@ func (*DeleteSubjectMappingResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{17} } -func (x *DeleteSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { +func (x *DeleteSubjectMappingResponse) GetId() string { if x != nil { - return x.SubjectMapping + return x.Id } - return nil + return "" } type GetSubjectConditionSetRequest struct { @@ -1444,7 +1444,7 @@ type CreateSubjectConditionSetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *CreateSubjectConditionSetResponse) Reset() { @@ -1479,11 +1479,11 @@ func (*CreateSubjectConditionSetResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{24} } -func (x *CreateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { +func (x *CreateSubjectConditionSetResponse) GetId() string { if x != nil { - return x.SubjectConditionSet + return x.Id } - return nil + return "" } type UpdateSubjectConditionSetRequest struct { @@ -1555,7 +1555,7 @@ type UpdateSubjectConditionSetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *UpdateSubjectConditionSetResponse) Reset() { @@ -1590,11 +1590,11 @@ func (*UpdateSubjectConditionSetResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{26} } -func (x *UpdateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { +func (x *UpdateSubjectConditionSetResponse) GetId() string { if x != nil { - return x.SubjectConditionSet + return x.Id } - return nil + return "" } type DeleteSubjectConditionSetRequest struct { @@ -1649,7 +1649,7 @@ type DeleteSubjectConditionSetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *DeleteSubjectConditionSetResponse) Reset() { @@ -1684,11 +1684,11 @@ func (*DeleteSubjectConditionSetResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{28} } -func (x *DeleteSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { +func (x *DeleteSubjectConditionSetResponse) GetId() string { if x != nil { - return x.SubjectConditionSet + return x.Id } - return nil + return "" } var File_policy_subjectmapping_subject_mapping_proto protoreflect.FileDescriptor @@ -1831,14 +1831,10 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x53, 0x65, 0x74, 0x12, 0x39, 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, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6e, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 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, 0xfb, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xfb, 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, @@ -1854,25 +1850,17 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x0d, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6e, 0x0a, 0x1c, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 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, + 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, + 0x02, 0x69, 0x64, 0x22, 0x2e, 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, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe7, 0x01, 0x0a, @@ -1919,203 +1907,187 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, - 0x01, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, - 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x33, + 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x33, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, - 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, + 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 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, 0x33, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, - 0xe0, 0x0e, 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, + 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, 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, 0xe0, 0x0e, 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, 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, + 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, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, + 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, + 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, + 0x01, 0x2a, 0x32, 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, 0x12, 0xac, 0x01, 0x0a, + 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, + 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 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, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x12, 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x12, 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, + 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, + 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, + 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x21, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, + 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x12, - 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, - 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, + 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, - 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, - 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, - 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, - 0x37, 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, + 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 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, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 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 ( @@ -2189,49 +2161,43 @@ var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 35, // 15: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable 24, // 16: policy.subjectmapping.CreateSubjectMappingRequest.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate 33, // 17: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action - 6, // 18: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 35, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable - 33, // 20: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action - 6, // 21: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 6, // 22: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 5, // 23: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 6, // 24: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 5, // 25: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet - 35, // 26: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable - 4, // 27: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 24, // 28: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 5, // 29: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 35, // 30: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable - 4, // 31: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet - 5, // 32: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 5, // 33: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 8, // 34: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest - 12, // 35: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest - 10, // 36: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest - 14, // 37: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest - 16, // 38: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest - 18, // 39: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest - 22, // 40: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest - 20, // 41: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest - 25, // 42: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest - 27, // 43: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest - 29, // 44: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest - 9, // 45: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse - 13, // 46: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse - 11, // 47: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse - 15, // 48: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse - 17, // 49: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse - 19, // 50: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse - 23, // 51: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse - 21, // 52: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse - 26, // 53: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse - 28, // 54: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse - 30, // 55: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse - 45, // [45:56] is the sub-list for method output_type - 34, // [34:45] is the sub-list for method input_type - 34, // [34:34] is the sub-list for extension type_name - 34, // [34:34] is the sub-list for extension extendee - 0, // [0:34] is the sub-list for field type_name + 35, // 18: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable + 33, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action + 5, // 20: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 6, // 21: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 5, // 22: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 35, // 23: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable + 4, // 24: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 24, // 25: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 35, // 26: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable + 4, // 27: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet + 8, // 28: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 29: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 30: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 14, // 31: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 16, // 32: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 18, // 33: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 22, // 34: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest + 20, // 35: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest + 25, // 36: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest + 27, // 37: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest + 29, // 38: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest + 9, // 39: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 40: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 41: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 15, // 42: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 17, // 43: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 19, // 44: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 23, // 45: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse + 21, // 46: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse + 26, // 47: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse + 28, // 48: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse + 30, // 49: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse + 39, // [39:50] is the sub-list for method output_type + 28, // [28:39] is the sub-list for method input_type + 28, // [28:28] is the sub-list for extension type_name + 28, // [28:28] is the sub-list for extension extendee + 0, // [0:28] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java index 7919585aa5..5ba40add57 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java @@ -17,6 +17,7 @@ private CreateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3 super(builder); } private CreateSubjectConditionSetResponse() { + id_ = ""; } @java.lang.Override @@ -39,31 +40,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.Builder.class); } - private int bitField0_; - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ @java.lang.Override - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + 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; + } } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + 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; @@ -80,8 +93,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectConditionSet()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } getUnknownFields().writeTo(output); } @@ -92,9 +105,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectConditionSet()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,11 +123,8 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse) obj; - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; - } + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -127,10 +136,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); - } + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -250,29 +257,19 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectConditionSetFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } + id_ = ""; return this; } @@ -306,14 +303,9 @@ public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRespon private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.id_ = id_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -360,8 +352,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -390,9 +384,7 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); + id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -413,125 +405,76 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + private java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + 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 subjectConditionSetBuilder_.getMessage(); + return (java.lang.String) ref; } } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectConditionSet_ = value; + 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 { - subjectConditionSetBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); - } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); - } + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); - } else { - subjectConditionSet_ = value; - } - } else { - subjectConditionSetBuilder_.mergeFrom(value); - } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder clearSubjectConditionSet() { + public Builder clearId() { + id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } onChanged(); return this; } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; bitField0_ |= 0x00000001; onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( - getSubjectConditionSet(), - getParentForChildren(), - isClean()); - subjectConditionSet_ = null; - } - return subjectConditionSetBuilder_; + return this; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java index 9e0619c5ba..f9e50081c4 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java @@ -9,17 +9,14 @@ public interface CreateSubjectConditionSetResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - boolean hasSubjectConditionSet(); + java.lang.String getId(); /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); + com.google.protobuf.ByteString + getIdBytes(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java index a7802ad596..8ce6675331 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java @@ -17,6 +17,7 @@ private CreateSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Buil super(builder); } private CreateSubjectMappingResponse() { + id_ = ""; } @java.lang.Override @@ -39,31 +40,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.Builder.class); } - private int bitField0_; - public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ @java.lang.Override - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + 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; + } } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + 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; @@ -80,8 +93,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectMapping()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } getUnknownFields().writeTo(output); } @@ -92,9 +105,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectMapping()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,11 +123,8 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse) obj; - if (hasSubjectMapping() != other.hasSubjectMapping()) return false; - if (hasSubjectMapping()) { - if (!getSubjectMapping() - .equals(other.getSubjectMapping())) return false; - } + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -127,10 +136,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectMapping()) { - hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMapping().hashCode(); - } + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -250,29 +257,19 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectMappingFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } + id_ = ""; return this; } @@ -306,14 +303,9 @@ public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse bu private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectMapping_ = subjectMappingBuilder_ == null - ? subjectMapping_ - : subjectMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.id_ = id_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -360,8 +352,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.getDefaultInstance()) return this; - if (other.hasSubjectMapping()) { - mergeSubjectMapping(other.getSubjectMapping()); + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -390,9 +384,7 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getSubjectMappingFieldBuilder().getBuilder(), - extensionRegistry); + id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -413,125 +405,76 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> subjectMappingBuilder_; + private java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { - if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + 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 subjectMappingBuilder_.getMessage(); + return (java.lang.String) ref; } } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectMapping_ = value; + 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 { - subjectMappingBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. */ - public Builder setSubjectMapping( - io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder builderForValue) { - if (subjectMappingBuilder_ == null) { - subjectMapping_ = builderForValue.build(); - } else { - subjectMappingBuilder_.setMessage(builderForValue.build()); - } + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance()) { - getSubjectMappingBuilder().mergeFrom(value); - } else { - subjectMapping_ = value; - } - } else { - subjectMappingBuilder_.mergeFrom(value); - } - if (subjectMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder clearSubjectMapping() { + public Builder clearId() { + id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. */ - public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder getSubjectMappingBuilder() { + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; bitField0_ |= 0x00000001; onChanged(); - return getSubjectMappingFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - if (subjectMappingBuilder_ != null) { - return subjectMappingBuilder_.getMessageOrBuilder(); - } else { - return subjectMapping_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> - getSubjectMappingFieldBuilder() { - if (subjectMappingBuilder_ == null) { - subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder>( - getSubjectMapping(), - getParentForChildren(), - isClean()); - subjectMapping_ = null; - } - return subjectMappingBuilder_; + return this; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java index aa16282297..40d85f905c 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java @@ -9,17 +9,14 @@ public interface CreateSubjectMappingResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - boolean hasSubjectMapping(); + java.lang.String getId(); /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping(); - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); + com.google.protobuf.ByteString + getIdBytes(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java index b362c697b2..4811b9a03c 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java @@ -17,6 +17,7 @@ private DeleteSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3 super(builder); } private DeleteSubjectConditionSetResponse() { + id_ = ""; } @java.lang.Override @@ -39,31 +40,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.Builder.class); } - private int bitField0_; - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ @java.lang.Override - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + 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; + } } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + 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; @@ -80,8 +93,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectConditionSet()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } getUnknownFields().writeTo(output); } @@ -92,9 +105,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectConditionSet()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,11 +123,8 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse) obj; - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; - } + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -127,10 +136,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); - } + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -250,29 +257,19 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectConditionSetFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } + id_ = ""; return this; } @@ -306,14 +303,9 @@ public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRespon private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.id_ = id_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -360,8 +352,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -390,9 +384,7 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); + id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -413,125 +405,76 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + private java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + 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 subjectConditionSetBuilder_.getMessage(); + return (java.lang.String) ref; } } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectConditionSet_ = value; + 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 { - subjectConditionSetBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); - } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); - } + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); - } else { - subjectConditionSet_ = value; - } - } else { - subjectConditionSetBuilder_.mergeFrom(value); - } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder clearSubjectConditionSet() { + public Builder clearId() { + id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } onChanged(); return this; } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; bitField0_ |= 0x00000001; onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( - getSubjectConditionSet(), - getParentForChildren(), - isClean()); - subjectConditionSet_ = null; - } - return subjectConditionSetBuilder_; + return this; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java index f91d96311a..37cab35938 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java @@ -9,17 +9,14 @@ public interface DeleteSubjectConditionSetResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - boolean hasSubjectConditionSet(); + java.lang.String getId(); /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); + com.google.protobuf.ByteString + getIdBytes(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java index 5fc84a1659..df4888f833 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java @@ -17,6 +17,7 @@ private DeleteSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Buil super(builder); } private DeleteSubjectMappingResponse() { + id_ = ""; } @java.lang.Override @@ -39,31 +40,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.Builder.class); } - private int bitField0_; - public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ @java.lang.Override - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + 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; + } } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + 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; @@ -80,8 +93,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectMapping()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } getUnknownFields().writeTo(output); } @@ -92,9 +105,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectMapping()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,11 +123,8 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse) obj; - if (hasSubjectMapping() != other.hasSubjectMapping()) return false; - if (hasSubjectMapping()) { - if (!getSubjectMapping() - .equals(other.getSubjectMapping())) return false; - } + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -127,10 +136,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectMapping()) { - hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMapping().hashCode(); - } + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -250,29 +257,19 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectMappingFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } + id_ = ""; return this; } @@ -306,14 +303,9 @@ public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse bu private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectMapping_ = subjectMappingBuilder_ == null - ? subjectMapping_ - : subjectMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.id_ = id_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -360,8 +352,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.getDefaultInstance()) return this; - if (other.hasSubjectMapping()) { - mergeSubjectMapping(other.getSubjectMapping()); + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -390,9 +384,7 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getSubjectMappingFieldBuilder().getBuilder(), - extensionRegistry); + id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -413,125 +405,76 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> subjectMappingBuilder_; + private java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { - if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + 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 subjectMappingBuilder_.getMessage(); + return (java.lang.String) ref; } } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectMapping_ = value; + 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 { - subjectMappingBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. */ - public Builder setSubjectMapping( - io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder builderForValue) { - if (subjectMappingBuilder_ == null) { - subjectMapping_ = builderForValue.build(); - } else { - subjectMappingBuilder_.setMessage(builderForValue.build()); - } + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance()) { - getSubjectMappingBuilder().mergeFrom(value); - } else { - subjectMapping_ = value; - } - } else { - subjectMappingBuilder_.mergeFrom(value); - } - if (subjectMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder clearSubjectMapping() { + public Builder clearId() { + id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. */ - public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder getSubjectMappingBuilder() { + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; bitField0_ |= 0x00000001; onChanged(); - return getSubjectMappingFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - if (subjectMappingBuilder_ != null) { - return subjectMappingBuilder_.getMessageOrBuilder(); - } else { - return subjectMapping_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> - getSubjectMappingFieldBuilder() { - if (subjectMappingBuilder_ == null) { - subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder>( - getSubjectMapping(), - getParentForChildren(), - isClean()); - subjectMapping_ = null; - } - return subjectMappingBuilder_; + return this; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java index 0e3d0446a5..3894c8c332 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java @@ -9,17 +9,14 @@ public interface DeleteSubjectMappingResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - boolean hasSubjectMapping(); + java.lang.String getId(); /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping(); - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); + com.google.protobuf.ByteString + getIdBytes(); } 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 9469715196..6c35b696c1 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 @@ -224,120 +224,109 @@ public static void registerAllExtensions( "cy.subjectmapping.SubjectConditionSetCre" + "ateR\026newSubjectConditionSet\0229\n\007actions\030\005" + " \003(\0132\025.authorization.ActionB\010\272H\005\222\001\002\010\001R\007a" + - "ctions\"n\n\034CreateSubjectMappingResponse\022N" + - "\n\017subject_mapping\030\001 \001(\0132%.policy.subject" + - "mapping.SubjectMappingR\016subjectMapping\"\373" + - "\001\n\033UpdateSubjectMappingRequest\022\026\n\002id\030\001 \001" + - "(\tB\006\272H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132" + - "\027.common.MetadataMutableR\016updateMetadata" + - "\022D\n\037update_subject_condition_set_id\030\003 \001(" + - "\tR\033updateSubjectConditionSetId\022<\n\016update" + - "_actions\030\005 \003(\0132\025.authorization.ActionR\ru" + - "pdateActions\"n\n\034UpdateSubjectMappingResp" + - "onse\022N\n\017subject_mapping\030\001 \001(\0132%.policy.s" + - "ubjectmapping.SubjectMappingR\016subjectMap" + - "ping\"5\n\033DeleteSubjectMappingRequest\022\026\n\002i" + - "d\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectMapp" + - "ingResponse\022N\n\017subject_mapping\030\001 \001(\0132%.p" + - "olicy.subjectmapping.SubjectMappingR\016sub" + - "jectMapping\"7\n\035GetSubjectConditionSetReq" + - "uest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetSubj" + - "ectConditionSetResponse\022^\n\025subject_condi" + - "tion_set\030\001 \001(\0132*.policy.subjectmapping.S" + - "ubjectConditionSetR\023subjectConditionSet\022" + - "e\n\033associated_subject_mappings\030\002 \003(\0132%.p" + - "olicy.subjectmapping.SubjectMappingR\031ass" + - "ociatedSubjectMappings\"!\n\037ListSubjectCon" + - "ditionSetsRequest\"\204\001\n ListSubjectConditi" + - "onSetsResponse\022`\n\026subject_condition_sets" + - "\030\001 \003(\0132*.policy.subjectmapping.SubjectCo" + - "nditionSetR\024subjectConditionSets\"\240\001\n\031Sub" + - "jectConditionSetCreate\0223\n\010metadata\030\001 \001(\013" + - "2\027.common.MetadataMutableR\010metadata\022N\n\014s" + - "ubject_sets\030\002 \003(\0132!.policy.subjectmappin" + - "g.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\210\001\n " + - "CreateSubjectConditionSetRequest\022d\n\025subj" + - "ect_condition_set\030\001 \001(\01320.policy.subject" + - "mapping.SubjectConditionSetCreateR\023subje" + - "ctConditionSet\"\203\001\n!CreateSubjectConditio" + - "nSetResponse\022^\n\025subject_condition_set\030\001 " + - "\001(\0132*.policy.subjectmapping.SubjectCondi" + - "tionSetR\023subjectConditionSet\"\317\001\n UpdateS" + - "ubjectConditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272" + - "H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132\027.com" + - "mon.MetadataMutableR\016updateMetadata\022Q\n\023u" + - "pdate_subject_sets\030\003 \003(\0132!.policy.subjec" + - "tmapping.SubjectSetR\021updateSubjectSets\"\203" + - "\001\n!UpdateSubjectConditionSetResponse\022^\n\025" + - "subject_condition_set\030\001 \001(\0132*.policy.sub" + - "jectmapping.SubjectConditionSetR\023subject" + - "ConditionSet\":\n DeleteSubjectConditionSe" + - "tRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\203\001\n!Del" + - "eteSubjectConditionSetResponse\022^\n\025subjec" + - "t_condition_set\030\001 \001(\0132*.policy.subjectma" + - "pping.SubjectConditionSetR\023subjectCondit" + - "ionSet*\233\001\n\032SubjectMappingOperatorEnum\022-\n" + - ")SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFI" + - "ED\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\'CON" + - "DITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022#" + - "\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036C" + - "ONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n\025Subj" + - "ectMappingService\022\251\001\n\024MatchSubjectMappin" + - "gs\0222.policy.subjectmapping.MatchSubjectM" + - "appingsRequest\0323.policy.subjectmapping.M" + - "atchSubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/su" + - "bject-mappings/match:\007subject\022\227\001\n\023ListSu" + - "bjectMappings\0221.policy.subjectmapping.Li" + - "stSubjectMappingsRequest\0322.policy.subjec" + - "tmapping.ListSubjectMappingsResponse\"\031\202\323" + - "\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSubjectMa" + - "pping\022/.policy.subjectmapping.GetSubject" + - "MappingRequest\0320.policy.subjectmapping.G" + - "etSubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subje" + - "ct-mappings/{id}\022\235\001\n\024CreateSubjectMappin" + - "g\0222.policy.subjectmapping.CreateSubjectM" + - "appingRequest\0323.policy.subjectmapping.Cr" + - "eateSubjectMappingResponse\"\034\202\323\344\223\002\026\"\021/sub" + - "ject-mappings:\001*\022\242\001\n\024UpdateSubjectMappin" + - "g\0222.policy.subjectmapping.UpdateSubjectM" + - "appingRequest\0323.policy.subjectmapping.Up" + - "dateSubjectMappingResponse\"!\202\323\344\223\002\0332\026/sub" + - "ject-mappings/{id}:\001*\022\237\001\n\024DeleteSubjectM" + - "apping\0222.policy.subjectmapping.DeleteSub" + + "ctions\".\n\034CreateSubjectMappingResponse\022\016" + + "\n\002id\030\001 \001(\tR\002id\"\373\001\n\033UpdateSubjectMappingR" + + "equest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022@\n\017update" + + "_metadata\030\002 \001(\0132\027.common.MetadataMutable" + + "R\016updateMetadata\022D\n\037update_subject_condi" + + "tion_set_id\030\003 \001(\tR\033updateSubjectConditio" + + "nSetId\022<\n\016update_actions\030\005 \003(\0132\025.authori" + + "zation.ActionR\rupdateActions\".\n\034UpdateSu" + + "bjectMappingResponse\022\016\n\002id\030\001 \001(\tR\002id\"5\n\033" + + "DeleteSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB" + + "\006\272H\003\310\001\001R\002id\".\n\034DeleteSubjectMappingRespo" + + "nse\022\016\n\002id\030\001 \001(\tR\002id\"7\n\035GetSubjectConditi" + + "onSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n" + + "\036GetSubjectConditionSetResponse\022^\n\025subje" + + "ct_condition_set\030\001 \001(\0132*.policy.subjectm" + + "apping.SubjectConditionSetR\023subjectCondi" + + "tionSet\022e\n\033associated_subject_mappings\030\002" + + " \003(\0132%.policy.subjectmapping.SubjectMapp" + + "ingR\031associatedSubjectMappings\"!\n\037ListSu" + + "bjectConditionSetsRequest\"\204\001\n ListSubjec" + + "tConditionSetsResponse\022`\n\026subject_condit" + + "ion_sets\030\001 \003(\0132*.policy.subjectmapping.S" + + "ubjectConditionSetR\024subjectConditionSets" + + "\"\240\001\n\031SubjectConditionSetCreate\0223\n\010metada" + + "ta\030\001 \001(\0132\027.common.MetadataMutableR\010metad" + + "ata\022N\n\014subject_sets\030\002 \003(\0132!.policy.subje" + + "ctmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectS" + + "ets\"\210\001\n CreateSubjectConditionSetRequest" + + "\022d\n\025subject_condition_set\030\001 \001(\01320.policy" + + ".subjectmapping.SubjectConditionSetCreat" + + "eR\023subjectConditionSet\"3\n!CreateSubjectC" + + "onditionSetResponse\022\016\n\002id\030\001 \001(\tR\002id\"\317\001\n " + + "UpdateSubjectConditionSetRequest\022\026\n\002id\030\001" + + " \001(\tB\006\272H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(" + + "\0132\027.common.MetadataMutableR\016updateMetada" + + "ta\022Q\n\023update_subject_sets\030\003 \003(\0132!.policy" + + ".subjectmapping.SubjectSetR\021updateSubjec" + + "tSets\"3\n!UpdateSubjectConditionSetRespon" + + "se\022\016\n\002id\030\001 \001(\tR\002id\":\n DeleteSubjectCondi" + + "tionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"3" + + "\n!DeleteSubjectConditionSetResponse\022\016\n\002i" + + "d\030\001 \001(\tR\002id*\233\001\n\032SubjectMappingOperatorEn" + + "um\022-\n)SUBJECT_MAPPING_OPERATOR_ENUM_UNSP" + + "ECIFIED\020\000\022$\n SUBJECT_MAPPING_OPERATOR_EN" + + "UM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_ENUM" + + "_NOT_IN\020\002*\220\001\n\030ConditionBooleanTypeEnum\022+" + + "\n\'CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIE" + + "D\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND\020\001" + + "\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n" + + "\025SubjectMappingService\022\251\001\n\024MatchSubjectM" + + "appings\0222.policy.subjectmapping.MatchSub" + + "jectMappingsRequest\0323.policy.subjectmapp" + + "ing.MatchSubjectMappingsResponse\"(\202\323\344\223\002\"" + + "\"\027/subject-mappings/match:\007subject\022\227\001\n\023L" + + "istSubjectMappings\0221.policy.subjectmappi" + + "ng.ListSubjectMappingsRequest\0322.policy.s" + + "ubjectmapping.ListSubjectMappingsRespons" + + "e\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSubj" + + "ectMapping\022/.policy.subjectmapping.GetSu" + + "bjectMappingRequest\0320.policy.subjectmapp" + + "ing.GetSubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/" + + "subject-mappings/{id}\022\235\001\n\024CreateSubjectM" + + "apping\0222.policy.subjectmapping.CreateSub" + "jectMappingRequest\0323.policy.subjectmappi" + - "ng.DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030*" + - "\026/subject-mappings/{id}\022\254\001\n\030ListSubjectC" + - "onditionSets\0226.policy.subjectmapping.Lis" + - "tSubjectConditionSetsRequest\0327.policy.su" + - "bjectmapping.ListSubjectConditionSetsRes" + - "ponse\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022\253" + - "\001\n\026GetSubjectConditionSet\0224.policy.subje" + - "ctmapping.GetSubjectConditionSetRequest\032" + - "5.policy.subjectmapping.GetSubjectCondit" + - "ionSetResponse\"$\202\323\344\223\002\036\022\034/subject-conditi" + - "on-sets/{id}\022\262\001\n\031CreateSubjectConditionS" + - "et\0227.policy.subjectmapping.CreateSubject" + - "ConditionSetRequest\0328.policy.subjectmapp" + - "ing.CreateSubjectConditionSetResponse\"\"\202" + - "\323\344\223\002\034\"\027/subject-condition-sets:\001*\022\267\001\n\031Up" + - "dateSubjectConditionSet\0227.policy.subject" + - "mapping.UpdateSubjectConditionSetRequest" + - "\0328.policy.subjectmapping.UpdateSubjectCo" + - "nditionSetResponse\"\'\202\323\344\223\002!2\034/subject-con" + - "dition-sets/{id}:\001*\022\264\001\n\031DeleteSubjectCon" + - "ditionSet\0227.policy.subjectmapping.Delete" + - "SubjectConditionSetRequest\0328.policy.subj" + - "ectmapping.DeleteSubjectConditionSetResp" + - "onse\"$\202\323\344\223\002\036*\034/subject-condition-sets/{i" + - "d}B\364\001\n)io.opentdf.platform.policy.subjec" + - "tmappingB\023SubjectMappingProtoP\001Z=github." + - "com/opentdf/platform/protocol/go/policy/" + - "subjectmapping\242\002\003PSX\252\002\025Policy.Subjectmap" + - "ping\312\002\025Policy\\Subjectmapping\342\002!Policy\\Su" + - "bjectmapping\\GPBMetadata\352\002\026Policy::Subje" + - "ctmappingb\006proto3" + "ng.CreateSubjectMappingResponse\"\034\202\323\344\223\002\026\"" + + "\021/subject-mappings:\001*\022\242\001\n\024UpdateSubjectM" + + "apping\0222.policy.subjectmapping.UpdateSub" + + "jectMappingRequest\0323.policy.subjectmappi" + + "ng.UpdateSubjectMappingResponse\"!\202\323\344\223\002\0332" + + "\026/subject-mappings/{id}:\001*\022\237\001\n\024DeleteSub" + + "jectMapping\0222.policy.subjectmapping.Dele" + + "teSubjectMappingRequest\0323.policy.subject" + + "mapping.DeleteSubjectMappingResponse\"\036\202\323" + + "\344\223\002\030*\026/subject-mappings/{id}\022\254\001\n\030ListSub" + + "jectConditionSets\0226.policy.subjectmappin" + + "g.ListSubjectConditionSetsRequest\0327.poli" + + "cy.subjectmapping.ListSubjectConditionSe" + + "tsResponse\"\037\202\323\344\223\002\031\022\027/subject-condition-s" + + "ets\022\253\001\n\026GetSubjectConditionSet\0224.policy." + + "subjectmapping.GetSubjectConditionSetReq" + + "uest\0325.policy.subjectmapping.GetSubjectC" + + "onditionSetResponse\"$\202\323\344\223\002\036\022\034/subject-co" + + "ndition-sets/{id}\022\262\001\n\031CreateSubjectCondi" + + "tionSet\0227.policy.subjectmapping.CreateSu" + + "bjectConditionSetRequest\0328.policy.subjec" + + "tmapping.CreateSubjectConditionSetRespon" + + "se\"\"\202\323\344\223\002\034\"\027/subject-condition-sets:\001*\022\267" + + "\001\n\031UpdateSubjectConditionSet\0227.policy.su" + + "bjectmapping.UpdateSubjectConditionSetRe" + + "quest\0328.policy.subjectmapping.UpdateSubj" + + "ectConditionSetResponse\"\'\202\323\344\223\002!2\034/subjec" + + "t-condition-sets/{id}:\001*\022\264\001\n\031DeleteSubje" + + "ctConditionSet\0227.policy.subjectmapping.D" + + "eleteSubjectConditionSetRequest\0328.policy" + + ".subjectmapping.DeleteSubjectConditionSe" + + "tResponse\"$\202\323\344\223\002\036*\034/subject-condition-se" + + "ts/{id}B\364\001\n)io.opentdf.platform.policy.s" + + "ubjectmappingB\023SubjectMappingProtoP\001Z=gi" + + "thub.com/opentdf/platform/protocol/go/po" + + "licy/subjectmapping\242\002\003PSX\252\002\025Policy.Subje" + + "ctmapping\312\002\025Policy\\Subjectmapping\342\002!Poli" + + "cy\\Subjectmapping\\GPBMetadata\352\002\026Policy::" + + "Subjectmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -432,7 +421,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor, - new java.lang.String[] { "SubjectMapping", }); + new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable = new @@ -444,7 +433,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor, - new java.lang.String[] { "SubjectMapping", }); + new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable = new @@ -456,7 +445,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor, - new java.lang.String[] { "SubjectMapping", }); + new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor = getDescriptor().getMessageTypes().get(18); internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable = new @@ -498,7 +487,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "SubjectConditionSet", }); + new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor = getDescriptor().getMessageTypes().get(25); internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new @@ -510,7 +499,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "SubjectConditionSet", }); + new java.lang.String[] { "Id", }); internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor = getDescriptor().getMessageTypes().get(27); internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable = new @@ -522,7 +511,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "SubjectConditionSet", }); + new java.lang.String[] { "Id", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(build.buf.validate.ValidateProto.field); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java index f5953386c0..3128676bc5 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java @@ -17,6 +17,7 @@ private UpdateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3 super(builder); } private UpdateSubjectConditionSetResponse() { + id_ = ""; } @java.lang.Override @@ -39,31 +40,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.Builder.class); } - private int bitField0_; - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ @java.lang.Override - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + 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; + } } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + 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; @@ -80,8 +93,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectConditionSet()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } getUnknownFields().writeTo(output); } @@ -92,9 +105,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectConditionSet()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,11 +123,8 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse) obj; - if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; - if (hasSubjectConditionSet()) { - if (!getSubjectConditionSet() - .equals(other.getSubjectConditionSet())) return false; - } + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -127,10 +136,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectConditionSet()) { - hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; - hash = (53 * hash) + getSubjectConditionSet().hashCode(); - } + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -250,29 +257,19 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectConditionSetFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } + id_ = ""; return this; } @@ -306,14 +303,9 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRespon private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectConditionSet_ = subjectConditionSetBuilder_ == null - ? subjectConditionSet_ - : subjectConditionSetBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.id_ = id_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -360,8 +352,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance()) return this; - if (other.hasSubjectConditionSet()) { - mergeSubjectConditionSet(other.getSubjectConditionSet()); + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -390,9 +384,7 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); + id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -413,125 +405,76 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; + private java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { - if (subjectConditionSetBuilder_ == null) { - return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + 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 subjectConditionSetBuilder_.getMessage(); + return (java.lang.String) ref; } } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectConditionSet_ = value; + 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 { - subjectConditionSetBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. */ - public Builder setSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSet_ = builderForValue.build(); - } else { - subjectConditionSetBuilder_.setMessage(builderForValue.build()); - } + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. */ - public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { - if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectConditionSet_ != null && - subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { - getSubjectConditionSetBuilder().mergeFrom(value); - } else { - subjectConditionSet_ = value; - } - } else { - subjectConditionSetBuilder_.mergeFrom(value); - } - if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public Builder clearSubjectConditionSet() { + public Builder clearId() { + id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); - subjectConditionSet_ = null; - if (subjectConditionSetBuilder_ != null) { - subjectConditionSetBuilder_.dispose(); - subjectConditionSetBuilder_ = null; - } onChanged(); return this; } /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; bitField0_ |= 0x00000001; onChanged(); - return getSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { - if (subjectConditionSetBuilder_ != null) { - return subjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return subjectConditionSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; - } - } - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> - getSubjectConditionSetFieldBuilder() { - if (subjectConditionSetBuilder_ == null) { - subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( - getSubjectConditionSet(), - getParentForChildren(), - isClean()); - subjectConditionSet_ = null; - } - return subjectConditionSetBuilder_; + return this; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java index 59b86ccc3b..fbfd1bc96c 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java @@ -9,17 +9,14 @@ public interface UpdateSubjectConditionSetResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return Whether the subjectConditionSet field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - boolean hasSubjectConditionSet(); + java.lang.String getId(); /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - * @return The subjectConditionSet. + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); - /** - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); + com.google.protobuf.ByteString + getIdBytes(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java index 2450db3e20..54c0dffe01 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java @@ -17,6 +17,7 @@ private UpdateSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Buil super(builder); } private UpdateSubjectMappingResponse() { + id_ = ""; } @java.lang.Override @@ -39,31 +40,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.Builder.class); } - private int bitField0_; - public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; + public static final int ID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ @java.lang.Override - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + 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; + } } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + 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; @@ -80,8 +93,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubjectMapping()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } getUnknownFields().writeTo(output); } @@ -92,9 +105,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubjectMapping()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,11 +123,8 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse) obj; - if (hasSubjectMapping() != other.hasSubjectMapping()) return false; - if (hasSubjectMapping()) { - if (!getSubjectMapping() - .equals(other.getSubjectMapping())) return false; - } + if (!getId() + .equals(other.getId())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -127,10 +136,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubjectMapping()) { - hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; - hash = (53 * hash) + getSubjectMapping().hashCode(); - } + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -250,29 +257,19 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectMappingFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } + id_ = ""; return this; } @@ -306,14 +303,9 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse bu private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.subjectMapping_ = subjectMappingBuilder_ == null - ? subjectMapping_ - : subjectMappingBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.id_ = id_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -360,8 +352,10 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.getDefaultInstance()) return this; - if (other.hasSubjectMapping()) { - mergeSubjectMapping(other.getSubjectMapping()); + if (!other.getId().isEmpty()) { + id_ = other.id_; + bitField0_ |= 0x00000001; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -390,9 +384,7 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getSubjectMappingFieldBuilder().getBuilder(), - extensionRegistry); + id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 @@ -413,125 +405,76 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> subjectMappingBuilder_; + private java.lang.Object id_ = ""; /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - public boolean hasSubjectMapping() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { - if (subjectMappingBuilder_ == null) { - return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + 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 subjectMappingBuilder_.getMessage(); + return (java.lang.String) ref; } } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - subjectMapping_ = value; + 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 { - subjectMappingBuilder_.setMessage(value); + return (com.google.protobuf.ByteString) ref; } - bitField0_ |= 0x00000001; - onChanged(); - return this; } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @param value The id to set. + * @return This builder for chaining. */ - public Builder setSubjectMapping( - io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder builderForValue) { - if (subjectMappingBuilder_ == null) { - subjectMapping_ = builderForValue.build(); - } else { - subjectMappingBuilder_.setMessage(builderForValue.build()); - } + public Builder setId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + id_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @return This builder for chaining. */ - public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { - if (subjectMappingBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subjectMapping_ != null && - subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance()) { - getSubjectMappingBuilder().mergeFrom(value); - } else { - subjectMapping_ = value; - } - } else { - subjectMappingBuilder_.mergeFrom(value); - } - if (subjectMapping_ != null) { - bitField0_ |= 0x00000001; - onChanged(); - } - return this; - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public Builder clearSubjectMapping() { + public Builder clearId() { + id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000001); - subjectMapping_ = null; - if (subjectMappingBuilder_ != null) { - subjectMappingBuilder_.dispose(); - subjectMappingBuilder_ = null; - } onChanged(); return this; } /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * string id = 1 [json_name = "id"]; + * @param value The bytes for id to set. + * @return This builder for chaining. */ - public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder getSubjectMappingBuilder() { + public Builder setIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + id_ = value; bitField0_ |= 0x00000001; onChanged(); - return getSubjectMappingFieldBuilder().getBuilder(); - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { - if (subjectMappingBuilder_ != null) { - return subjectMappingBuilder_.getMessageOrBuilder(); - } else { - return subjectMapping_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; - } - } - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> - getSubjectMappingFieldBuilder() { - if (subjectMappingBuilder_ == null) { - subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder>( - getSubjectMapping(), - getParentForChildren(), - isClean()); - subjectMapping_ = null; - } - return subjectMappingBuilder_; + return this; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java index 986790a0f0..e77471a2be 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java @@ -9,17 +9,14 @@ public interface UpdateSubjectMappingResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return Whether the subjectMapping field is set. + * string id = 1 [json_name = "id"]; + * @return The id. */ - boolean hasSubjectMapping(); + java.lang.String getId(); /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - * @return The subjectMapping. + * string id = 1 [json_name = "id"]; + * @return The bytes for id. */ - io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping(); - /** - * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; - */ - io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); + com.google.protobuf.ByteString + getIdBytes(); } diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index d38f9d2c52..a13ffe3a44 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "errors" + "fmt" "log/slog" sq "github.com/Masterminds/squirrel" @@ -256,31 +257,28 @@ func createSubjectConditionSetSql(subjectSets []*subjectmapping.SubjectSet, meta ToSql() } -func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjectmapping.SubjectConditionSetCreate) (*subjectmapping.SubjectConditionSet, error) { - metadataJSON, m, err := db.MarshalCreateMetadata(s.Metadata) +// Creates a new subject condition set and returns the id of the created +func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjectmapping.SubjectConditionSetCreate) (string, error) { + // TODO: remove roundtrip [https://github.com/opentdf/platform/pull/314] + metadataJSON, _, err := db.MarshalCreateMetadata(s.Metadata) if err != nil { - return nil, err - } - new := &subjectmapping.SubjectConditionSet{ - SubjectSets: s.SubjectSets, - Metadata: m, + return "", err } sql, args, err := createSubjectConditionSetSql(s.SubjectSets, metadataJSON) if err != nil { - return nil, err + return "", err } var id string r, err := c.QueryRow(ctx, sql, args, err) if err != nil { - return nil, err + return "", err } if err = r.Scan(&id); err != nil { - return nil, db.WrapIfKnownInvalidQueryErr(err) + return "", db.WrapIfKnownInvalidQueryErr(err) } - new.Id = id - return new, nil + return id, nil } func getSubjectConditionSetSql(id string) (string, []interface{}, error) { @@ -343,30 +341,30 @@ func updateSubjectConditionSetSql(id string, metadata []byte, condition []byte) ToSql() } -func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, s *subjectmapping.UpdateSubjectConditionSetRequest) (*subjectmapping.SubjectConditionSet, error) { +// Mutates provided fields and returns id of the updated subject condition set +func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, s *subjectmapping.UpdateSubjectConditionSetRequest) (string, error) { var ( subjectSets []*subjectmapping.SubjectSet condition []byte ) + // TODO: remove roundtrip and handle metadata mutation with selector [https://github.com/opentdf/platform/pull/314] prev, err := c.GetSubjectConditionSet(ctx, s.Id) if err != nil { - return nil, err + return "", err } - metadataJSON, metadata, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdateMetadata) + metadataJSON, _, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdateMetadata) if err != nil { - return nil, err + return "", err } if s.UpdateSubjectSets != nil { subjectSets = s.UpdateSubjectSets condition, err = marshalSubjectSetsProto(subjectSets) if err != nil { - return nil, err + return "", err } - } else { - subjectSets = prev.SubjectSets } sql, args, err := updateSubjectConditionSetSql( @@ -376,14 +374,10 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, s *subjec ) if err := c.Exec(ctx, sql, args, err); err != nil { - return nil, err + return "", err } - return &subjectmapping.SubjectConditionSet{ - Id: s.Id, - Metadata: metadata, - SubjectSets: subjectSets, - }, nil + return s.Id, nil } func deleteSubjectConditionSetSql(id string) (string, []interface{}, error) { @@ -391,25 +385,22 @@ func deleteSubjectConditionSetSql(id string) (string, []interface{}, error) { return db.NewStatementBuilder(). Delete(t.Name()). Where(sq.Eq{t.Field("id"): id}). + Suffix("RETURNING \"id\""). ToSql() } -func (c PolicyDbClient) DeleteSubjectConditionSet(ctx context.Context, id string) (*subjectmapping.SubjectConditionSet, error) { - prev, err := c.GetSubjectConditionSet(ctx, id) - if err != nil { - return nil, err - } - +// Deletes specified subject condition set and returns the id of the deleted +func (c PolicyDbClient) DeleteSubjectConditionSet(ctx context.Context, id string) (string, error) { sql, args, err := deleteSubjectConditionSetSql(id) if err != nil { - return nil, err + return "", err } - if err := c.Exec(ctx, sql, args, err); err != nil { - return nil, err + if _, err := c.QueryCount(ctx, sql, args); err != nil { + return "", db.WrapIfKnownInvalidQueryErr(err) } - return prev, nil + return id, nil } func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata []byte, subject_condition_set_id string) (string, []interface{}, error) { @@ -436,39 +427,38 @@ func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata ToSql() } -func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.CreateSubjectMappingRequest) (*subjectmapping.SubjectMapping, error) { +// Creates a new subject mapping and returns the id of the created. If an existing subject condition set id is provided, it will be used. +// If a new subject condition set is provided, it will be created. The existing subject condition set id takes precedence. +func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.CreateSubjectMappingRequest) (string, error) { var ( - scs *subjectmapping.SubjectConditionSet - err error + scsId string + err error ) // Prefer existing id over new creation per documented proto behavior. if s.ExistingSubjectConditionSetId != "" { - // get the existing subject condition set - scs, err = c.GetSubjectConditionSet(ctx, s.ExistingSubjectConditionSetId) - if err != nil { - return nil, err - } + scsId = s.ExistingSubjectConditionSetId } else if s.NewSubjectConditionSet != nil { // create the new subject condition sets - scs, err = c.CreateSubjectConditionSet(ctx, s.NewSubjectConditionSet) + scsId, err = c.CreateSubjectConditionSet(ctx, s.NewSubjectConditionSet) if err != nil { - return nil, err + return "", err } } else { - return nil, errors.Join(db.ErrMissingRequiredValue, errors.New("either an existing Subject Condition Set ID or a new one is required when creating a subject mapping")) + return "", errors.Join(db.ErrMissingRequiredValue, errors.New("either an existing Subject Condition Set ID or a new one is required when creating a subject mapping")) } - metadataJSON, metadata, err := db.MarshalCreateMetadata(s.Metadata) + // TODO: remove roundtrip and handle metadata mutation with selector [https://github.com/opentdf/platform/pull/314] + metadataJSON, _, err := db.MarshalCreateMetadata(s.Metadata) if err != nil { - return nil, err + return "", err } if s.Actions == nil { - return nil, errors.Join(db.ErrMissingRequiredValue, errors.New("actions are required when creating a subject mapping")) + return "", errors.Join(db.ErrMissingRequiredValue, errors.New("actions are required when creating a subject mapping")) } actionsJSON, err := marshalActionsProto(s.Actions) if err != nil { - return nil, err + return "", err } // Create the subject mapping @@ -476,29 +466,18 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp s.AttributeValueId, actionsJSON, metadataJSON, - scs.Id, + scsId, ) + fmt.Println("here") var id string if r, err := c.QueryRow(ctx, sql, args, err); err != nil { - return nil, err + return "", err } else if err := r.Scan(&id); err != nil { - return nil, db.WrapIfKnownInvalidQueryErr(err) - } - - av, err := c.GetAttributeValue(ctx, s.AttributeValueId) - if err != nil { - return nil, err + return "", db.WrapIfKnownInvalidQueryErr(err) } - sm := &subjectmapping.SubjectMapping{ - Id: id, - Metadata: metadata, - AttributeValue: av, - SubjectConditionSet: scs, - Actions: s.Actions, - } - return sm, nil + return id, nil } func getSubjectMappingSql(id string) (string, []interface{}, error) { @@ -547,7 +526,6 @@ func (c PolicyDbClient) ListSubjectMappings(ctx context.Context) ([]*subjectmapp return subjectMappings, nil } -// overwrites entire 'actions' JSONB column if updated func updateSubjectMappingSql(id string, metadataJSON []byte, subject_condition_set_id string, actionsJSON []byte) (string, []interface{}, error) { t := db.Tables.SubjectMappings sb := db.NewStatementBuilder(). @@ -570,23 +548,24 @@ func updateSubjectMappingSql(id string, metadataJSON []byte, subject_condition_s ToSql() } -func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapping.UpdateSubjectMappingRequest) (*subjectmapping.SubjectMapping, error) { +// Mutates provided fields and returns id of the updated subject mapping +func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapping.UpdateSubjectMappingRequest) (string, error) { + // TODO: remove roundtrip and handle metadata mutation with selector [https://github.com/opentdf/platform/pull/314] prev, err := c.GetSubjectMapping(ctx, r.Id) if err != nil { - return nil, err + return "", err } - metadataJson, m, err := db.MarshalUpdateMetadata(prev.Metadata, r.UpdateMetadata) + metadataJson, _, err := db.MarshalUpdateMetadata(prev.Metadata, r.UpdateMetadata) if err != nil { - return nil, err + return "", err } - prev.Metadata = m var actionsJSON []byte if r.UpdateActions != nil { actionsJSON, err = marshalActionsProto(r.UpdateActions) if err != nil { - return nil, err + return "", err } prev.Actions = r.UpdateActions } @@ -594,7 +573,7 @@ func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapp if r.UpdateSubjectConditionSetId != "" { new, err := c.GetSubjectConditionSet(ctx, r.UpdateSubjectConditionSetId) if err != nil { - return nil, err + return "", err } prev.SubjectConditionSet = new } @@ -606,14 +585,14 @@ func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapp actionsJSON, ) if err != nil { - return nil, err + return "", err } if err := c.Exec(ctx, sql, args, err); err != nil { - return nil, err + return "", err } - return prev, nil + return r.Id, nil } func deleteSubjectMappingSql(id string) (string, []interface{}, error) { @@ -621,23 +600,20 @@ func deleteSubjectMappingSql(id string) (string, []interface{}, error) { return db.NewStatementBuilder(). Delete(t.Name()). Where(sq.Eq{t.Field("id"): id}). + Suffix("RETURNING \"id\""). ToSql() } -func (c PolicyDbClient) DeleteSubjectMapping(ctx context.Context, id string) (*subjectmapping.SubjectMapping, error) { - prev, err := c.GetSubjectMapping(ctx, id) - if err != nil { - return nil, err - } - +// Deletes specified subject mapping and returns the id of the deleted +func (c PolicyDbClient) DeleteSubjectMapping(ctx context.Context, id string) (string, error) { sql, args, err := deleteSubjectMappingSql(id) if err != nil { - return nil, err + return "", err } - if err := c.Exec(ctx, sql, args, err); err != nil { - return nil, err + if _, err := c.QueryCount(ctx, sql, args); err != nil { + return "", db.WrapIfKnownInvalidQueryErr(err) } - return prev, nil + return id, nil } diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index f2b125dc71..bbb550b2b6 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -39,12 +39,12 @@ func (s SubjectMappingService) CreateSubjectMapping(ctx context.Context, rsp := &sm.CreateSubjectMappingResponse{} slog.Debug("creating subject mapping") - mappings, err := s.dbClient.CreateSubjectMapping(context.Background(), req) + id, err := s.dbClient.CreateSubjectMapping(context.Background(), req) if err != nil { return nil, services.HandleError(err, services.ErrCreationFailed, slog.String("subjectMapping", req.String())) } - rsp.SubjectMapping = mappings + rsp.Id = id return rsp, nil } @@ -52,6 +52,7 @@ func (s SubjectMappingService) ListSubjectMappings(ctx context.Context, req *sm.ListSubjectMappingsRequest, ) (*sm.ListSubjectMappingsResponse, error) { rsp := &sm.ListSubjectMappingsResponse{} + slog.Debug("listing subject mappings") mappings, err := s.dbClient.ListSubjectMappings(ctx) if err != nil { @@ -59,7 +60,6 @@ func (s SubjectMappingService) ListSubjectMappings(ctx context.Context, } rsp.SubjectMappings = mappings - return rsp, nil } @@ -67,6 +67,7 @@ func (s SubjectMappingService) GetSubjectMapping(ctx context.Context, req *sm.GetSubjectMappingRequest, ) (*sm.GetSubjectMappingResponse, error) { rsp := &sm.GetSubjectMappingResponse{} + slog.Debug("getting subject mapping", slog.String("id", req.Id)) mapping, err := s.dbClient.GetSubjectMapping(ctx, req.Id) if err != nil { @@ -74,7 +75,6 @@ func (s SubjectMappingService) GetSubjectMapping(ctx context.Context, } rsp.SubjectMapping = mapping - return rsp, nil } @@ -82,14 +82,14 @@ func (s SubjectMappingService) UpdateSubjectMapping(ctx context.Context, req *sm.UpdateSubjectMappingRequest, ) (*sm.UpdateSubjectMappingResponse, error) { rsp := &sm.UpdateSubjectMappingResponse{} + slog.Debug("updating subject mapping", slog.String("subjectMapping", req.String())) - mapping, err := s.dbClient.UpdateSubjectMapping(ctx, req) + id, err := s.dbClient.UpdateSubjectMapping(ctx, req) if err != nil { return nil, services.HandleError(err, services.ErrUpdateFailed, slog.String("id", req.Id), slog.String("subjectMapping fields", req.String())) } - rsp.SubjectMapping = mapping - + rsp.Id = id return rsp, nil } @@ -97,14 +97,14 @@ func (s SubjectMappingService) DeleteSubjectMapping(ctx context.Context, req *sm.DeleteSubjectMappingRequest, ) (*sm.DeleteSubjectMappingResponse, error) { rsp := &sm.DeleteSubjectMappingResponse{} + slog.Debug("deleting subject mapping", slog.String("id", req.Id)) - mapping, err := s.dbClient.DeleteSubjectMapping(ctx, req.Id) + id, err := s.dbClient.DeleteSubjectMapping(ctx, req.Id) if err != nil { return nil, services.HandleError(err, services.ErrDeletionFailed, slog.String("id", req.Id)) } - rsp.SubjectMapping = mapping - + rsp.Id = id return rsp, nil } @@ -116,6 +116,7 @@ func (s SubjectMappingService) GetSubjectConditionSet(ctx context.Context, req *sm.GetSubjectConditionSetRequest, ) (*sm.GetSubjectConditionSetResponse, error) { rsp := &sm.GetSubjectConditionSetResponse{} + slog.Debug("getting subject condition set", slog.String("id", req.Id)) conditionSet, err := s.dbClient.GetSubjectConditionSet(ctx, req.Id) if err != nil { @@ -123,7 +124,6 @@ func (s SubjectMappingService) GetSubjectConditionSet(ctx context.Context, } rsp.SubjectConditionSet = conditionSet - return rsp, nil } @@ -131,6 +131,7 @@ func (s SubjectMappingService) ListSubjectConditionSets(ctx context.Context, req *sm.ListSubjectConditionSetsRequest, ) (*sm.ListSubjectConditionSetsResponse, error) { rsp := &sm.ListSubjectConditionSetsResponse{} + slog.Debug("listing subject condition sets") conditionSets, err := s.dbClient.ListSubjectConditionSets(ctx) if err != nil { @@ -138,7 +139,6 @@ func (s SubjectMappingService) ListSubjectConditionSets(ctx context.Context, } rsp.SubjectConditionSets = conditionSets - return rsp, nil } @@ -146,14 +146,14 @@ func (s SubjectMappingService) CreateSubjectConditionSet(ctx context.Context, req *sm.CreateSubjectConditionSetRequest, ) (*sm.CreateSubjectConditionSetResponse, error) { rsp := &sm.CreateSubjectConditionSetResponse{} - slog.Debug("creating subject condition set") + slog.Debug("creating subject condition set", slog.String("subjectConditionSet", req.String())) - conditionSet, err := s.dbClient.CreateSubjectConditionSet(context.Background(), req.SubjectConditionSet) + id, err := s.dbClient.CreateSubjectConditionSet(context.Background(), req.SubjectConditionSet) if err != nil { return nil, services.HandleError(err, services.ErrCreationFailed, slog.String("subjectConditionSet", req.String())) } - rsp.SubjectConditionSet = conditionSet + rsp.Id = id return rsp, nil } @@ -161,14 +161,14 @@ func (s SubjectMappingService) UpdateSubjectConditionSet(ctx context.Context, req *sm.UpdateSubjectConditionSetRequest, ) (*sm.UpdateSubjectConditionSetResponse, error) { rsp := &sm.UpdateSubjectConditionSetResponse{} + slog.Debug("updating subject condition set", slog.String("subjectConditionSet", req.String())) - conditionSet, err := s.dbClient.UpdateSubjectConditionSet(ctx, req) + id, err := s.dbClient.UpdateSubjectConditionSet(ctx, req) if err != nil { return nil, services.HandleError(err, services.ErrUpdateFailed, slog.String("id", req.Id), slog.String("subjectConditionSet fields", req.String())) } - rsp.SubjectConditionSet = conditionSet - + rsp.Id = id return rsp, nil } @@ -176,13 +176,13 @@ func (s SubjectMappingService) DeleteSubjectConditionSet(ctx context.Context, req *sm.DeleteSubjectConditionSetRequest, ) (*sm.DeleteSubjectConditionSetResponse, error) { rsp := &sm.DeleteSubjectConditionSetResponse{} + slog.Debug("deleting subject condition set", slog.String("id", req.Id)) - conditionSet, err := s.dbClient.DeleteSubjectConditionSet(ctx, req.Id) + id, err := s.dbClient.DeleteSubjectConditionSet(ctx, req.Id) if err != nil { return nil, services.HandleError(err, services.ErrDeletionFailed, slog.String("id", req.Id)) } - rsp.SubjectConditionSet = conditionSet - + rsp.Id = id return rsp, nil } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 8c1869e61d..50004b17c2 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -230,7 +230,7 @@ message CreateSubjectMappingRequest{ repeated authorization.Action actions = 5 [(buf.validate.field).repeated.min_items = 1]; } message CreateSubjectMappingResponse { - SubjectMapping subject_mapping = 1; + string id = 1; } message UpdateSubjectMappingRequest { @@ -245,14 +245,14 @@ message UpdateSubjectMappingRequest { repeated authorization.Action update_actions = 5; } message UpdateSubjectMappingResponse { - SubjectMapping subject_mapping = 1; + string id = 1; } message DeleteSubjectMappingRequest { string id = 1 [(buf.validate.field).required = true]; } message DeleteSubjectMappingResponse { - SubjectMapping subject_mapping = 1; + string id = 1; } /** @@ -283,7 +283,7 @@ message CreateSubjectConditionSetRequest { SubjectConditionSetCreate subject_condition_set = 1; } message CreateSubjectConditionSetResponse { - SubjectConditionSet subject_condition_set = 1; + string id = 1; } message UpdateSubjectConditionSetRequest { @@ -295,14 +295,14 @@ message UpdateSubjectConditionSetRequest { repeated SubjectSet update_subject_sets = 3; } message UpdateSubjectConditionSetResponse { - SubjectConditionSet subject_condition_set = 1; + string id = 1; } message DeleteSubjectConditionSetRequest { string id = 1 [(buf.validate.field).required = true]; } message DeleteSubjectConditionSetResponse { - SubjectConditionSet subject_condition_set = 1; + string id = 1; } From d9fcafc2a1e2885e2d14dd2856a17f4f15b21884 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 16:55:36 -0500 Subject: [PATCH 19/39] fix test --- integration/subject_mappings_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index fb7dd53369..a9056dd641 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -193,7 +193,7 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NonExistentSubjectCondit createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.NotNil(s.T(), err) assert.Zero(s.T(), createdId) - assert.ErrorIs(s.T(), err, db.ErrNotFound) + assert.ErrorIs(s.T(), err, db.ErrForeignKeyViolation) } func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_Actions() { From 03bce8ed82bba81ac04e6e6566b418628dd313bb Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 16:59:24 -0500 Subject: [PATCH 20/39] cleanup --- integration/attribute_values_test.go | 2 +- integration/attributes_test.go | 2 +- integration/kas_registry_test.go | 4 ++-- integration/namespaces_test.go | 6 +++--- integration/subject_mappings_test.go | 30 +++++++++++--------------- services/policy/db/subject_mappings.go | 2 -- 6 files changed, 20 insertions(+), 26 deletions(-) diff --git a/integration/attribute_values_test.go b/integration/attribute_values_test.go index e3855cf781..491dfccc92 100644 --- a/integration/attribute_values_test.go +++ b/integration/attribute_values_test.go @@ -272,7 +272,7 @@ func setupDeactivateAttributeValue(s *AttributeValuesSuite) (string, string, str // create a namespace nsId, err := s.db.PolicyClient.CreateNamespace(s.ctx, "cascading-deactivate-attribute-value.com") assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", nsId) + assert.NotZero(s.T(), nsId) // add an attribute under that namespaces attr := &attributes.AttributeCreateUpdate{ diff --git a/integration/attributes_test.go b/integration/attributes_test.go index 235563a235..2d71d25cb6 100644 --- a/integration/attributes_test.go +++ b/integration/attributes_test.go @@ -354,7 +354,7 @@ func setupCascadeDeactivateAttribute(s *AttributesSuite) (string, string, string // create a namespace nsId, err := s.db.PolicyClient.CreateNamespace(s.ctx, "cascading-deactivate-attribute.com") assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", nsId) + assert.NotZero(s.T(), nsId) // add an attribute under that namespaces attr := &attributes.AttributeCreateUpdate{ diff --git a/integration/kas_registry_test.go b/integration/kas_registry_test.go index 9ef065fc00..ec190f0abf 100644 --- a/integration/kas_registry_test.go +++ b/integration/kas_registry_test.go @@ -118,7 +118,7 @@ func (s *KasRegistrySuite) Test_CreateKeyAccessServer_Remote() { assert.Equal(s.T(), createdKasRegistry.PublicKey.GetLocal(), "") assert.Equal(s.T(), kasRegistry.Metadata.Description, createdKasRegistry.Metadata.Description) assert.EqualValues(s.T(), kasRegistry.Metadata.Labels, createdKasRegistry.Metadata.Labels) - assert.NotEqual(s.T(), "", createdKasRegistry.Id) + assert.NotZero(s.T(), createdKasRegistry.Id) } func (s *KasRegistrySuite) Test_CreateKeyAccessServer_Local() { @@ -148,7 +148,7 @@ func (s *KasRegistrySuite) Test_CreateKeyAccessServer_Local() { assert.Equal(s.T(), createdKasRegistry.PublicKey.GetRemote(), "") assert.Equal(s.T(), kasRegistry.Metadata.Description, createdKasRegistry.Metadata.Description) assert.EqualValues(s.T(), kasRegistry.Metadata.Labels, createdKasRegistry.Metadata.Labels) - assert.NotEqual(s.T(), "", createdKasRegistry.Id) + assert.NotZero(s.T(), createdKasRegistry.Id) } func (s *KasRegistrySuite) Test_UpdateKeyAccessServer() { diff --git a/integration/namespaces_test.go b/integration/namespaces_test.go index 5b38929985..dccbe8419f 100644 --- a/integration/namespaces_test.go +++ b/integration/namespaces_test.go @@ -163,7 +163,7 @@ func (s *NamespacesSuite) Test_DeleteNamespace() { // Deletion should succeed when NOT referenced as FK in attribute(s) newNamespaceId, err := s.db.PolicyClient.CreateNamespace(s.ctx, "new-namespace.com") assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", newNamespaceId) + assert.NotZero(s.T(), newNamespaceId) deleted, err := s.db.PolicyClient.DeleteNamespace(s.ctx, newNamespaceId) assert.Nil(s.T(), err) @@ -185,7 +185,7 @@ func (s *NamespacesSuite) Test_DeleteNamespace() { func (s *NamespacesSuite) Test_DeactivateNamespace() { id, err := s.db.PolicyClient.CreateNamespace(s.ctx, "testing-sdeactivate-namespace.com") assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", id) + assert.NotZero(s.T(), id) inactive, err := s.db.PolicyClient.DeactivateNamespace(s.ctx, id) assert.Nil(s.T(), err) @@ -212,7 +212,7 @@ func setupCascadeDeactivateNamespace(s *NamespacesSuite) (string, string, string // create a namespace nsId, err := s.db.PolicyClient.CreateNamespace(s.ctx, "cascading-deactivate-namespace.com") assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", nsId) + assert.NotZero(s.T(), nsId) // add an attribute under that namespaces attr := &attributes.AttributeCreateUpdate{ diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index a9056dd641..26422e7b8b 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -2,7 +2,6 @@ package integration import ( "context" - "fmt" "log/slog" "testing" @@ -89,7 +88,7 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_ExistingSubjectCondition smId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", smId) + assert.NotZero(s.T(), smId) // verify the subject mapping was created sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, smId) @@ -131,8 +130,7 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NewSubjectConditionSet() smId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", smId) - fmt.Println("outside creation of subject mapping") + assert.NotZero(s.T(), smId) // verify the new subject condition set created was returned properly sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, smId) @@ -211,7 +209,7 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_Actions() { createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", createdId) + assert.NotZero(s.T(), createdId) // update the subject mapping newActions := []*authorization.Action{aTransmit} @@ -248,7 +246,7 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_SubjectConditionSetId() createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", createdId) + assert.NotZero(s.T(), createdId) // update the subject mapping newScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") @@ -285,7 +283,7 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_UpdateAllAllowedFields() createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", createdId) + assert.NotZero(s.T(), createdId) // update the subject mapping newScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") @@ -323,7 +321,7 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_NonExistentId_Fails() { smId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.NotNil(s.T(), err) - assert.Equal(s.T(), smId, "") + assert.Zero(s.T(), smId) assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -335,7 +333,7 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_NonExistentSubjectCondit smId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.NotNil(s.T(), err) - assert.Equal(s.T(), smId, "") + assert.Zero(s.T(), smId) assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -422,7 +420,7 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping() { createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", createdId) + assert.NotZero(s.T(), createdId) deletedId, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, createdId) assert.Nil(s.T(), err) @@ -437,7 +435,7 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping() { func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_WithNonExistentId_Fails() { deletedId, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, nonExistentSubjectMappingId) assert.NotNil(s.T(), err) - assert.Equal(s.T(), deletedId, "") + assert.Zero(s.T(), deletedId) assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -472,13 +470,13 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_DoesNotDeleteSubjectCond createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", createdId) + assert.NotZero(s.T(), createdId) sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) assert.Nil(s.T(), err) deletedId, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, sm.Id) assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", deletedId) + assert.NotZero(s.T(), deletedId) scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, sm.SubjectConditionSet.Id) assert.Nil(s.T(), err) @@ -578,7 +576,7 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet() { createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotEqual(s.T(), "", createdId) + assert.NotZero(s.T(), createdId) deletedId, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, createdId) assert.Nil(s.T(), err) @@ -593,7 +591,7 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet() { func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet_WithNonExistentId_Fails() { deletedId, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, nonExistentSubjectSetId) assert.NotNil(s.T(), err) - assert.Equal(s.T(), deletedId, "") + assert.Zero(s.T(), deletedId) assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -607,9 +605,7 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - // TODO: see if this is reusable assert.NotZero(s.T(), createdId) - assert.NotEqual(s.T(), "", createdId) // update the subject condition set ss := []*subjectmapping.SubjectSet{ diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index a13ffe3a44..031b5c14af 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -4,7 +4,6 @@ import ( "context" "encoding/json" "errors" - "fmt" "log/slog" sq "github.com/Masterminds/squirrel" @@ -469,7 +468,6 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp scsId, ) - fmt.Println("here") var id string if r, err := c.QueryRow(ctx, sql, args, err); err != nil { return "", err From 7d92289229a2048641ab6620a42255f2a38651fd Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 17:22:35 -0500 Subject: [PATCH 21/39] move policy tables into policy db package and out of main internal db package --- internal/db/db.go | 59 ++++++++++---------------- services/policy/db/attribute_fqn.go | 8 ++-- services/policy/db/attribute_values.go | 26 ++++++------ services/policy/db/attributes.go | 42 +++++++++--------- services/policy/db/namespaces.go | 16 +++---- services/policy/db/policy.go | 44 ++++++++++++++----- services/policy/db/resource_mapping.go | 16 +++---- services/policy/db/subject_mappings.go | 28 ++++++------ 8 files changed, 124 insertions(+), 115 deletions(-) diff --git a/internal/db/db.go b/internal/db/db.go index d4a457dfa5..a28343b414 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -13,29 +13,20 @@ 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" - TableSubjectConditionSet = "subject_condition_set" + TableKeyAccessServerRegistry = "key_access_servers" + TableAttributes = "attribute_definitions" + TableAttributeValues = "attribute_values" + TableNamespaces = "attribute_namespaces" + TableAttrFqn = "attribute_fqns" + TableAttributeKeyAccessGrants = "attribute_definition_key_access_grants" + TableAttributeValueKeyAccessGrants = "attribute_value_key_access_grants" + TableResourceMappings = "resource_mappings" + TableSubjectMappings = "subject_mappings" + 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 - SubjectConditionSet Table + KeyAccessServerRegistry Table } type Table struct { @@ -44,16 +35,20 @@ type Table struct { withSchema bool } -func NewTable(name string, schema string) Table { - return Table{ - name: name, - schema: schema, - withSchema: true, +func NewTableWithSchema(schema string) func(name string) Table { + s := schema + return func(name string) Table { + return Table{ + name: name, + schema: s, + withSchema: true, + } } } +var NewTable func(name string) Table func (t Table) WithoutSchema() Table { - nT := NewTable(t.name, t.schema) + nT := NewTableWithSchema(t.schema)(t.name) nT.withSchema = false return nT } @@ -102,16 +97,8 @@ func NewClient(config Config) (*Client, error) { return nil, fmt.Errorf("failed to create pgxpool: %w", err) } - Tables.Attributes = NewTable(TableAttributes, config.Schema) - Tables.AttributeValues = NewTable(TableAttributeValues, config.Schema) - Tables.Namespaces = NewTable(TableNamespaces, config.Schema) - Tables.AttrFqn = NewTable(TableAttrFqn, config.Schema) - Tables.KeyAccessServerRegistry = NewTable(TableKeyAccessServerRegistry, config.Schema) - Tables.AttributeKeyAccessGrants = NewTable(TableAttributeKeyAccessGrants, config.Schema) - Tables.AttributeValueKeyAccessGrants = NewTable(TableAttributeValueKeyAccessGrants, config.Schema) - Tables.ResourceMappings = NewTable(TableResourceMappings, config.Schema) - Tables.SubjectMappings = NewTable(TableSubjectMappings, config.Schema) - Tables.SubjectConditionSet = NewTable(TableSubjectConditionSet, config.Schema) + NewTable = NewTableWithSchema(config.Schema) + Tables.KeyAccessServerRegistry = NewTable(TableKeyAccessServerRegistry) return &Client{ Pgx: pool, diff --git a/services/policy/db/attribute_fqn.go b/services/policy/db/attribute_fqn.go index 3afaedf987..42b00b2eee 100644 --- a/services/policy/db/attribute_fqn.go +++ b/services/policy/db/attribute_fqn.go @@ -27,10 +27,10 @@ type attrFqnUpsertOptions struct { // 2. namespaceId, attributeId // 3. namespaceId, attributeId, valueId func upsertAttrFqnSql(namespaceId string, attributeId string, valueId string) (string, []interface{}, error) { - t := db.Tables.AttrFqn - nT := db.Tables.Namespaces - adT := db.Tables.Attributes - avT := db.Tables.AttributeValues + t := Tables.AttrFqn + nT := Tables.Namespaces + adT := Tables.Attributes + avT := Tables.AttributeValues sb := db.NewStatementBuilder() var subQ squirrel.SelectBuilder diff --git a/services/policy/db/attribute_values.go b/services/policy/db/attribute_values.go index 6ba1145129..b85eb530d4 100644 --- a/services/policy/db/attribute_values.go +++ b/services/policy/db/attribute_values.go @@ -87,7 +87,7 @@ func createAttributeValueSql( members []string, metadata []byte, ) (string, []interface{}, error) { - t := db.Tables.AttributeValues + t := Tables.AttributeValues return db.NewStatementBuilder(). Insert(t.Name()). Columns( @@ -144,7 +144,7 @@ func (c PolicyDbClient) CreateAttributeValue(ctx context.Context, attributeId st } func getAttributeValueSql(id string, opts attributeValueSelectOptions) (string, []interface{}, error) { - t := db.Tables.AttributeValues + t := Tables.AttributeValues fields := []string{ t.Field("id"), t.Field("value"), @@ -154,7 +154,7 @@ func getAttributeValueSql(id string, opts attributeValueSelectOptions) (string, t.Field("attribute_definition_id"), } if opts.withFqn { - fields = append(fields, db.Tables.AttrFqn.Field("fqn")) + fields = append(fields, Tables.AttrFqn.Field("fqn")) } sb := db.NewStatementBuilder(). @@ -162,7 +162,7 @@ func getAttributeValueSql(id string, opts attributeValueSelectOptions) (string, From(t.Name()) if opts.withFqn { - fqnT := db.Tables.AttrFqn + fqnT := Tables.AttrFqn sb = sb.LeftJoin(fqnT.Name() + " ON " + fqnT.Field("value_id") + " = " + t.Field("id")) } @@ -188,7 +188,7 @@ func (c PolicyDbClient) GetAttributeValue(ctx context.Context, id string) (*attr } func listAttributeValuesSql(attribute_id string, opts attributeValueSelectOptions) (string, []interface{}, error) { - t := db.Tables.AttributeValues + t := Tables.AttributeValues fields := []string{ t.Field("id"), t.Field("value"), @@ -205,7 +205,7 @@ func listAttributeValuesSql(attribute_id string, opts attributeValueSelectOption Select(fields...) if opts.withFqn { - fqnT := db.Tables.AttrFqn + fqnT := Tables.AttrFqn sb = sb.LeftJoin(fqnT.Name() + " ON " + fqnT.Field("value_id") + " = " + t.Field("id")) } @@ -234,7 +234,7 @@ func (c PolicyDbClient) ListAttributeValues(ctx context.Context, attribute_id st } func listAllAttributeValuesSql(opts attributeValueSelectOptions) (string, []interface{}, error) { - t := db.Tables.AttributeValues + t := Tables.AttributeValues fields := []string{ t.Field("id"), t.Field("value"), @@ -250,7 +250,7 @@ func listAllAttributeValuesSql(opts attributeValueSelectOptions) (string, []inte Select(fields...) if opts.withFqn { - fqnT := db.Tables.AttrFqn + fqnT := Tables.AttrFqn sb = sb.LeftJoin(fqnT.Name() + " ON " + fqnT.Field("value_id") + " = " + t.Field("id")) } @@ -276,7 +276,7 @@ func updateAttributeValueSql( members []string, metadata []byte, ) (string, []interface{}, error) { - t := db.Tables.AttributeValues + t := Tables.AttributeValues sb := db.NewStatementBuilder(). Update(t.Name()). Set("metadata", metadata) @@ -325,7 +325,7 @@ func (c PolicyDbClient) UpdateAttributeValue(ctx context.Context, id string, v * } func deactivateAttributeValueSql(id string) (string, []interface{}, error) { - t := db.Tables.AttributeValues + t := Tables.AttributeValues return db.NewStatementBuilder(). Update(t.Name()). Set("active", false). @@ -343,7 +343,7 @@ func (c PolicyDbClient) DeactivateAttributeValue(ctx context.Context, id string) } func deleteAttributeValueSql(id string) (string, []interface{}, error) { - t := db.Tables.AttributeValues + t := Tables.AttributeValues return db.NewStatementBuilder(). Delete(t.Name()). Where(sq.Eq{t.Field("id"): id}). @@ -365,7 +365,7 @@ func (c PolicyDbClient) DeleteAttributeValue(ctx context.Context, id string) (*a } func assignKeyAccessServerToValueSql(valueID, keyAccessServerID string) (string, []interface{}, error) { - t := db.Tables.AttributeValueKeyAccessGrants + t := Tables.AttributeValueKeyAccessGrants return db.NewStatementBuilder(). Insert(t.Name()). Columns("attribute_value_id", "key_access_server_id"). @@ -387,7 +387,7 @@ func (c PolicyDbClient) AssignKeyAccessServerToValue(ctx context.Context, k *att } func removeKeyAccessServerFromValueSql(valueID, keyAccessServerID string) (string, []interface{}, error) { - t := db.Tables.AttributeValueKeyAccessGrants + t := Tables.AttributeValueKeyAccessGrants return db.NewStatementBuilder(). Delete(t.Name()). Where(sq.Eq{t.Field("attribute_value_id"): valueID, t.Field("key_access_server_id"): keyAccessServerID}). diff --git a/services/policy/db/attributes.go b/services/policy/db/attributes.go index ebdf7a9a0f..3d6d4d4441 100644 --- a/services/policy/db/attributes.go +++ b/services/policy/db/attributes.go @@ -63,12 +63,12 @@ func attributesSelect(opts attributesSelectOptions) sq.SelectBuilder { opts.withAttributeValues = true } - t := db.Tables.Attributes - nt := db.Tables.Namespaces - avt := db.Tables.AttributeValues - fqnt := db.Tables.AttrFqn - // akt := db.Tables.AttributeKeyAccessGrants - // avkt := db.Tables.AttributeKeyAccessGrants + t := Tables.Attributes + nt := Tables.Namespaces + avt := Tables.AttributeValues + fqnt := Tables.AttrFqn + // akt := Tables.AttributeKeyAccessGrants + // avkt := Tables.AttributeKeyAccessGrants selectFields := []string{ t.Field("id"), t.Field("name"), @@ -103,7 +103,7 @@ func attributesSelect(opts attributesSelectOptions) sq.SelectBuilder { ")"+ ") "+ "FROM "+db.Tables.KeyAccessServerRegistry.Name()+" kas "+ - "JOIN "+db.Tables.AttributeValueKeyAccessGrants.Name()+" avkag ON avkag.key_access_server_id = kas.id "+ + "JOIN "+Tables.AttributeValueKeyAccessGrants.Name()+" avkag ON avkag.key_access_server_id = kas.id "+ "WHERE avkag.attribute_value_id = "+avt.Field("id")+ ")"+ ")) AS grants") @@ -119,8 +119,8 @@ func attributesSelect(opts attributesSelectOptions) sq.SelectBuilder { sb = sb.LeftJoin(avt.Name() + " ON " + avt.Field("attribute_definition_id") + " = " + t.Field("id")) } if opts.withKeyAccessGrants { - sb = sb.LeftJoin(db.Tables.AttributeKeyAccessGrants.Name() + " ON " + db.Tables.AttributeKeyAccessGrants.WithoutSchema().Name() + ".attribute_definition_id = " + t.Field("id")). - LeftJoin(db.Tables.KeyAccessServerRegistry.Name() + " ON " + db.Tables.KeyAccessServerRegistry.Name() + ".id = " + db.Tables.AttributeKeyAccessGrants.WithoutSchema().Name() + ".key_access_server_id") + sb = sb.LeftJoin(Tables.AttributeKeyAccessGrants.Name() + " ON " + Tables.AttributeKeyAccessGrants.WithoutSchema().Name() + ".attribute_definition_id = " + t.Field("id")). + LeftJoin(db.Tables.KeyAccessServerRegistry.Name() + " ON " + db.Tables.KeyAccessServerRegistry.Name() + ".id = " + Tables.AttributeKeyAccessGrants.WithoutSchema().Name() + ".key_access_server_id") } if opts.withFqn { sb = sb.LeftJoin(fqnt.Name() + " ON " + fqnt.Field("attribute_id") + " = " + t.Field("id") + @@ -134,7 +134,7 @@ func attributesSelect(opts attributesSelectOptions) sq.SelectBuilder { g := []string{t.Field("id"), nt.Field("name")} if opts.withFqn { - g = append(g, db.Tables.AttrFqn.Field("fqn")) + g = append(g, Tables.AttrFqn.Field("fqn")) } return sb.GroupBy(g...) @@ -231,7 +231,7 @@ func attributesHydrateList(rows pgx.Rows, opts attributesSelectOptions) ([]*attr /// func listAllAttributesSql(opts attributesSelectOptions) (string, []interface{}, error) { - t := db.Tables.Attributes + t := Tables.Attributes sb := attributesSelect(opts). From(t.Name()) @@ -291,7 +291,7 @@ func (c PolicyDbClient) ListAllAttributesWithout(ctx context.Context, state stri } func getAttributeSql(id string, opts attributesSelectOptions) (string, []interface{}, error) { - t := db.Tables.Attributes + t := Tables.Attributes return attributesSelect(opts). Where(sq.Eq{t.Field("id"): id}). From(t.Name()). @@ -320,8 +320,8 @@ func (c PolicyDbClient) GetAttribute(ctx context.Context, id string) (*attribute // / Get attribute by fqn func getAttributeByFqnSql(fqn string, opts attributesSelectOptions) (string, []interface{}, error) { return attributesSelect(opts). - Where(sq.Eq{db.Tables.AttrFqn.Field("fqn"): fqn}). - From(db.Tables.Attributes.Name()). + Where(sq.Eq{Tables.AttrFqn.Field("fqn"): fqn}). + From(Tables.Attributes.Name()). ToSql() } @@ -350,7 +350,7 @@ func (c PolicyDbClient) GetAttributeByFqn(ctx context.Context, fqn string) (*att } func getAttributesByNamespaceSql(namespaceId string, opts attributesSelectOptions) (string, []interface{}, error) { - t := db.Tables.Attributes + t := Tables.Attributes return attributesSelect(opts). Where(sq.Eq{t.Field("namespace_id"): namespaceId}). From(t.Name()). @@ -376,7 +376,7 @@ func (c PolicyDbClient) GetAttributesByNamespace(ctx context.Context, namespaceI } func createAttributeSql(namespaceId string, name string, rule string, metadata []byte) (string, []interface{}, error) { - t := db.Tables.Attributes + t := Tables.Attributes return db.NewStatementBuilder(). Insert(t.Name()). Columns("namespace_id", "name", "rule", "metadata"). @@ -416,7 +416,7 @@ func (c PolicyDbClient) CreateAttribute(ctx context.Context, attr *attributes.At } func updateAttributeSql(id string, name string, rule string, metadata []byte) (string, []interface{}, error) { - t := db.Tables.Attributes + t := Tables.Attributes sb := db.NewStatementBuilder(). Update(t.Name()) @@ -461,7 +461,7 @@ func (c PolicyDbClient) UpdateAttribute(ctx context.Context, id string, attr *at } func deactivateAttributeSql(id string) (string, []interface{}, error) { - t := db.Tables.Attributes + t := Tables.Attributes return db.NewStatementBuilder(). Update(t.Name()). Set("active", false). @@ -480,7 +480,7 @@ func (c PolicyDbClient) DeactivateAttribute(ctx context.Context, id string) (*at } func deleteAttributeSql(id string) (string, []interface{}, error) { - t := db.Tables.Attributes + t := Tables.Attributes return db.NewStatementBuilder(). Delete(t.Name()). Where(sq.Eq{t.Field("id"): id}). @@ -505,7 +505,7 @@ func (c PolicyDbClient) DeleteAttribute(ctx context.Context, id string) (*attrib } func assignKeyAccessServerToAttributeSql(attributeID, keyAccessServerID string) (string, []interface{}, error) { - t := db.Tables.AttributeKeyAccessGrants + t := Tables.AttributeKeyAccessGrants return db.NewStatementBuilder(). Insert(t.Name()). Columns("attribute_definition_id", "key_access_server_id"). @@ -524,7 +524,7 @@ func (c PolicyDbClient) AssignKeyAccessServerToAttribute(ctx context.Context, k } func removeKeyAccessServerFromAttributeSql(attributeID, keyAccessServerID string) (string, []interface{}, error) { - t := db.Tables.AttributeKeyAccessGrants + t := Tables.AttributeKeyAccessGrants return db.NewStatementBuilder(). Delete(t.Name()). Where(sq.Eq{"attribute_definition_id": attributeID, "key_access_server_id": keyAccessServerID}). diff --git a/services/policy/db/namespaces.go b/services/policy/db/namespaces.go index c24ed96890..aad48d731f 100644 --- a/services/policy/db/namespaces.go +++ b/services/policy/db/namespaces.go @@ -57,8 +57,8 @@ func hydrateNamespaceItems(rows pgx.Rows, opts namespaceSelectOptions) ([]*names } func getNamespaceSql(id string, opts namespaceSelectOptions) (string, []interface{}, error) { - t := db.Tables.Namespaces - fqnT := db.Tables.AttrFqn + t := Tables.Namespaces + fqnT := Tables.AttrFqn fields := []string{ t.Field("id"), t.Field("name"), @@ -104,8 +104,8 @@ func (c PolicyDbClient) GetNamespace(ctx context.Context, id string) (*namespace } func listNamespacesSql(opts namespaceSelectOptions) (string, []interface{}, error) { - t := db.Tables.Namespaces - fqnT := db.Tables.AttrFqn + t := Tables.Namespaces + fqnT := Tables.AttrFqn fields := []string{ t.Field("id"), @@ -159,7 +159,7 @@ func (c PolicyDbClient) ListNamespaces(ctx context.Context, state string) ([]*na } func createNamespaceSql(name string) (string, []interface{}, error) { - t := db.Tables.Namespaces + t := Tables.Namespaces return db.NewStatementBuilder(). Insert(t.Name()). Columns("name"). @@ -185,7 +185,7 @@ func (c PolicyDbClient) CreateNamespace(ctx context.Context, name string) (strin } func updateNamespaceSql(id string, name string) (string, []interface{}, error) { - t := db.Tables.Namespaces + t := Tables.Namespaces return db.NewStatementBuilder(). Update(t.Name()). Set("name", name). @@ -207,7 +207,7 @@ func (c PolicyDbClient) UpdateNamespace(ctx context.Context, id string, name str } func deactivateNamespaceSql(id string) (string, []interface{}, error) { - t := db.Tables.Namespaces + t := Tables.Namespaces return db.NewStatementBuilder(). Update(t.Name()). Set("active", false). @@ -226,7 +226,7 @@ func (c PolicyDbClient) DeactivateNamespace(ctx context.Context, id string) (*na } func deleteNamespaceSql(id string) (string, []interface{}, error) { - t := db.Tables.Namespaces + t := Tables.Namespaces // TODO: handle delete cascade, dangerous deletion via special rpc [https://github.com/opentdf/platform/issues/115] return db.NewStatementBuilder(). Delete(t.Name()). diff --git a/services/policy/db/policy.go b/services/policy/db/policy.go index 90a76e6f3d..9c22c2353d 100644 --- a/services/policy/db/policy.go +++ b/services/policy/db/policy.go @@ -4,13 +4,6 @@ import ( "github.com/opentdf/platform/internal/db" ) -var ( - ResourceMappingTable string - NamespacesTable string - AttributeValueTable string - AttributeTable string -) - const ( StateInactive = "INACTIVE" StateActive = "ACTIVE" @@ -22,11 +15,40 @@ type PolicyDbClient struct { db.Client } +var ( + TableAttributes = "attribute_definitions" + TableAttributeValues = "attribute_values" + TableNamespaces = "attribute_namespaces" + TableAttrFqn = "attribute_fqns" + TableAttributeKeyAccessGrants = "attribute_definition_key_access_grants" + TableAttributeValueKeyAccessGrants = "attribute_value_key_access_grants" + TableResourceMappings = "resource_mappings" + TableSubjectMappings = "subject_mappings" + TableSubjectConditionSet = "subject_condition_set" +) + +var Tables struct { + Attributes db.Table + AttributeValues db.Table + Namespaces db.Table + AttrFqn db.Table + AttributeKeyAccessGrants db.Table + AttributeValueKeyAccessGrants db.Table + ResourceMappings db.Table + SubjectMappings db.Table + SubjectConditionSet db.Table +} + func NewClient(c db.Client) *PolicyDbClient { - ResourceMappingTable = db.Tables.ResourceMappings.Name() - NamespacesTable = db.Tables.Namespaces.Name() - AttributeValueTable = db.Tables.AttributeValues.Name() - AttributeTable = db.Tables.Attributes.Name() + Tables.Attributes = db.NewTable(TableAttributes) + Tables.AttributeValues = db.NewTable(TableAttributeValues) + Tables.Namespaces = db.NewTable(TableNamespaces) + Tables.AttrFqn = db.NewTable(TableAttrFqn) + Tables.AttributeKeyAccessGrants = db.NewTable(TableAttributeKeyAccessGrants) + Tables.AttributeValueKeyAccessGrants = db.NewTable(TableAttributeValueKeyAccessGrants) + Tables.ResourceMappings = db.NewTable(TableResourceMappings) + Tables.SubjectMappings = db.NewTable(TableSubjectMappings) + Tables.SubjectConditionSet = db.NewTable(TableSubjectConditionSet) return &PolicyDbClient{c} } diff --git a/services/policy/db/resource_mapping.go b/services/policy/db/resource_mapping.go index 9a7bc1801e..d891514b68 100644 --- a/services/policy/db/resource_mapping.go +++ b/services/policy/db/resource_mapping.go @@ -67,8 +67,8 @@ func resourceMappingHydrateItem(row pgx.Row) (*resourcemapping.ResourceMapping, } func resourceMappingSelect() sq.SelectBuilder { - t := db.Tables.ResourceMappings - at := db.Tables.AttributeValues + t := Tables.ResourceMappings + at := Tables.AttributeValues return db.NewStatementBuilder().Select( t.Field("id"), t.Field("metadata"), @@ -90,7 +90,7 @@ func resourceMappingSelect() sq.SelectBuilder { func createResourceMappingSQL(attributeValueID string, metadata []byte, terms []string) (string, []interface{}, error) { return db.NewStatementBuilder(). - Insert(ResourceMappingTable). + Insert(Tables.ResourceMappings.Name()). Columns( "attribute_value_id", "metadata", @@ -141,10 +141,10 @@ func (c PolicyDbClient) CreateResourceMapping(ctx context.Context, rm *resourcem } func getResourceMappingSQL(id string) (string, []interface{}, error) { - t := db.Tables.ResourceMappings + t := Tables.ResourceMappings return resourceMappingSelect(). Where(sq.Eq{t.Field("id"): id}). - From(ResourceMappingTable). + From(Tables.ResourceMappings.Name()). ToSql() } @@ -164,7 +164,7 @@ func (c PolicyDbClient) GetResourceMapping(ctx context.Context, id string) (*res } func listResourceMappingsSQL() (string, []interface{}, error) { - t := db.Tables.ResourceMappings + t := Tables.ResourceMappings return resourceMappingSelect(). From(t.Name()). ToSql() @@ -191,7 +191,7 @@ func (c PolicyDbClient) ListResourceMappings(ctx context.Context) ([]*resourcema } func updateResourceMappingSQL(id string, attribute_value_id string, metadata []byte, terms []string) (string, []interface{}, error) { - t := db.Tables.ResourceMappings + t := Tables.ResourceMappings sb := db.NewStatementBuilder(). Update(t.Name()) @@ -241,7 +241,7 @@ func (c PolicyDbClient) UpdateResourceMapping(ctx context.Context, id string, rm } func deleteResourceMappingSQL(id string) (string, []interface{}, error) { - t := db.Tables.ResourceMappings + t := Tables.ResourceMappings return db.NewStatementBuilder(). Delete(t.Name()). Where(sq.Eq{t.Field("id"): id}). diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 031b5c14af..d1fabddf88 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -83,7 +83,7 @@ func unmarshalActionsProto(actionsJSON []byte) ([]*authorization.Action, error) } func subjectConditionSetSelect() sq.SelectBuilder { - t := db.Tables.SubjectConditionSet + t := Tables.SubjectConditionSet return db.NewStatementBuilder().Select( t.Field("id"), t.Field("metadata"), @@ -139,9 +139,9 @@ func subjectConditionSetHydrateList(rows pgx.Rows) ([]*subjectmapping.SubjectCon } func subjectMappingSelect() sq.SelectBuilder { - t := db.Tables.SubjectMappings - avT := db.Tables.AttributeValues - scsT := db.Tables.SubjectConditionSet + t := Tables.SubjectMappings + avT := Tables.AttributeValues + scsT := Tables.SubjectConditionSet return db.NewStatementBuilder().Select( t.Field("id"), @@ -240,7 +240,7 @@ func subjectMappingHydrateList(rows pgx.Rows) ([]*subjectmapping.SubjectMapping, } func createSubjectConditionSetSql(subjectSets []*subjectmapping.SubjectSet, metadataJSON []byte) (string, []interface{}, error) { - t := db.Tables.SubjectConditionSet + t := Tables.SubjectConditionSet conditionJSON, err := marshalSubjectSetsProto(subjectSets) if err != nil { return "", nil, err @@ -281,7 +281,7 @@ func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjec } func getSubjectConditionSetSql(id string) (string, []interface{}, error) { - t := db.Tables.SubjectConditionSet + t := Tables.SubjectConditionSet return subjectConditionSetSelect(). From(t.Name()).Where(sq.Eq{t.Field("id"): id}).ToSql() } @@ -301,7 +301,7 @@ func (c PolicyDbClient) GetSubjectConditionSet(ctx context.Context, id string) ( } func listSubjectConditionSetsSql() (string, []interface{}, error) { - t := db.Tables.SubjectConditionSet + t := Tables.SubjectConditionSet return subjectConditionSetSelect(). From(t.Name()). ToSql() @@ -323,7 +323,7 @@ func (c PolicyDbClient) ListSubjectConditionSets(ctx context.Context) ([]*subjec } func updateSubjectConditionSetSql(id string, metadata []byte, condition []byte) (string, []interface{}, error) { - t := db.Tables.SubjectConditionSet + t := Tables.SubjectConditionSet sb := db.NewStatementBuilder(). Update(t.Name()) @@ -380,7 +380,7 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, s *subjec } func deleteSubjectConditionSetSql(id string) (string, []interface{}, error) { - t := db.Tables.SubjectConditionSet + t := Tables.SubjectConditionSet return db.NewStatementBuilder(). Delete(t.Name()). Where(sq.Eq{t.Field("id"): id}). @@ -403,7 +403,7 @@ func (c PolicyDbClient) DeleteSubjectConditionSet(ctx context.Context, id string } func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata []byte, subject_condition_set_id string) (string, []interface{}, error) { - t := db.Tables.SubjectMappings + t := Tables.SubjectMappings columns := []string{ "attribute_value_id", @@ -479,7 +479,7 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp } func getSubjectMappingSql(id string) (string, []interface{}, error) { - t := db.Tables.SubjectMappings + t := Tables.SubjectMappings return subjectMappingSelect(). From(t.Name()). Where(sq.Eq{t.Field("id"): id}). @@ -498,7 +498,7 @@ func (c PolicyDbClient) GetSubjectMapping(ctx context.Context, id string) (*subj } func listSubjectMappingsSql() (string, []interface{}, error) { - t := db.Tables.SubjectMappings + t := Tables.SubjectMappings return subjectMappingSelect(). From(t.Name()). ToSql() @@ -525,7 +525,7 @@ func (c PolicyDbClient) ListSubjectMappings(ctx context.Context) ([]*subjectmapp } func updateSubjectMappingSql(id string, metadataJSON []byte, subject_condition_set_id string, actionsJSON []byte) (string, []interface{}, error) { - t := db.Tables.SubjectMappings + t := Tables.SubjectMappings sb := db.NewStatementBuilder(). Update(t.Name()) @@ -594,7 +594,7 @@ func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapp } func deleteSubjectMappingSql(id string) (string, []interface{}, error) { - t := db.Tables.SubjectMappings + t := Tables.SubjectMappings return db.NewStatementBuilder(). Delete(t.Name()). Where(sq.Eq{t.Field("id"): id}). From 10756daf7dba95ae84ba7d5b58f10fa76d711b71 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Wed, 6 Mar 2024 17:31:55 -0500 Subject: [PATCH 22/39] move kasr db out of internal db package --- internal/db/db.go | 19 +---------------- .../db/key_access_server_registry.go | 21 ++++++++++++------- services/policy/db/attributes.go | 5 +++-- 3 files changed, 17 insertions(+), 28 deletions(-) diff --git a/internal/db/db.go b/internal/db/db.go index a28343b414..f0621eec6a 100644 --- a/internal/db/db.go +++ b/internal/db/db.go @@ -12,23 +12,6 @@ import ( "github.com/jackc/pgx/v5/pgxpool" ) -var ( - TableKeyAccessServerRegistry = "key_access_servers" - TableAttributes = "attribute_definitions" - TableAttributeValues = "attribute_values" - TableNamespaces = "attribute_namespaces" - TableAttrFqn = "attribute_fqns" - TableAttributeKeyAccessGrants = "attribute_definition_key_access_grants" - TableAttributeValueKeyAccessGrants = "attribute_value_key_access_grants" - TableResourceMappings = "resource_mappings" - TableSubjectMappings = "subject_mappings" - TableSubjectConditionSet = "subject_condition_set" -) - -var Tables struct { - KeyAccessServerRegistry Table -} - type Table struct { name string schema string @@ -45,6 +28,7 @@ func NewTableWithSchema(schema string) func(name string) Table { } } } + var NewTable func(name string) Table func (t Table) WithoutSchema() Table { @@ -98,7 +82,6 @@ func NewClient(config Config) (*Client, error) { } NewTable = NewTableWithSchema(config.Schema) - Tables.KeyAccessServerRegistry = NewTable(TableKeyAccessServerRegistry) return &Client{ Pgx: pool, diff --git a/services/kasregistry/db/key_access_server_registry.go b/services/kasregistry/db/key_access_server_registry.go index 665ea816dc..8d6673d83c 100644 --- a/services/kasregistry/db/key_access_server_registry.go +++ b/services/kasregistry/db/key_access_server_registry.go @@ -11,14 +11,20 @@ import ( "google.golang.org/protobuf/encoding/protojson" ) -var KeyAccessServerTable string +var ( + TableKeyAccessServerRegistry = "key_access_servers" + + Tables struct { + KeyAccessServerRegistry db.Table + } +) type KasRegistryDbClient struct { db.Client } func NewClient(c db.Client) *KasRegistryDbClient { - KeyAccessServerTable = db.Tables.KeyAccessServerRegistry.Name() + Tables.KeyAccessServerRegistry = db.NewTable(TableKeyAccessServerRegistry) return &KasRegistryDbClient{c} } @@ -35,7 +41,7 @@ func keyAccessServerSelect() sq.SelectBuilder { func listAllKeyAccessServersSql() (string, []interface{}, error) { return keyAccessServerSelect(). - From(KeyAccessServerTable). + From(Tables.KeyAccessServerRegistry.Name()). ToSql() } @@ -82,7 +88,6 @@ func (c KasRegistryDbClient) ListKeyAccessServers(ctx context.Context) ([]*kasr. return nil }) - if err != nil { return nil, err } @@ -93,7 +98,7 @@ func (c KasRegistryDbClient) ListKeyAccessServers(ctx context.Context) ([]*kasr. func getKeyAccessServerSql(id string) (string, []interface{}, error) { return keyAccessServerSelect(). Where(sq.Eq{"id": id}). - From(KeyAccessServerTable). + From(Tables.KeyAccessServerRegistry.Name()). ToSql() } @@ -137,7 +142,7 @@ func (c KasRegistryDbClient) GetKeyAccessServer(ctx context.Context, id string) func createKeyAccessServerSQL(uri string, publicKey, metadata []byte) (string, []interface{}, error) { return db.NewStatementBuilder(). - Insert(KeyAccessServerTable). + Insert(Tables.KeyAccessServerRegistry.Name()). Columns("uri", "public_key", "metadata"). Values(uri, publicKey, metadata). Suffix("RETURNING \"id\""). @@ -178,7 +183,7 @@ func (c KasRegistryDbClient) CreateKeyAccessServer(ctx context.Context, keyAcces func updateKeyAccessServerSQL(id, keyAccessServer string, publicKey, metadata []byte) (string, []interface{}, error) { return db.NewStatementBuilder(). - Update(KeyAccessServerTable). + Update(Tables.KeyAccessServerRegistry.Name()). Set("uri", keyAccessServer). Set("public_key", publicKey). Set("metadata", metadata). @@ -213,7 +218,7 @@ func (c KasRegistryDbClient) UpdateKeyAccessServer(ctx context.Context, id strin func deleteKeyAccessServerSQL(id string) (string, []interface{}, error) { return db.NewStatementBuilder(). - Delete(KeyAccessServerTable). + Delete(Tables.KeyAccessServerRegistry.Name()). Where(sq.Eq{"id": id}). ToSql() } diff --git a/services/policy/db/attributes.go b/services/policy/db/attributes.go index 3d6d4d4441..98b026ad45 100644 --- a/services/policy/db/attributes.go +++ b/services/policy/db/attributes.go @@ -16,6 +16,7 @@ import ( "github.com/opentdf/platform/protocol/go/kasregistry" "github.com/opentdf/platform/protocol/go/policy/attributes" "github.com/opentdf/platform/protocol/go/policy/namespaces" + kasrDb "github.com/opentdf/platform/services/kasregistry/db" "google.golang.org/protobuf/encoding/protojson" "google.golang.org/protobuf/types/known/wrapperspb" ) @@ -102,7 +103,7 @@ func attributesSelect(opts attributesSelectOptions) sq.SelectBuilder { "'public_key', kas.public_key"+ ")"+ ") "+ - "FROM "+db.Tables.KeyAccessServerRegistry.Name()+" kas "+ + "FROM "+kasrDb.Tables.KeyAccessServerRegistry.Name()+" kas "+ "JOIN "+Tables.AttributeValueKeyAccessGrants.Name()+" avkag ON avkag.key_access_server_id = kas.id "+ "WHERE avkag.attribute_value_id = "+avt.Field("id")+ ")"+ @@ -120,7 +121,7 @@ func attributesSelect(opts attributesSelectOptions) sq.SelectBuilder { } if opts.withKeyAccessGrants { sb = sb.LeftJoin(Tables.AttributeKeyAccessGrants.Name() + " ON " + Tables.AttributeKeyAccessGrants.WithoutSchema().Name() + ".attribute_definition_id = " + t.Field("id")). - LeftJoin(db.Tables.KeyAccessServerRegistry.Name() + " ON " + db.Tables.KeyAccessServerRegistry.Name() + ".id = " + Tables.AttributeKeyAccessGrants.WithoutSchema().Name() + ".key_access_server_id") + LeftJoin(kasrDb.Tables.KeyAccessServerRegistry.Name() + " ON " + kasrDb.Tables.KeyAccessServerRegistry.Field("id") + " = " + Tables.AttributeKeyAccessGrants.WithoutSchema().Name() + ".key_access_server_id") } if opts.withFqn { sb = sb.LeftJoin(fqnt.Name() + " ON " + fqnt.Field("attribute_id") + " = " + t.Field("id") + From 3f726f3945b595affb7f9649bf53ea8affa98fa9 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Thu, 7 Mar 2024 11:25:13 -0500 Subject: [PATCH 23/39] one more test --- integration/subject_mappings_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index 26422e7b8b..d9527670f3 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -694,6 +694,17 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() assert.Equal(s.T(), metadata.Labels["key_example"], got.Metadata.Labels["key_example"]) } +func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NonExistentId_Fails() { + update := &subjectmapping.UpdateSubjectConditionSetRequest{ + Id: nonExistentSubjectSetId, + } + + id, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) + assert.NotNil(s.T(), err) + assert.Zero(s.T(), id) + assert.ErrorIs(s.T(), err, db.ErrNotFound) +} + func TestSubjectMappingSuite(t *testing.T) { if testing.Short() { t.Skip("skipping subject_mappings integration tests") From 46feb8844e4d7c7647f598af5b7f9f5076336c4b Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Fri, 8 Mar 2024 14:39:22 -0500 Subject: [PATCH 24/39] add working group blue scenario --- internal/fixtures/fixtures.yaml | 45 +++++++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/internal/fixtures/fixtures.yaml b/internal/fixtures/fixtures.yaml index 62467dac27..4d2fb37c04 100644 --- a/internal/fixtures/fixtures.yaml +++ b/internal/fixtures/fixtures.yaml @@ -21,12 +21,15 @@ attribute_namespaces: id: 0d94e00a-7bd3-4482-afe3-f1e4b03c1353 name: example.org active: true + scenario.com: + id: 87ba60e1-da12-4889-95fd-267968bf0896 + name: scenario.com + active: true # deactivated state deactivated_ns: id: 40790395-88b1-4adc-8bf5-1900491a79ba name: deactivated.io active: false - ## # Attributes # @@ -93,6 +96,13 @@ attributes: rule: HIERARCHY active: true + scenario.com/attr/working_group: + id: 6181b7f3-c7ed-4050-b654-315016a65563 + namespace_id: 87ba60e1-da12-4889-95fd-267968bf0896 + name: working_group + rule: ALL_OF + active: true + # deactivated state deactivated.io/attr/attr1: id: 3e3e3e3e-3e3e-3e3e-3e3e-3e3e3e3e3e3e @@ -158,6 +168,12 @@ attribute_values: value: value2 active: true + scenario.com/attr/working_group/value/blue: + id: c2140825-0969-44c9-8dd6-5d7e0a856b9c + attribute_definition_id: 6181b7f3-c7ed-4050-b654-315016a65563 + value: blue + active: true + # deactivated state deactivated.io/attr/attr1/value/deactivated_value: id: 06fa035b-8205-4000-86ad-2439cc1325ec @@ -209,6 +225,14 @@ subject_mappings: - standard: STANDARD_ACTION_TRANSMIT - custom: custom_action_1 + subject_mapping_scenario_blue: + id: 1748761a-bd8c-4b23-8560-16ba7a181f19 + attribute_value_id: c2140825-0969-44c9-8dd6-5d7e0a856b9c + # subject_condition_working_group_blue_scenario + subject_condition_set_id: 10d03422-7eae-43b9-ac3b-d10400171858 + actions: + - standard: STANDARD_ACTION_DECRYPT + subject_condition_set: metadata: table_name: subject_condition_set @@ -278,7 +302,7 @@ subject_condition_set: - manager - director - vice_president - subject_condition_omitted_optional_name: + subject_condition_simple: id: 3c623ede-df88-4906-8a78-ebdfacadcd57 condition: subject_sets: @@ -289,6 +313,23 @@ subject_condition_set: operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN subject_external_values: - some_value + subject_condition_working_group_blue_scenario: + id: 10d03422-7eae-43b9-ac3b-d10400171858 + condition: + subject_sets: + - condition_groups: + - boolean_operator: CONDITION_BOOLEAN_TYPE_ENUM_AND + conditions: + - subject_external_field: team_name + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN + subject_external_values: + - CoolTool + - RadService + - ShinyThing + - subject_external_field: org_name + operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN + subject_external_values: + - marketing ## # Resource Mappings From 8df7c6afd0697ad5d15153dfe5ca411d429298fb Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Fri, 8 Mar 2024 14:47:24 -0500 Subject: [PATCH 25/39] update fixtures.yaml to be policy_fixtures.yaml --- cmd/provisionFixtures.go | 2 +- integration/main_test.go | 2 +- internal/fixtures/fixtures.go | 14 +++++++------- .../{fixtures.yaml => policy_fixtures.yaml} | 0 4 files changed, 9 insertions(+), 9 deletions(-) rename internal/fixtures/{fixtures.yaml => policy_fixtures.yaml} (100%) diff --git a/cmd/provisionFixtures.go b/cmd/provisionFixtures.go index b152e28a25..fd8c956212 100644 --- a/cmd/provisionFixtures.go +++ b/cmd/provisionFixtures.go @@ -48,7 +48,7 @@ You can clear/recycle your database with 'docker-compose down' and 'docker-compo dbI := fixtures.NewDBInterface(*cfg) f := fixtures.NewFixture(dbI) - fixtures.LoadFixtureData("./internal/fixtures/fixtures.yaml") + fixtures.LoadFixtureData("./internal/fixtures/policy_fixtures.yaml") f.Provision() fmt.Print("fixtures provision fully applied") diff --git a/integration/main_test.go b/integration/main_test.go index 607bc380ff..74e0af009b 100644 --- a/integration/main_test.go +++ b/integration/main_test.go @@ -122,7 +122,7 @@ func TestMain(m *testing.M) { slog.Info("🚚 applied migrations", slog.Int("count", applied)) slog.Info("🏠 loading fixtures") - fixtures.LoadFixtureData("../internal/fixtures/fixtures.yaml") + fixtures.LoadFixtureData("../internal/fixtures/policy_fixtures.yaml") slog.Info("📚 indexing FQNs for test fixtures") db.PolicyClient.AttrFqnReindex() diff --git a/internal/fixtures/fixtures.go b/internal/fixtures/fixtures.go index c95de56fc1..4c57afcd8f 100644 --- a/internal/fixtures/fixtures.go +++ b/internal/fixtures/fixtures.go @@ -11,7 +11,7 @@ import ( ) var ( - fixtureFilename = "fixtures.yaml" + fixtureFilename = "policy_fixtures.yaml" fixtureData FixtureData ) @@ -304,7 +304,7 @@ func (f *Fixtures) provisionSubjectConditionSet() int64 { var conditionJSON []byte conditionJSON, err := json.Marshal(d.Condition.SubjectSets) if err != nil { - slog.Error("⛔️ 📦 issue with subject condition set JSON - check fixtures.yaml for issues") + slog.Error("⛔️ 📦 issue with subject condition set JSON - check policy_fixtures.yaml for issues") panic("issue with subject condition set JSON") } @@ -322,7 +322,7 @@ func (f *Fixtures) provisionSubjectMappings() int64 { var actionsJSON []byte actionsJSON, err := json.Marshal(d.Actions) if err != nil { - slog.Error("⛔️ 📦 issue with subject mapping actions JSON - check fixtures.yaml for issues") + slog.Error("⛔️ 📦 issue with subject mapping actions JSON - check policy_fixtures.yaml for issues") panic("issue with subject mapping actions JSON") } @@ -357,7 +357,7 @@ func (f *Fixtures) provisionKasRegistry() int64 { } if pubKeyJSON, err := json.Marshal(d.PubKey); err != nil { - slog.Error("⛔️ 📦 issue with KAS registry public key JSON - check fixtures.yaml for issues") + slog.Error("⛔️ 📦 issue with KAS registry public key JSON - check policy_fixtures.yaml for issues") panic("issue with KAS registry public key JSON") } else { v = append(v, f.db.StringWrap(string(pubKeyJSON))) @@ -392,15 +392,15 @@ func (f *Fixtures) provisionAttributeValueKeyAccessServer() int64 { func (f *Fixtures) provision(t string, c []string, v [][]string) int64 { rows, err := f.db.ExecInsert(t, c, v...) if err != nil { - slog.Error("⛔️ 📦 issue with insert into table - check fixtures.yaml for issues", slog.String("table", t), slog.Any("err", err)) + slog.Error("⛔️ 📦 issue with insert into table - check policy_fixtures.yaml for issues", slog.String("table", t), slog.Any("err", err)) panic("issue with insert into table") } if rows == 0 { - slog.Error("⛔️ 📦 no rows provisioned - check fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v))) + slog.Error("⛔️ 📦 no rows provisioned - check policy_fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v))) panic("no rows provisioned") } if rows != int64(len(v)) { - slog.Error("⛔️ 📦 incorrect number of rows provisioned - check fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v)), slog.Int64("actual", rows)) + slog.Error("⛔️ 📦 incorrect number of rows provisioned - check policy_fixtures.yaml for issues", slog.String("table", t), slog.Int("expected", len(v)), slog.Int64("actual", rows)) panic("incorrect number of rows provisioned") } return rows diff --git a/internal/fixtures/fixtures.yaml b/internal/fixtures/policy_fixtures.yaml similarity index 100% rename from internal/fixtures/fixtures.yaml rename to internal/fixtures/policy_fixtures.yaml From 618e744ce5084ed14adef889d12582b1badc3ae3 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Fri, 8 Mar 2024 16:44:24 -0500 Subject: [PATCH 26/39] checkpoint getentitlements tests working --- docs/grpc/index.html | 73 +- .../subject_mapping.swagger.json | 37 +- integration/subject_mappings_test.go | 245 ++++- internal/fixtures/policy_fixtures.yaml | 29 +- ...40304000000_add_subject_condition_sets.sql | 20 +- .../subjectmapping/subject_mapping.pb.go | 877 +++++++++--------- .../subjectmapping/subject_mapping.pb.gw.go | 4 +- .../MatchSubjectMappingsRequest.java | 431 ++++++--- .../MatchSubjectMappingsRequestOrBuilder.java | 25 +- .../subjectmapping/SubjectMappingProto.java | 325 ++++--- .../subjectmapping/SubjectOrBuilder.java | 25 - .../{Subject.java => SubjectProperty.java} | 463 +++++---- .../SubjectPropertyOrBuilder.java | 34 + services/policy/db/subject_mappings.go | 122 ++- .../policy/subjectmapping/subject_mapping.go | 4 +- .../subjectmapping/subject_mapping.proto | 24 +- 16 files changed, 1704 insertions(+), 1034 deletions(-) delete mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectOrBuilder.java rename sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/{Subject.java => SubjectProperty.java} (52%) create mode 100644 sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectPropertyOrBuilder.java diff --git a/docs/grpc/index.html b/docs/grpc/index.html index 7086b1dd09..fd1a52257d 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -767,10 +767,6 @@

    Table of Contents

    MMatchSubjectMappingsResponse -
  • - MSubject -
  • -
  • MSubjectConditionSet
  • @@ -783,6 +779,10 @@

    Table of Contents

    MSubjectMapping +
  • + MSubjectProperty +
  • +
  • MSubjectSet
  • @@ -5668,7 +5668,7 @@

    ListSubjectMappingsRe

    MatchSubjectMappingsRequest

    -

    +

    MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned

    if there is any single condition found among the structures that matches for one of the provided properties:

    1. The external field, external value, and an IN operator

    2. The external field, _no_ external value, and a NOT_IN operator

    Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping

    in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no

    logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum

    initial filter.

    NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.

    namestring

    an optional name for ease of reference

    subject_sets SubjectSet

    update_namestring

    an optional name for ease of reference

    update_metadata common.MetadataMutableupdate_subject_sets SubjectSet repeated

    if provided, replaces entire existing graph relation of Subject Sets, Condition Groups, & Conditions

    if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions

    subject_condition_setSubjectConditionSetidstring

    subject_mappingSubjectMappingidstring

    subject_condition_setSubjectConditionSetidstring

    subject_mappingSubjectMappingidstring

    subject_condition_setSubjectConditionSetidstring

    subject_mappingSubjectMappingidstring

    @@ -5678,9 +5678,9 @@

    MatchSubjectMappingsR

    - - - + + + @@ -5715,30 +5715,6 @@

    MatchSubjectMappings -

    Subject

    -

    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.

    - - -
    subjectSubjectsubject_propertiesSubjectPropertyrepeated

    - - - - - - - - - - - - - -
    FieldTypeLabelDescription
    attributesgoogle.protobuf.Struct

    - - - - -

    SubjectConditionSet

    A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet

    are evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple

    Subject Mappings / Attribute Values and is an independent unit.

    @@ -5867,6 +5843,37 @@

    SubjectMapping

    +

    SubjectProperty

    +

    A property of a Subject/Entity as a field->value pair. This would mirror external user attributes retrieved

    from an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc.

    For now, a valid property must contain both field & value.

    + + + + + + + + + + + + + + + + + + + + + + + +
    FieldTypeLabelDescription
    external_fieldstring

    external_valuestring

    + + + + +

    SubjectSet

    A collection of Condition Groups

    @@ -6195,7 +6202,7 @@

    Methods with HTTP bindings

    MatchSubjectMappings POST /subject-mappings/match - subject + subject_properties diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index ddf344cedf..fe24bc1cad 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -247,11 +247,15 @@ }, "parameters": [ { - "name": "subject", + "name": "subjectProperties", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/subjectmappingSubject" + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/subjectmappingSubjectProperty" + } } } ], @@ -521,14 +525,6 @@ "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n // or ...\n if (any.isSameTypeAs(Foo.getDefaultInstance())) {\n foo = any.unpack(Foo.getDefaultInstance());\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, - "protobufNullValue": { - "type": "string", - "enum": [ - "NULL_VALUE" - ], - "default": "NULL_VALUE", - "description": "`NullValue` is a singleton enumeration to represent the null value for the\n`Value` type union.\n\nThe JSON representation for `NullValue` is JSON `null`.\n\n - NULL_VALUE: Null value." - }, "rpcStatus": { "type": "object", "properties": { @@ -725,15 +721,6 @@ } } }, - "subjectmappingSubject": { - "type": "object", - "properties": { - "attributes": { - "type": "object" - } - }, - "description": "A Representation of a subject as attribute-\u003evalue pairs. This would mirror user attributes retrieved\nfrom an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc." - }, "subjectmappingSubjectConditionSet": { "type": "object", "properties": { @@ -813,6 +800,18 @@ "default": "SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFIED", "title": "buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package" }, + "subjectmappingSubjectProperty": { + "type": "object", + "properties": { + "externalField": { + "type": "string" + }, + "externalValue": { + "type": "string" + } + }, + "description": "A property of a Subject/Entity as a field-\u003evalue pair. This would mirror external user attributes retrieved\nfrom an authoritative source such as an IDP (Identity Provider) or User Store. Examples include such ADFS/LDAP, OKTA, etc.\nFor now, a valid property must contain both field \u0026 value." + }, "subjectmappingSubjectSet": { "type": "object", "properties": { diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index d9527670f3..29d5c5e6e3 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -547,7 +547,7 @@ func (s *SubjectMappingsSuite) TestListSubjectConditionSet() { found2 := false fixture3 := s.f.GetSubjectConditionSetKey("subject_condition_set3") found3 := false - fixture4 := s.f.GetSubjectConditionSetKey("subject_condition_omitted_optional_name") + fixture4 := s.f.GetSubjectConditionSetKey("subject_condition_simple_in") found4 := false assert.GreaterOrEqual(s.T(), len(list), 3) @@ -574,15 +574,15 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet() { SubjectSets: []*subjectmapping.SubjectSet{}, } - createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotZero(s.T(), created) - deletedId, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, createdId) + deletedId, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, created.Id) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, deletedId) + assert.Equal(s.T(), created.Id, deletedId) - got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, created.Id) assert.NotNil(s.T(), err) assert.Nil(s.T(), got) assert.ErrorIs(s.T(), err, db.ErrNotFound) @@ -603,9 +603,9 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { }, } - createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotZero(s.T(), created) // update the subject condition set ss := []*subjectmapping.SubjectSet{ @@ -627,17 +627,17 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { update := &subjectmapping.UpdateSubjectConditionSetRequest{ UpdateSubjectSets: ss, - Id: createdId, + Id: created.Id, } id, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, id) + assert.Equal(s.T(), created.Id, id) // verify the subject condition set was updated - got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, created.Id) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, got.Id) + assert.Equal(s.T(), created.Id, got.Id) assert.Equal(s.T(), len(ss), len(got.SubjectSets)) assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, got.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) } @@ -650,9 +650,9 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() }, } - createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotZero(s.T(), created.Id) // update the subject condition set ss := []*subjectmapping.SubjectSet{ @@ -677,18 +677,18 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() update := &subjectmapping.UpdateSubjectConditionSetRequest{ UpdateSubjectSets: ss, UpdateMetadata: metadata, - Id: createdId, + Id: created.Id, } id, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, id) + assert.Equal(s.T(), created.Id, id) // verify the subject condition set was updated - got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, created.Id) assert.Nil(s.T(), err) assert.NotNil(s.T(), got) - assert.Equal(s.T(), createdId, got.Id) + assert.Equal(s.T(), created.Id, got.Id) assert.Equal(s.T(), len(ss), len(got.SubjectSets)) assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, got.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) assert.Equal(s.T(), metadata.Labels["key_example"], got.Metadata.Labels["key_example"]) @@ -705,6 +705,215 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NonExistentId_Fails assert.ErrorIs(s.T(), err, db.ErrNotFound) } +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InOne() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + externalValues := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: externalValues[0], + }, + } + + sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), sm) + assert.Equal(s.T(), fixtureScs.Id, sm[0].SubjectConditionSet.Id) +} + +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_DoesNotReturnNotInWhenMatches() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + externalValues := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: externalValues[0], + }, + } + + smList, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), smList) + assert.Equal(s.T(), 0, len(smList)) +} + +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NotInOneMatch() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + + expectedMappedFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_not_in") + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: "random_value", + }, + } + + smList, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), smList) + assert.Equal(s.T(), 1, len(smList)) + assert.Equal(s.T(), fixtureScs.Id, smList[0].SubjectConditionSet.Id) + assert.Equal(s.T(), expectedMappedFixture.Id, smList[0].Id) +} + +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_MissingFieldInProperty_Fails() { + props := []*subjectmapping.SubjectProperty{ + { + ExternalValue: "some_value", + }, + } + + sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) + assert.Zero(s.T(), sm) +} + +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_MissingValueInProperty_Fails() { + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: "some_field", + }, + } + + sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) + assert.Zero(s.T(), sm) +} + +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NoPropertiesProvided_Fails() { + props := []*subjectmapping.SubjectProperty{} + + sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) + assert.Zero(s.T(), sm) +} + +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InMultiple() { + simpleScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_in") + simpleExternalField := simpleScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + simpleExternalValues := simpleScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + + otherScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") + otherExternalField := otherScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + otherExternalValues := otherScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: simpleExternalField, + ExternalValue: simpleExternalValues[0], + }, + { + ExternalField: otherExternalField, + ExternalValue: otherExternalValues[0], + }, + } + + gotEntitlements, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), gotEntitlements) + assert.GreaterOrEqual(s.T(), len(gotEntitlements), 2) + + mappedSimple := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_in") + foundMappedSimple := false + mappedSubjectConditionSet1 := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute1") + foundMappedSubjectConditionSet1 := false + + for _, sm := range gotEntitlements { + if sm.SubjectConditionSet.Id == mappedSimple.SubjectConditionSetId { + foundMappedSimple = true + } else if sm.SubjectConditionSet.Id == mappedSubjectConditionSet1.SubjectConditionSetId { + foundMappedSubjectConditionSet1 = true + } + } + assert.True(s.T(), foundMappedSimple) + assert.True(s.T(), foundMappedSubjectConditionSet1) +} + +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NotInMultiple() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + expectedMappedFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_not_in") + + otherFixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set3") + otherExternalField1 := otherFixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[1].SubjectExternalField + otherExpectedMatchedFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_attribute3") + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: "random_value_definitely_not_in_fixtures", + }, + { + ExternalField: otherExternalField1, + ExternalValue: "random_value_definitely_not_in_fixtures", + }, + } + + smList, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), smList) + assert.Equal(s.T(), 2, len(smList)) + for _, sm := range smList { + if sm.SubjectConditionSet.Id == fixtureScs.Id { + assert.Equal(s.T(), expectedMappedFixture.Id, sm.Id) + } else if sm.SubjectConditionSet.Id == otherFixtureScs.Id { + assert.Equal(s.T(), otherExpectedMatchedFixture.Id, sm.Id) + } + } +} + +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InOneAndNotInASecond() { + fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_in") + externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + externalValues := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues + expectedMappedFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_in") + + otherFixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") + otherExternalField := otherFixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField + expectedMappedOtherFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_not_in") + + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: externalField, + ExternalValue: externalValues[0], + }, + { + ExternalField: otherExternalField, + ExternalValue: "random_value_987654321", + }, + } + + smList, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), smList) + for _, sm := range smList { + if sm.SubjectConditionSet.Id == fixtureScs.Id { + assert.Equal(s.T(), expectedMappedFixture.Id, sm.Id) + } else if sm.SubjectConditionSet.Id == otherFixtureScs.Id { + assert.Equal(s.T(), expectedMappedOtherFixture.Id, sm.Id) + } + } +} + +func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NonExistentField_ReturnsNoMappings() { + props := []*subjectmapping.SubjectProperty{ + { + ExternalField: "non_existent_field", + ExternalValue: "non_existent_value", + }, + } + sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + assert.Nil(s.T(), err) + assert.NotZero(s.T(), sm) + assert.Equal(s.T(), 0, len(sm)) +} + func TestSubjectMappingSuite(t *testing.T) { if testing.Short() { t.Skip("skipping subject_mappings integration tests") diff --git a/internal/fixtures/policy_fixtures.yaml b/internal/fixtures/policy_fixtures.yaml index 4d2fb37c04..f6c881ed5a 100644 --- a/internal/fixtures/policy_fixtures.yaml +++ b/internal/fixtures/policy_fixtures.yaml @@ -225,6 +225,22 @@ subject_mappings: - standard: STANDARD_ACTION_TRANSMIT - custom: custom_action_1 + subject_mapping_subject_simple_in: + id: 3c623ede-df88-4906-8a78-ebdfacadcd57 + attribute_value_id: 74babca6-016f-4f3e-a99b-4e46ea8d0fd8 + # subject_condition_simple_in + subject_condition_set_id: 3c623ede-df88-4906-8a78-ebdfacadcd57 + actions: + - standard: STANDARD_ACTION_DECRYPT + + subject_mapping_subject_simple_not_in: + id: 1b9508a7-746a-4705-a1f1-4b6e676377ce + attribute_value_id: 532e5957-28f7-466d-91e2-493e9431cd83 + # subject_condition_simple_not_in + subject_condition_set_id: cf17ec4c-d206-4b74-b3db-5ce07d6995cc + actions: + - standard: STANDARD_ACTION_DECRYPT + subject_mapping_scenario_blue: id: 1748761a-bd8c-4b23-8560-16ba7a181f19 attribute_value_id: c2140825-0969-44c9-8dd6-5d7e0a856b9c @@ -302,7 +318,7 @@ subject_condition_set: - manager - director - vice_president - subject_condition_simple: + subject_condition_simple_in: id: 3c623ede-df88-4906-8a78-ebdfacadcd57 condition: subject_sets: @@ -313,6 +329,17 @@ subject_condition_set: operator: SUBJECT_MAPPING_OPERATOR_ENUM_IN subject_external_values: - some_value + subject_condition_simple_not_in: + id: cf17ec4c-d206-4b74-b3db-5ce07d6995cc + condition: + subject_sets: + - condition_groups: + - boolean_operator: CONDITION_BOOLEAN_TYPE_ENUM_OR + conditions: + - subject_external_field: some_other_field123 + operator: SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN + subject_external_values: + - some_other_value_123 subject_condition_working_group_blue_scenario: id: 10d03422-7eae-43b9-ac3b-d10400171858 condition: diff --git a/migrations/20240304000000_add_subject_condition_sets.sql b/migrations/20240304000000_add_subject_condition_sets.sql index e5f8590a98..34689e3ae5 100644 --- a/migrations/20240304000000_add_subject_condition_sets.sql +++ b/migrations/20240304000000_add_subject_condition_sets.sql @@ -11,19 +11,19 @@ ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_id UUID, WITH subject_mappings_migration_data AS ( SELECT - JSON_BUILD_OBJECT( - 'created_at', metadata::json->'created_at', - 'updated_at', metadata::json->'updated_at' + JSONB_BUILD_OBJECT( + 'created_at', metadata::jsonb->'created_at', + 'updated_at', metadata::jsonb->'updated_at' ) AS metadata, - JSON_BUILD_OBJECT( + JSONB_BUILD_OBJECT( 'subject_sets', - JSON_BUILD_ARRAY( - JSON_BUILD_OBJECT( - 'condition_groups', JSON_BUILD_ARRAY( - JSON_BUILD_OBJECT( + JSONB_BUILD_ARRAY( + JSONB_BUILD_OBJECT( + 'condition_groups', JSONB_BUILD_ARRAY( + JSONB_BUILD_OBJECT( 'boolean_operator', 'AND', - 'conditions', JSON_BUILD_ARRAY( - JSON_BUILD_OBJECT( + 'conditions', JSONB_BUILD_ARRAY( + JSONB_BUILD_OBJECT( 'operator', operator, 'subject_external_field', subject_attribute, 'subject_external_values', subject_attribute_values diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 9ec2944018..6dd652ad04 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -14,7 +14,6 @@ import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - structpb "google.golang.org/protobuf/types/known/structpb" reflect "reflect" sync "sync" ) @@ -482,18 +481,20 @@ func (x *SubjectMapping) GetActions() []*authorization.Action { return nil } -// A Representation of a subject as attribute->value pairs. This would mirror user attributes retrieved +// A property of a Subject/Entity as a field->value pair. This would mirror external 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 { +// For now, a valid property must contain both field & value. +type SubjectProperty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Attributes *structpb.Struct `protobuf:"bytes,1,opt,name=attributes,proto3" json:"attributes,omitempty"` + ExternalField string `protobuf:"bytes,1,opt,name=external_field,json=externalField,proto3" json:"external_field,omitempty"` + ExternalValue string `protobuf:"bytes,2,opt,name=external_value,json=externalValue,proto3" json:"external_value,omitempty"` } -func (x *Subject) Reset() { - *x = Subject{} +func (x *SubjectProperty) Reset() { + *x = SubjectProperty{} if protoimpl.UnsafeEnabled { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -501,13 +502,13 @@ func (x *Subject) Reset() { } } -func (x *Subject) String() string { +func (x *SubjectProperty) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Subject) ProtoMessage() {} +func (*SubjectProperty) ProtoMessage() {} -func (x *Subject) ProtoReflect() protoreflect.Message { +func (x *SubjectProperty) ProtoReflect() protoreflect.Message { mi := &file_policy_subjectmapping_subject_mapping_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -519,24 +520,42 @@ func (x *Subject) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use Subject.ProtoReflect.Descriptor instead. -func (*Subject) Descriptor() ([]byte, []int) { +// Deprecated: Use SubjectProperty.ProtoReflect.Descriptor instead. +func (*SubjectProperty) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{5} } -func (x *Subject) GetAttributes() *structpb.Struct { +func (x *SubjectProperty) GetExternalField() string { if x != nil { - return x.Attributes + return x.ExternalField } - return nil + return "" +} + +func (x *SubjectProperty) GetExternalValue() string { + if x != nil { + return x.ExternalValue + } + return "" } +// MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned +// if there is any single condition found among the structures that matches for one of the provided properties: +// 1. The external field, external value, and an IN operator +// 2. The external field, _no_ external value, and a NOT_IN operator +// +// Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping +// in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no +// logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum +// initial filter. +// +// NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned. type MatchSubjectMappingsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Subject *Subject `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` + SubjectProperties []*SubjectProperty `protobuf:"bytes,1,rep,name=subject_properties,json=subjectProperties,proto3" json:"subject_properties,omitempty"` } func (x *MatchSubjectMappingsRequest) Reset() { @@ -571,9 +590,9 @@ func (*MatchSubjectMappingsRequest) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{6} } -func (x *MatchSubjectMappingsRequest) GetSubject() *Subject { +func (x *MatchSubjectMappingsRequest) GetSubjectProperties() []*SubjectProperty { if x != nil { - return x.Subject + return x.SubjectProperties } return nil } @@ -1705,389 +1724,393 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 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, 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, 0xc5, 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, 0x67, 0x0a, 0x10, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x6f, 0x70, 0x65, 0x72, - 0x61, 0x74, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x70, 0x6f, 0x6c, + 0x73, 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, 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, 0xc5, 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, 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, 0x0f, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, - 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0xb7, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 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, 0x4e, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, - 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa2, 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, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 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, 0x67, 0x0a, 0x10, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x5f, 0x6f, 0x70, + 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0x0f, 0x62, 0x6f, 0x6f, 0x6c, + 0x65, 0x61, 0x6e, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 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, 0xb7, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 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, + 0x4e, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, + 0xa2, 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, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 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, 0x6f, 0x0a, 0x0f, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x2d, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, + 0x6e, 0x61, 0x6c, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x2d, 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x74, 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, 0x55, 0x0a, 0x12, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x26, 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, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, + 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x52, 0x11, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, 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, 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, 0xfa, 0x02, + 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, 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, 0x34, 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, 0x42, 0x06, + 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x10, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, + 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x21, 0x65, 0x78, 0x69, 0x73, + 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x1d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x49, 0x64, 0x12, 0x6b, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, + 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6e, 0x65, 0x77, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, + 0x39, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, + 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 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, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xfb, 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, 0x1f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1b, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0e, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 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, 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, 0xfa, 0x02, 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, 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, 0x34, 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, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x10, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x21, - 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x6b, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6e, 0x65, 0x77, + 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 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, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, + 0x2e, 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, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x12, 0x39, 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, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, - 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, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xfb, - 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, 0x1f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x1b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3c, - 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x0d, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 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, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, 0x2e, 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, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x61, + 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 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, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, + 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, + 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 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, + 0x4e, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, + 0x02, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, + 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, + 0x88, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe7, 0x01, 0x0a, - 0x1e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x33, 0x0a, 0x21, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, - 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, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, - 0x65, 0x0a, 0x1b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 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, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, 0x61, 0x73, 0x73, - 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x20, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, - 0x0a, 0x16, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, - 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, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, - 0x22, 0xa0, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 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, 0x4e, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, - 0x65, 0x74, 0x73, 0x18, 0x02, 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, 0x42, 0x08, 0xba, 0x48, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, - 0x65, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x33, - 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x33, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 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, 0x33, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, + 0xcf, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x40, 0x0a, 0x0f, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x02, 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, 0x0e, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x51, + 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x11, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, + 0x73, 0x22, 0x33, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, 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, 0xe0, 0x0e, 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, + 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, 0x33, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, 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, 0xeb, 0x0e, 0x0a, 0x15, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0xb4, 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, 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, + 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, 0x3a, 0x12, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x69, 0x65, 0x73, + 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, + 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x1c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, + 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x21, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 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, + 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, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, + 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, + 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 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, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x32, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, - 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, - 0x01, 0x2a, 0x32, 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, 0x12, 0xac, 0x01, 0x0a, - 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, - 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, - 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, - 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x70, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, - 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, + 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, + 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 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, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, + 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 ( @@ -2112,7 +2135,7 @@ var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (*SubjectSet)(nil), // 4: policy.subjectmapping.SubjectSet (*SubjectConditionSet)(nil), // 5: policy.subjectmapping.SubjectConditionSet (*SubjectMapping)(nil), // 6: policy.subjectmapping.SubjectMapping - (*Subject)(nil), // 7: policy.subjectmapping.Subject + (*SubjectProperty)(nil), // 7: policy.subjectmapping.SubjectProperty (*MatchSubjectMappingsRequest)(nil), // 8: policy.subjectmapping.MatchSubjectMappingsRequest (*MatchSubjectMappingsResponse)(nil), // 9: policy.subjectmapping.MatchSubjectMappingsResponse (*GetSubjectMappingRequest)(nil), // 10: policy.subjectmapping.GetSubjectMappingRequest @@ -2139,8 +2162,7 @@ var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (*common.Metadata)(nil), // 31: common.Metadata (*attributes.Value)(nil), // 32: policy.attributes.Value (*authorization.Action)(nil), // 33: authorization.Action - (*structpb.Struct)(nil), // 34: google.protobuf.Struct - (*common.MetadataMutable)(nil), // 35: common.MetadataMutable + (*common.MetadataMutable)(nil), // 34: common.MetadataMutable } var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 0, // 0: policy.subjectmapping.Condition.operator:type_name -> policy.subjectmapping.SubjectMappingOperatorEnum @@ -2153,51 +2175,50 @@ var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 32, // 7: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value 5, // 8: policy.subjectmapping.SubjectMapping.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet 33, // 9: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action - 34, // 10: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct - 7, // 11: policy.subjectmapping.MatchSubjectMappingsRequest.subject:type_name -> policy.subjectmapping.Subject - 6, // 12: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 6, // 13: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 6, // 14: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 35, // 15: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable - 24, // 16: policy.subjectmapping.CreateSubjectMappingRequest.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 33, // 17: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action - 35, // 18: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable - 33, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action - 5, // 20: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 6, // 21: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 5, // 22: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet - 35, // 23: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable - 4, // 24: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 24, // 25: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 35, // 26: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable - 4, // 27: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet - 8, // 28: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest - 12, // 29: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest - 10, // 30: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest - 14, // 31: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest - 16, // 32: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest - 18, // 33: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest - 22, // 34: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest - 20, // 35: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest - 25, // 36: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest - 27, // 37: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest - 29, // 38: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest - 9, // 39: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse - 13, // 40: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse - 11, // 41: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse - 15, // 42: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse - 17, // 43: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse - 19, // 44: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse - 23, // 45: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse - 21, // 46: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse - 26, // 47: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse - 28, // 48: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse - 30, // 49: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse - 39, // [39:50] is the sub-list for method output_type - 28, // [28:39] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 7, // 10: policy.subjectmapping.MatchSubjectMappingsRequest.subject_properties:type_name -> policy.subjectmapping.SubjectProperty + 6, // 11: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 6, // 12: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 6, // 13: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 34, // 14: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable + 24, // 15: policy.subjectmapping.CreateSubjectMappingRequest.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 33, // 16: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action + 34, // 17: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable + 33, // 18: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action + 5, // 19: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 6, // 20: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 5, // 21: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 34, // 22: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable + 4, // 23: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 24, // 24: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 34, // 25: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable + 4, // 26: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet + 8, // 27: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 28: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 29: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 14, // 30: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 16, // 31: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 18, // 32: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 22, // 33: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest + 20, // 34: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest + 25, // 35: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest + 27, // 36: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest + 29, // 37: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest + 9, // 38: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 39: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 40: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 15, // 41: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 17, // 42: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 19, // 43: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 23, // 44: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse + 21, // 45: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse + 26, // 46: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse + 28, // 47: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse + 30, // 48: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse + 38, // [38:49] is the sub-list for method output_type + 27, // [27:38] is the sub-list for method input_type + 27, // [27:27] is the sub-list for extension type_name + 27, // [27:27] is the sub-list for extension extendee + 0, // [0:27] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } @@ -2267,7 +2288,7 @@ func file_policy_subjectmapping_subject_mapping_proto_init() { } } file_policy_subjectmapping_subject_mapping_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Subject); i { + switch v := v.(*SubjectProperty); i { case 0: return &v.state case 1: diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go index 686a2d8b89..e3c38dd373 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.gw.go @@ -39,7 +39,7 @@ func request_SubjectMappingService_MatchSubjectMappings_0(ctx context.Context, m if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Subject); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectProperties); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } @@ -56,7 +56,7 @@ func local_request_SubjectMappingService_MatchSubjectMappings_0(ctx context.Cont if berr != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.Subject); err != nil && err != io.EOF { + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq.SubjectProperties); err != nil && err != io.EOF { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java index 4db8fd6c74..96a6adcb3e 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java @@ -5,6 +5,20 @@ package io.opentdf.platform.policy.subjectmapping; /** + *
    + * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned
    + * if there is any single condition found among the structures that matches for one of the provided properties:
    + * 1. The external field, external value, and an IN operator
    + * 2. The external field, _no_ external value, and a NOT_IN operator
    + *
    + * Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping
    + * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no
    + * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum
    + * initial filter.
    + *
    + * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.
    + * 
    + * * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsRequest} */ public final class MatchSubjectMappingsRequest extends @@ -17,6 +31,7 @@ private MatchSubjectMappingsRequest(com.google.protobuf.GeneratedMessageV3.Build super(builder); } private MatchSubjectMappingsRequest() { + subjectProperties_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -39,31 +54,45 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.class, io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.Builder.class); } - private int bitField0_; - public static final int SUBJECT_FIELD_NUMBER = 1; - private io.opentdf.platform.policy.subjectmapping.Subject subject_; + public static final int SUBJECT_PROPERTIES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private java.util.List subjectProperties_; /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return Whether the subject field is set. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ @java.lang.Override - public boolean hasSubject() { - return ((bitField0_ & 0x00000001) != 0); + public java.util.List getSubjectPropertiesList() { + return subjectProperties_; } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return The subject. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject getSubject() { - return subject_ == null ? io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance() : subject_; + public java.util.List + getSubjectPropertiesOrBuilderList() { + return subjectProperties_; } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder getSubjectOrBuilder() { - return subject_ == null ? io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance() : subject_; + public int getSubjectPropertiesCount() { + return subjectProperties_.size(); + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectProperty getSubjectProperties(int index) { + return subjectProperties_.get(index); + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( + int index) { + return subjectProperties_.get(index); } private byte memoizedIsInitialized = -1; @@ -80,8 +109,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getSubject()); + for (int i = 0; i < subjectProperties_.size(); i++) { + output.writeMessage(1, subjectProperties_.get(i)); } getUnknownFields().writeTo(output); } @@ -92,9 +121,9 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { + for (int i = 0; i < subjectProperties_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getSubject()); + .computeMessageSize(1, subjectProperties_.get(i)); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,11 +140,8 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest other = (io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest) obj; - if (hasSubject() != other.hasSubject()) return false; - if (hasSubject()) { - if (!getSubject() - .equals(other.getSubject())) return false; - } + if (!getSubjectPropertiesList() + .equals(other.getSubjectPropertiesList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -127,9 +153,9 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasSubject()) { - hash = (37 * hash) + SUBJECT_FIELD_NUMBER; - hash = (53 * hash) + getSubject().hashCode(); + if (getSubjectPropertiesCount() > 0) { + hash = (37 * hash) + SUBJECT_PROPERTIES_FIELD_NUMBER; + hash = (53 * hash) + getSubjectPropertiesList().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -229,6 +255,20 @@ protected Builder newBuilderForType( return builder; } /** + *
    +   * MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned
    +   * if there is any single condition found among the structures that matches for one of the provided properties:
    +   * 1. The external field, external value, and an IN operator
    +   * 2. The external field, _no_ external value, and a NOT_IN operator
    +   *
    +   * Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping
    +   * in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no
    +   * logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum
    +   * initial filter.
    +   *
    +   * NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned.
    +   * 
    + * * Protobuf type {@code policy.subjectmapping.MatchSubjectMappingsRequest} */ public static final class Builder extends @@ -250,29 +290,25 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSubjectFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - subject_ = null; - if (subjectBuilder_ != null) { - subjectBuilder_.dispose(); - subjectBuilder_ = null; + if (subjectPropertiesBuilder_ == null) { + subjectProperties_ = java.util.Collections.emptyList(); + } else { + subjectProperties_ = null; + subjectPropertiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -299,21 +335,26 @@ public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest bui @java.lang.Override public io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest buildPartial() { io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result = new io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest(this); + buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result) { + if (subjectPropertiesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + subjectProperties_ = java.util.Collections.unmodifiableList(subjectProperties_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.subjectProperties_ = subjectProperties_; + } else { + result.subjectProperties_ = subjectPropertiesBuilder_.build(); + } + } + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { - result.subject_ = subjectBuilder_ == null - ? subject_ - : subjectBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -360,8 +401,31 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest other) { if (other == io.opentdf.platform.policy.subjectmapping.MatchSubjectMappingsRequest.getDefaultInstance()) return this; - if (other.hasSubject()) { - mergeSubject(other.getSubject()); + if (subjectPropertiesBuilder_ == null) { + if (!other.subjectProperties_.isEmpty()) { + if (subjectProperties_.isEmpty()) { + subjectProperties_ = other.subjectProperties_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.addAll(other.subjectProperties_); + } + onChanged(); + } + } else { + if (!other.subjectProperties_.isEmpty()) { + if (subjectPropertiesBuilder_.isEmpty()) { + subjectPropertiesBuilder_.dispose(); + subjectPropertiesBuilder_ = null; + subjectProperties_ = other.subjectProperties_; + bitField0_ = (bitField0_ & ~0x00000001); + subjectPropertiesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getSubjectPropertiesFieldBuilder() : null; + } else { + subjectPropertiesBuilder_.addAllMessages(other.subjectProperties_); + } + } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -390,10 +454,16 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getSubjectFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; + io.opentdf.platform.policy.subjectmapping.SubjectProperty m = + input.readMessage( + io.opentdf.platform.policy.subjectmapping.SubjectProperty.parser(), + extensionRegistry); + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(m); + } else { + subjectPropertiesBuilder_.addMessage(m); + } break; } // case 10 default: { @@ -413,125 +483,244 @@ public Builder mergeFrom( } private int bitField0_; - private io.opentdf.platform.policy.subjectmapping.Subject subject_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.Subject, io.opentdf.platform.policy.subjectmapping.Subject.Builder, io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder> subjectBuilder_; + private java.util.List subjectProperties_ = + java.util.Collections.emptyList(); + private void ensureSubjectPropertiesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + subjectProperties_ = new java.util.ArrayList(subjectProperties_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectProperty, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder, io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder> subjectPropertiesBuilder_; + + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public java.util.List getSubjectPropertiesList() { + if (subjectPropertiesBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectProperties_); + } else { + return subjectPropertiesBuilder_.getMessageList(); + } + } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return Whether the subject field is set. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public boolean hasSubject() { - return ((bitField0_ & 0x00000001) != 0); + public int getSubjectPropertiesCount() { + if (subjectPropertiesBuilder_ == null) { + return subjectProperties_.size(); + } else { + return subjectPropertiesBuilder_.getCount(); + } } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return The subject. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public io.opentdf.platform.policy.subjectmapping.Subject getSubject() { - if (subjectBuilder_ == null) { - return subject_ == null ? io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance() : subject_; + public io.opentdf.platform.policy.subjectmapping.SubjectProperty getSubjectProperties(int index) { + if (subjectPropertiesBuilder_ == null) { + return subjectProperties_.get(index); } else { - return subjectBuilder_.getMessage(); + return subjectPropertiesBuilder_.getMessage(index); } } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public Builder setSubject(io.opentdf.platform.policy.subjectmapping.Subject value) { - if (subjectBuilder_ == null) { + public Builder setSubjectProperties( + int index, io.opentdf.platform.policy.subjectmapping.SubjectProperty value) { + if (subjectPropertiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - subject_ = value; + ensureSubjectPropertiesIsMutable(); + subjectProperties_.set(index, value); + onChanged(); } else { - subjectBuilder_.setMessage(value); + subjectPropertiesBuilder_.setMessage(index, value); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public Builder setSubject( - io.opentdf.platform.policy.subjectmapping.Subject.Builder builderForValue) { - if (subjectBuilder_ == null) { - subject_ = builderForValue.build(); + public Builder setSubjectProperties( + int index, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder builderForValue) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.set(index, builderForValue.build()); + onChanged(); } else { - subjectBuilder_.setMessage(builderForValue.build()); + subjectPropertiesBuilder_.setMessage(index, builderForValue.build()); } - bitField0_ |= 0x00000001; - onChanged(); return this; } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public Builder mergeSubject(io.opentdf.platform.policy.subjectmapping.Subject value) { - if (subjectBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - subject_ != null && - subject_ != io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance()) { - getSubjectBuilder().mergeFrom(value); - } else { - subject_ = value; + public Builder addSubjectProperties(io.opentdf.platform.policy.subjectmapping.SubjectProperty value) { + if (subjectPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); } + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(value); + onChanged(); } else { - subjectBuilder_.mergeFrom(value); + subjectPropertiesBuilder_.addMessage(value); } - if (subject_ != null) { - bitField0_ |= 0x00000001; + return this; + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder addSubjectProperties( + int index, io.opentdf.platform.policy.subjectmapping.SubjectProperty value) { + if (subjectPropertiesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(index, value); onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(index, value); } return this; } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public Builder clearSubject() { - bitField0_ = (bitField0_ & ~0x00000001); - subject_ = null; - if (subjectBuilder_ != null) { - subjectBuilder_.dispose(); - subjectBuilder_ = null; + public Builder addSubjectProperties( + io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder builderForValue) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(builderForValue.build()); + onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(builderForValue.build()); } - onChanged(); return this; } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public io.opentdf.platform.policy.subjectmapping.Subject.Builder getSubjectBuilder() { - bitField0_ |= 0x00000001; - onChanged(); - return getSubjectFieldBuilder().getBuilder(); + public Builder addSubjectProperties( + int index, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder builderForValue) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.add(index, builderForValue.build()); + onChanged(); + } else { + subjectPropertiesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder addAllSubjectProperties( + java.lang.Iterable values) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, subjectProperties_); + onChanged(); + } else { + subjectPropertiesBuilder_.addAllMessages(values); + } + return this; } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder getSubjectOrBuilder() { - if (subjectBuilder_ != null) { - return subjectBuilder_.getMessageOrBuilder(); + public Builder clearSubjectProperties() { + if (subjectPropertiesBuilder_ == null) { + subjectProperties_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); } else { - return subject_ == null ? - io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance() : subject_; + subjectPropertiesBuilder_.clear(); } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public Builder removeSubjectProperties(int index) { + if (subjectPropertiesBuilder_ == null) { + ensureSubjectPropertiesIsMutable(); + subjectProperties_.remove(index); + onChanged(); + } else { + subjectPropertiesBuilder_.remove(index); + } + return this; + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder getSubjectPropertiesBuilder( + int index) { + return getSubjectPropertiesFieldBuilder().getBuilder(index); + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( + int index) { + if (subjectPropertiesBuilder_ == null) { + return subjectProperties_.get(index); } else { + return subjectPropertiesBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public java.util.List + getSubjectPropertiesOrBuilderList() { + if (subjectPropertiesBuilder_ != null) { + return subjectPropertiesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(subjectProperties_); + } + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder addSubjectPropertiesBuilder() { + return getSubjectPropertiesFieldBuilder().addBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectProperty.getDefaultInstance()); + } + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder addSubjectPropertiesBuilder( + int index) { + return getSubjectPropertiesFieldBuilder().addBuilder( + index, io.opentdf.platform.policy.subjectmapping.SubjectProperty.getDefaultInstance()); } /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.Subject, io.opentdf.platform.policy.subjectmapping.Subject.Builder, io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder> - getSubjectFieldBuilder() { - if (subjectBuilder_ == null) { - subjectBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.Subject, io.opentdf.platform.policy.subjectmapping.Subject.Builder, io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder>( - getSubject(), + public java.util.List + getSubjectPropertiesBuilderList() { + return getSubjectPropertiesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectProperty, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder, io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder> + getSubjectPropertiesFieldBuilder() { + if (subjectPropertiesBuilder_ == null) { + subjectPropertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectProperty, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder, io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder>( + subjectProperties_, + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - subject_ = null; + subjectProperties_ = null; } - return subjectBuilder_; + return subjectPropertiesBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java index 2c80f50ecb..2ac0dadd64 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java @@ -9,17 +9,26 @@ public interface MatchSubjectMappingsRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return Whether the subject field is set. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - boolean hasSubject(); + java.util.List + getSubjectPropertiesList(); /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; - * @return The subject. + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - io.opentdf.platform.policy.subjectmapping.Subject getSubject(); + io.opentdf.platform.policy.subjectmapping.SubjectProperty getSubjectProperties(int index); /** - * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder getSubjectOrBuilder(); + int getSubjectPropertiesCount(); + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + java.util.List + getSubjectPropertiesOrBuilderList(); + /** + * repeated .policy.subjectmapping.SubjectProperty subject_properties = 1 [json_name = "subjectProperties"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder getSubjectPropertiesOrBuilder( + int index); } 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 6c35b696c1..51d0d9c87d 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 @@ -41,10 +41,10 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_policy_subjectmapping_SubjectMapping_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor - internal_static_policy_subjectmapping_Subject_descriptor; + internal_static_policy_subjectmapping_SubjectProperty_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_policy_subjectmapping_Subject_fieldAccessorTable; + internal_static_policy_subjectmapping_SubjectProperty_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor; static final @@ -173,160 +173,161 @@ public static void registerAllExtensions( "proto\022\025policy.subjectmapping\032!authorizat" + "ion/authorization.proto\032\033buf/validate/va" + "lidate.proto\032\023common/common.proto\032\034googl" + - "e/api/annotations.proto\032\034google/protobuf" + - "/struct.proto\032\"policy/attributes/attribu" + - "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\"\305\001\n\016ConditionG" + - "roup\022J\n\nconditions\030\001 \003(\0132 .policy.subjec" + - "tmapping.ConditionB\010\272H\005\222\001\002\010\001R\nconditions" + - "\022g\n\020boolean_operator\030\002 \001(\0162/.policy.subj" + - "ectmapping.ConditionBooleanTypeEnumB\013\272H\010" + - "\202\001\002\020\001\310\001\001R\017booleanOperator\"h\n\nSubjectSet\022" + - "Z\n\020condition_groups\030\001 \003(\0132%.policy.subje" + - "ctmapping.ConditionGroupB\010\272H\005\222\001\002\010\001R\017cond" + - "itionGroups\"\267\001\n\023SubjectConditionSet\022\016\n\002i" + - "d\030\001 \001(\tR\002id\022\022\n\004name\030\002 \001(\tR\004name\022,\n\010metad" + - "ata\030\003 \001(\0132\020.common.MetadataR\010metadata\022N\n" + - "\014subject_sets\030\004 \003(\0132!.policy.subjectmapp" + - "ing.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\242\002" + - "\n\016SubjectMapping\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010meta" + - "data\030\002 \001(\0132\020.common.MetadataR\010metadata\022A" + - "\n\017attribute_value\030\003 \001(\0132\030.policy.attribu" + - "tes.ValueR\016attributeValue\022^\n\025subject_con" + - "dition_set\030\004 \001(\0132*.policy.subjectmapping" + - ".SubjectConditionSetR\023subjectConditionSe" + - "t\022/\n\007actions\030\005 \003(\0132\025.authorization.Actio" + - "nR\007actions\"B\n\007Subject\0227\n\nattributes\030\001 \001(" + - "\0132\027.google.protobuf.StructR\nattributes\"W" + - "\n\033MatchSubjectMappingsRequest\0228\n\007subject" + - "\030\001 \001(\0132\036.policy.subjectmapping.SubjectR\007" + - "subject\"p\n\034MatchSubjectMappingsResponse\022" + - "P\n\020subject_mappings\030\001 \003(\0132%.policy.subje" + - "ctmapping.SubjectMappingR\017subjectMapping" + - "s\"2\n\030GetSubjectMappingRequest\022\026\n\002id\030\001 \001(" + - "\tB\006\272H\003\310\001\001R\002id\"k\n\031GetSubjectMappingRespon" + - "se\022N\n\017subject_mapping\030\001 \001(\0132%.policy.sub" + - "jectmapping.SubjectMappingR\016subjectMappi" + - "ng\"\034\n\032ListSubjectMappingsRequest\"o\n\033List" + - "SubjectMappingsResponse\022P\n\020subject_mappi" + - "ngs\030\001 \003(\0132%.policy.subjectmapping.Subjec" + - "tMappingR\017subjectMappings\"\372\002\n\033CreateSubj" + - "ectMappingRequest\0223\n\010metadata\030\001 \001(\0132\027.co" + - "mmon.MetadataMutableR\010metadata\0224\n\022attrib" + - "ute_value_id\030\002 \001(\tB\006\272H\003\310\001\001R\020attributeVal" + - "ueId\022H\n!existing_subject_condition_set_i" + - "d\030\003 \001(\tR\035existingSubjectConditionSetId\022k" + - "\n\031new_subject_condition_set\030\004 \001(\01320.poli" + - "cy.subjectmapping.SubjectConditionSetCre" + - "ateR\026newSubjectConditionSet\0229\n\007actions\030\005" + - " \003(\0132\025.authorization.ActionB\010\272H\005\222\001\002\010\001R\007a" + - "ctions\".\n\034CreateSubjectMappingResponse\022\016" + - "\n\002id\030\001 \001(\tR\002id\"\373\001\n\033UpdateSubjectMappingR" + - "equest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022@\n\017update" + - "_metadata\030\002 \001(\0132\027.common.MetadataMutable" + - "R\016updateMetadata\022D\n\037update_subject_condi" + - "tion_set_id\030\003 \001(\tR\033updateSubjectConditio" + - "nSetId\022<\n\016update_actions\030\005 \003(\0132\025.authori" + - "zation.ActionR\rupdateActions\".\n\034UpdateSu" + - "bjectMappingResponse\022\016\n\002id\030\001 \001(\tR\002id\"5\n\033" + - "DeleteSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB" + - "\006\272H\003\310\001\001R\002id\".\n\034DeleteSubjectMappingRespo" + - "nse\022\016\n\002id\030\001 \001(\tR\002id\"7\n\035GetSubjectConditi" + - "onSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n" + - "\036GetSubjectConditionSetResponse\022^\n\025subje" + - "ct_condition_set\030\001 \001(\0132*.policy.subjectm" + - "apping.SubjectConditionSetR\023subjectCondi" + - "tionSet\022e\n\033associated_subject_mappings\030\002" + - " \003(\0132%.policy.subjectmapping.SubjectMapp" + - "ingR\031associatedSubjectMappings\"!\n\037ListSu" + - "bjectConditionSetsRequest\"\204\001\n ListSubjec" + - "tConditionSetsResponse\022`\n\026subject_condit" + - "ion_sets\030\001 \003(\0132*.policy.subjectmapping.S" + - "ubjectConditionSetR\024subjectConditionSets" + - "\"\240\001\n\031SubjectConditionSetCreate\0223\n\010metada" + - "ta\030\001 \001(\0132\027.common.MetadataMutableR\010metad" + - "ata\022N\n\014subject_sets\030\002 \003(\0132!.policy.subje" + - "ctmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectS" + - "ets\"\210\001\n CreateSubjectConditionSetRequest" + - "\022d\n\025subject_condition_set\030\001 \001(\01320.policy" + - ".subjectmapping.SubjectConditionSetCreat" + - "eR\023subjectConditionSet\"3\n!CreateSubjectC" + - "onditionSetResponse\022\016\n\002id\030\001 \001(\tR\002id\"\317\001\n " + - "UpdateSubjectConditionSetRequest\022\026\n\002id\030\001" + - " \001(\tB\006\272H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(" + - "\0132\027.common.MetadataMutableR\016updateMetada" + - "ta\022Q\n\023update_subject_sets\030\003 \003(\0132!.policy" + - ".subjectmapping.SubjectSetR\021updateSubjec" + - "tSets\"3\n!UpdateSubjectConditionSetRespon" + - "se\022\016\n\002id\030\001 \001(\tR\002id\":\n DeleteSubjectCondi" + - "tionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"3" + - "\n!DeleteSubjectConditionSetResponse\022\016\n\002i" + - "d\030\001 \001(\tR\002id*\233\001\n\032SubjectMappingOperatorEn" + - "um\022-\n)SUBJECT_MAPPING_OPERATOR_ENUM_UNSP" + - "ECIFIED\020\000\022$\n SUBJECT_MAPPING_OPERATOR_EN" + - "UM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_ENUM" + - "_NOT_IN\020\002*\220\001\n\030ConditionBooleanTypeEnum\022+" + - "\n\'CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIE" + - "D\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND\020\001" + - "\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n" + - "\025SubjectMappingService\022\251\001\n\024MatchSubjectM" + - "appings\0222.policy.subjectmapping.MatchSub" + - "jectMappingsRequest\0323.policy.subjectmapp" + - "ing.MatchSubjectMappingsResponse\"(\202\323\344\223\002\"" + - "\"\027/subject-mappings/match:\007subject\022\227\001\n\023L" + - "istSubjectMappings\0221.policy.subjectmappi" + - "ng.ListSubjectMappingsRequest\0322.policy.s" + - "ubjectmapping.ListSubjectMappingsRespons" + - "e\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSubj" + - "ectMapping\022/.policy.subjectmapping.GetSu" + - "bjectMappingRequest\0320.policy.subjectmapp" + - "ing.GetSubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/" + - "subject-mappings/{id}\022\235\001\n\024CreateSubjectM" + - "apping\0222.policy.subjectmapping.CreateSub" + - "jectMappingRequest\0323.policy.subjectmappi" + - "ng.CreateSubjectMappingResponse\"\034\202\323\344\223\002\026\"" + - "\021/subject-mappings:\001*\022\242\001\n\024UpdateSubjectM" + - "apping\0222.policy.subjectmapping.UpdateSub" + - "jectMappingRequest\0323.policy.subjectmappi" + - "ng.UpdateSubjectMappingResponse\"!\202\323\344\223\002\0332" + - "\026/subject-mappings/{id}:\001*\022\237\001\n\024DeleteSub" + - "jectMapping\0222.policy.subjectmapping.Dele" + - "teSubjectMappingRequest\0323.policy.subject" + - "mapping.DeleteSubjectMappingResponse\"\036\202\323" + - "\344\223\002\030*\026/subject-mappings/{id}\022\254\001\n\030ListSub" + - "jectConditionSets\0226.policy.subjectmappin" + - "g.ListSubjectConditionSetsRequest\0327.poli" + - "cy.subjectmapping.ListSubjectConditionSe" + - "tsResponse\"\037\202\323\344\223\002\031\022\027/subject-condition-s" + - "ets\022\253\001\n\026GetSubjectConditionSet\0224.policy." + - "subjectmapping.GetSubjectConditionSetReq" + - "uest\0325.policy.subjectmapping.GetSubjectC" + - "onditionSetResponse\"$\202\323\344\223\002\036\022\034/subject-co" + - "ndition-sets/{id}\022\262\001\n\031CreateSubjectCondi" + - "tionSet\0227.policy.subjectmapping.CreateSu" + - "bjectConditionSetRequest\0328.policy.subjec" + - "tmapping.CreateSubjectConditionSetRespon" + - "se\"\"\202\323\344\223\002\034\"\027/subject-condition-sets:\001*\022\267" + - "\001\n\031UpdateSubjectConditionSet\0227.policy.su" + - "bjectmapping.UpdateSubjectConditionSetRe" + - "quest\0328.policy.subjectmapping.UpdateSubj" + - "ectConditionSetResponse\"\'\202\323\344\223\002!2\034/subjec" + - "t-condition-sets/{id}:\001*\022\264\001\n\031DeleteSubje" + - "ctConditionSet\0227.policy.subjectmapping.D" + - "eleteSubjectConditionSetRequest\0328.policy" + - ".subjectmapping.DeleteSubjectConditionSe" + - "tResponse\"$\202\323\344\223\002\036*\034/subject-condition-se" + - "ts/{id}B\364\001\n)io.opentdf.platform.policy.s" + - "ubjectmappingB\023SubjectMappingProtoP\001Z=gi" + - "thub.com/opentdf/platform/protocol/go/po" + - "licy/subjectmapping\242\002\003PSX\252\002\025Policy.Subje" + - "ctmapping\312\002\025Policy\\Subjectmapping\342\002!Poli" + - "cy\\Subjectmapping\\GPBMetadata\352\002\026Policy::" + - "Subjectmappingb\006proto3" + "e/api/annotations.proto\032\"policy/attribut" + + "es/attributes.proto\"\325\001\n\tCondition\0224\n\026sub" + + "ject_external_field\030\001 \001(\tR\024subjectExtern" + + "alField\022Z\n\010operator\030\002 \001(\01621.policy.subje" + + "ctmapping.SubjectMappingOperatorEnumB\013\272H" + + "\010\202\001\002\020\001\310\001\001R\010operator\0226\n\027subject_external_" + + "values\030\003 \003(\tR\025subjectExternalValues\"\305\001\n\016" + + "ConditionGroup\022J\n\nconditions\030\001 \003(\0132 .pol" + + "icy.subjectmapping.ConditionB\010\272H\005\222\001\002\010\001R\n" + + "conditions\022g\n\020boolean_operator\030\002 \001(\0162/.p" + + "olicy.subjectmapping.ConditionBooleanTyp" + + "eEnumB\013\272H\010\202\001\002\020\001\310\001\001R\017booleanOperator\"h\n\nS" + + "ubjectSet\022Z\n\020condition_groups\030\001 \003(\0132%.po" + + "licy.subjectmapping.ConditionGroupB\010\272H\005\222" + + "\001\002\010\001R\017conditionGroups\"\267\001\n\023SubjectConditi" + + "onSet\022\016\n\002id\030\001 \001(\tR\002id\022\022\n\004name\030\002 \001(\tR\004nam" + + "e\022,\n\010metadata\030\003 \001(\0132\020.common.MetadataR\010m" + + "etadata\022N\n\014subject_sets\030\004 \003(\0132!.policy.s" + + "ubjectmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013subj" + + "ectSets\"\242\002\n\016SubjectMapping\022\016\n\002id\030\001 \001(\tR\002" + + "id\022,\n\010metadata\030\002 \001(\0132\020.common.MetadataR\010" + + "metadata\022A\n\017attribute_value\030\003 \001(\0132\030.poli" + + "cy.attributes.ValueR\016attributeValue\022^\n\025s" + + "ubject_condition_set\030\004 \001(\0132*.policy.subj" + + "ectmapping.SubjectConditionSetR\023subjectC" + + "onditionSet\022/\n\007actions\030\005 \003(\0132\025.authoriza" + + "tion.ActionR\007actions\"o\n\017SubjectProperty\022" + + "-\n\016external_field\030\001 \001(\tB\006\272H\003\310\001\001R\rexterna" + + "lField\022-\n\016external_value\030\002 \001(\tB\006\272H\003\310\001\001R\r" + + "externalValue\"t\n\033MatchSubjectMappingsReq" + + "uest\022U\n\022subject_properties\030\001 \003(\0132&.polic" + + "y.subjectmapping.SubjectPropertyR\021subjec" + + "tProperties\"p\n\034MatchSubjectMappingsRespo" + + "nse\022P\n\020subject_mappings\030\001 \003(\0132%.policy.s" + + "ubjectmapping.SubjectMappingR\017subjectMap" + + "pings\"2\n\030GetSubjectMappingRequest\022\026\n\002id\030" + + "\001 \001(\tB\006\272H\003\310\001\001R\002id\"k\n\031GetSubjectMappingRe" + + "sponse\022N\n\017subject_mapping\030\001 \001(\0132%.policy" + + ".subjectmapping.SubjectMappingR\016subjectM" + + "apping\"\034\n\032ListSubjectMappingsRequest\"o\n\033" + + "ListSubjectMappingsResponse\022P\n\020subject_m" + + "appings\030\001 \003(\0132%.policy.subjectmapping.Su" + + "bjectMappingR\017subjectMappings\"\372\002\n\033Create" + + "SubjectMappingRequest\0223\n\010metadata\030\001 \001(\0132" + + "\027.common.MetadataMutableR\010metadata\0224\n\022at" + + "tribute_value_id\030\002 \001(\tB\006\272H\003\310\001\001R\020attribut" + + "eValueId\022H\n!existing_subject_condition_s" + + "et_id\030\003 \001(\tR\035existingSubjectConditionSet" + + "Id\022k\n\031new_subject_condition_set\030\004 \001(\01320." + + "policy.subjectmapping.SubjectConditionSe" + + "tCreateR\026newSubjectConditionSet\0229\n\007actio" + + "ns\030\005 \003(\0132\025.authorization.ActionB\010\272H\005\222\001\002\010" + + "\001R\007actions\".\n\034CreateSubjectMappingRespon" + + "se\022\016\n\002id\030\001 \001(\tR\002id\"\373\001\n\033UpdateSubjectMapp" + + "ingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022@\n\017up" + + "date_metadata\030\002 \001(\0132\027.common.MetadataMut" + + "ableR\016updateMetadata\022D\n\037update_subject_c" + + "ondition_set_id\030\003 \001(\tR\033updateSubjectCond" + + "itionSetId\022<\n\016update_actions\030\005 \003(\0132\025.aut" + + "horization.ActionR\rupdateActions\".\n\034Upda" + + "teSubjectMappingResponse\022\016\n\002id\030\001 \001(\tR\002id" + + "\"5\n\033DeleteSubjectMappingRequest\022\026\n\002id\030\001 " + + "\001(\tB\006\272H\003\310\001\001R\002id\".\n\034DeleteSubjectMappingR" + + "esponse\022\016\n\002id\030\001 \001(\tR\002id\"7\n\035GetSubjectCon" + + "ditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id" + + "\"\347\001\n\036GetSubjectConditionSetResponse\022^\n\025s" + + "ubject_condition_set\030\001 \001(\0132*.policy.subj" + + "ectmapping.SubjectConditionSetR\023subjectC" + + "onditionSet\022e\n\033associated_subject_mappin" + + "gs\030\002 \003(\0132%.policy.subjectmapping.Subject" + + "MappingR\031associatedSubjectMappings\"!\n\037Li" + + "stSubjectConditionSetsRequest\"\204\001\n ListSu" + + "bjectConditionSetsResponse\022`\n\026subject_co" + + "ndition_sets\030\001 \003(\0132*.policy.subjectmappi" + + "ng.SubjectConditionSetR\024subjectCondition" + + "Sets\"\240\001\n\031SubjectConditionSetCreate\0223\n\010me" + + "tadata\030\001 \001(\0132\027.common.MetadataMutableR\010m" + + "etadata\022N\n\014subject_sets\030\002 \003(\0132!.policy.s" + + "ubjectmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013subj" + + "ectSets\"\210\001\n CreateSubjectConditionSetReq" + + "uest\022d\n\025subject_condition_set\030\001 \001(\01320.po" + + "licy.subjectmapping.SubjectConditionSetC" + + "reateR\023subjectConditionSet\"3\n!CreateSubj" + + "ectConditionSetResponse\022\016\n\002id\030\001 \001(\tR\002id\"" + + "\317\001\n UpdateSubjectConditionSetRequest\022\026\n\002" + + "id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022@\n\017update_metadata\030" + + "\002 \001(\0132\027.common.MetadataMutableR\016updateMe" + + "tadata\022Q\n\023update_subject_sets\030\003 \003(\0132!.po" + + "licy.subjectmapping.SubjectSetR\021updateSu" + + "bjectSets\"3\n!UpdateSubjectConditionSetRe" + + "sponse\022\016\n\002id\030\001 \001(\tR\002id\":\n DeleteSubjectC" + + "onditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002" + + "id\"3\n!DeleteSubjectConditionSetResponse\022" + + "\016\n\002id\030\001 \001(\tR\002id*\233\001\n\032SubjectMappingOperat" + + "orEnum\022-\n)SUBJECT_MAPPING_OPERATOR_ENUM_" + + "UNSPECIFIED\020\000\022$\n SUBJECT_MAPPING_OPERATO" + + "R_ENUM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_" + + "ENUM_NOT_IN\020\002*\220\001\n\030ConditionBooleanTypeEn" + + "um\022+\n\'CONDITION_BOOLEAN_TYPE_ENUM_UNSPEC" + + "IFIED\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_ENUM_A" + + "ND\020\001\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_OR\020\002" + + "2\353\016\n\025SubjectMappingService\022\264\001\n\024MatchSubj" + + "ectMappings\0222.policy.subjectmapping.Matc" + + "hSubjectMappingsRequest\0323.policy.subject" + + "mapping.MatchSubjectMappingsResponse\"3\202\323" + + "\344\223\002-\"\027/subject-mappings/match:\022subject_p" + + "roperties\022\227\001\n\023ListSubjectMappings\0221.poli" + + "cy.subjectmapping.ListSubjectMappingsReq" + + "uest\0322.policy.subjectmapping.ListSubject" + + "MappingsResponse\"\031\202\323\344\223\002\023\022\021/subject-mappi" + + "ngs\022\226\001\n\021GetSubjectMapping\022/.policy.subje" + + "ctmapping.GetSubjectMappingRequest\0320.pol" + + "icy.subjectmapping.GetSubjectMappingResp" + + "onse\"\036\202\323\344\223\002\030\022\026/subject-mappings/{id}\022\235\001\n" + + "\024CreateSubjectMapping\0222.policy.subjectma" + + "pping.CreateSubjectMappingRequest\0323.poli" + + "cy.subjectmapping.CreateSubjectMappingRe" + + "sponse\"\034\202\323\344\223\002\026\"\021/subject-mappings:\001*\022\242\001\n" + + "\024UpdateSubjectMapping\0222.policy.subjectma" + + "pping.UpdateSubjectMappingRequest\0323.poli" + + "cy.subjectmapping.UpdateSubjectMappingRe" + + "sponse\"!\202\323\344\223\002\0332\026/subject-mappings/{id}:\001" + + "*\022\237\001\n\024DeleteSubjectMapping\0222.policy.subj" + + "ectmapping.DeleteSubjectMappingRequest\0323" + + ".policy.subjectmapping.DeleteSubjectMapp" + + "ingResponse\"\036\202\323\344\223\002\030*\026/subject-mappings/{" + + "id}\022\254\001\n\030ListSubjectConditionSets\0226.polic" + + "y.subjectmapping.ListSubjectConditionSet" + + "sRequest\0327.policy.subjectmapping.ListSub" + + "jectConditionSetsResponse\"\037\202\323\344\223\002\031\022\027/subj" + + "ect-condition-sets\022\253\001\n\026GetSubjectConditi" + + "onSet\0224.policy.subjectmapping.GetSubject" + + "ConditionSetRequest\0325.policy.subjectmapp" + + "ing.GetSubjectConditionSetResponse\"$\202\323\344\223" + + "\002\036\022\034/subject-condition-sets/{id}\022\262\001\n\031Cre" + + "ateSubjectConditionSet\0227.policy.subjectm" + + "apping.CreateSubjectConditionSetRequest\032" + + "8.policy.subjectmapping.CreateSubjectCon" + + "ditionSetResponse\"\"\202\323\344\223\002\034\"\027/subject-cond" + + "ition-sets:\001*\022\267\001\n\031UpdateSubjectCondition" + + "Set\0227.policy.subjectmapping.UpdateSubjec" + + "tConditionSetRequest\0328.policy.subjectmap" + + "ping.UpdateSubjectConditionSetResponse\"\'" + + "\202\323\344\223\002!2\034/subject-condition-sets/{id}:\001*\022" + + "\264\001\n\031DeleteSubjectConditionSet\0227.policy.s" + + "ubjectmapping.DeleteSubjectConditionSetR" + + "equest\0328.policy.subjectmapping.DeleteSub" + + "jectConditionSetResponse\"$\202\323\344\223\002\036*\034/subje" + + "ct-condition-sets/{id}B\364\001\n)io.opentdf.pl" + + "atform.policy.subjectmappingB\023SubjectMap" + + "pingProtoP\001Z=github.com/opentdf/platform" + + "/protocol/go/policy/subjectmapping\242\002\003PSX" + + "\252\002\025Policy.Subjectmapping\312\002\025Policy\\Subjec" + + "tmapping\342\002!Policy\\Subjectmapping\\GPBMeta" + + "data\352\002\026Policy::Subjectmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -335,7 +336,6 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(), io.opentdf.platform.common.CommonProto.getDescriptor(), com.google.api.AnnotationsProto.getDescriptor(), - com.google.protobuf.StructProto.getDescriptor(), io.opentdf.platform.policy.attributes.AttributesProto.getDescriptor(), }); internal_static_policy_subjectmapping_Condition_descriptor = @@ -368,18 +368,18 @@ public static void registerAllExtensions( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectMapping_descriptor, new java.lang.String[] { "Id", "Metadata", "AttributeValue", "SubjectConditionSet", "Actions", }); - internal_static_policy_subjectmapping_Subject_descriptor = + internal_static_policy_subjectmapping_SubjectProperty_descriptor = getDescriptor().getMessageTypes().get(5); - internal_static_policy_subjectmapping_Subject_fieldAccessorTable = new + internal_static_policy_subjectmapping_SubjectProperty_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_policy_subjectmapping_Subject_descriptor, - new java.lang.String[] { "Attributes", }); + internal_static_policy_subjectmapping_SubjectProperty_descriptor, + new java.lang.String[] { "ExternalField", "ExternalValue", }); internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor = getDescriptor().getMessageTypes().get(6); internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_MatchSubjectMappingsRequest_descriptor, - new java.lang.String[] { "Subject", }); + new java.lang.String[] { "SubjectProperties", }); internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_descriptor = getDescriptor().getMessageTypes().get(7); internal_static_policy_subjectmapping_MatchSubjectMappingsResponse_fieldAccessorTable = new @@ -522,7 +522,6 @@ public static void registerAllExtensions( build.buf.validate.ValidateProto.getDescriptor(); io.opentdf.platform.common.CommonProto.getDescriptor(); com.google.api.AnnotationsProto.getDescriptor(); - com.google.protobuf.StructProto.getDescriptor(); io.opentdf.platform.policy.attributes.AttributesProto.getDescriptor(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectOrBuilder.java deleted file mode 100644 index 7c0894735f..0000000000 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectOrBuilder.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 SubjectOrBuilder extends - // @@protoc_insertion_point(interface_extends:policy.subjectmapping.Subject) - com.google.protobuf.MessageOrBuilder { - - /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return Whether the attributes field is set. - */ - boolean hasAttributes(); - /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return The attributes. - */ - com.google.protobuf.Struct getAttributes(); - /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - */ - com.google.protobuf.StructOrBuilder getAttributesOrBuilder(); -} diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Subject.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectProperty.java similarity index 52% rename from sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Subject.java rename to sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectProperty.java index fbeb479819..465a2d1ffb 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/Subject.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectProperty.java @@ -6,69 +6,123 @@ /** *
    - * A Representation of a subject as attribute->value pairs.  This would mirror user attributes retrieved
    + * A property of a Subject/Entity as a field->value pair.  This would mirror external user attributes retrieved
      * from an authoritative source such as an IDP (Identity Provider) or User Store.  Examples include such ADFS/LDAP, OKTA, etc.
    + * For now, a valid property must contain both field & value. 
      * 
    * - * Protobuf type {@code policy.subjectmapping.Subject} + * Protobuf type {@code policy.subjectmapping.SubjectProperty} */ -public final class Subject extends +public final class SubjectProperty extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:policy.subjectmapping.Subject) - SubjectOrBuilder { + // @@protoc_insertion_point(message_implements:policy.subjectmapping.SubjectProperty) + SubjectPropertyOrBuilder { private static final long serialVersionUID = 0L; - // Use Subject.newBuilder() to construct. - private Subject(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use SubjectProperty.newBuilder() to construct. + private SubjectProperty(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Subject() { + private SubjectProperty() { + externalField_ = ""; + externalValue_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new Subject(); + return new SubjectProperty(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_descriptor; + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_fieldAccessorTable + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.Subject.class, io.opentdf.platform.policy.subjectmapping.Subject.Builder.class); + io.opentdf.platform.policy.subjectmapping.SubjectProperty.class, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder.class); } - private int bitField0_; - public static final int ATTRIBUTES_FIELD_NUMBER = 1; - private com.google.protobuf.Struct attributes_; + public static final int EXTERNAL_FIELD_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object externalField_ = ""; /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return Whether the attributes field is set. + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The externalField. */ @java.lang.Override - public boolean hasAttributes() { - return ((bitField0_ & 0x00000001) != 0); + public java.lang.String getExternalField() { + java.lang.Object ref = externalField_; + 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(); + externalField_ = s; + return s; + } } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return The attributes. + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The bytes for externalField. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getExternalFieldBytes() { + java.lang.Object ref = externalField_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalField_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EXTERNAL_VALUE_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object externalValue_ = ""; + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The externalValue. */ @java.lang.Override - public com.google.protobuf.Struct getAttributes() { - return attributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : attributes_; + public java.lang.String getExternalValue() { + java.lang.Object ref = externalValue_; + 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(); + externalValue_ = s; + return s; + } } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The bytes for externalValue. */ @java.lang.Override - public com.google.protobuf.StructOrBuilder getAttributesOrBuilder() { - return attributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : attributes_; + public com.google.protobuf.ByteString + getExternalValueBytes() { + java.lang.Object ref = externalValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -85,8 +139,11 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getAttributes()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalField_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, externalField_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalValue_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, externalValue_); } getUnknownFields().writeTo(output); } @@ -97,9 +154,11 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getAttributes()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalField_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, externalField_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(externalValue_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, externalValue_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -111,16 +170,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.Subject)) { + if (!(obj instanceof io.opentdf.platform.policy.subjectmapping.SubjectProperty)) { return super.equals(obj); } - io.opentdf.platform.policy.subjectmapping.Subject other = (io.opentdf.platform.policy.subjectmapping.Subject) obj; + io.opentdf.platform.policy.subjectmapping.SubjectProperty other = (io.opentdf.platform.policy.subjectmapping.SubjectProperty) obj; - if (hasAttributes() != other.hasAttributes()) return false; - if (hasAttributes()) { - if (!getAttributes() - .equals(other.getAttributes())) return false; - } + if (!getExternalField() + .equals(other.getExternalField())) return false; + if (!getExternalValue() + .equals(other.getExternalValue())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -132,53 +190,53 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttributes()) { - hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; - hash = (53 * hash) + getAttributes().hashCode(); - } + hash = (37 * hash) + EXTERNAL_FIELD_FIELD_NUMBER; + hash = (53 * hash) + getExternalField().hashCode(); + hash = (37 * hash) + EXTERNAL_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getExternalValue().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty 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.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty 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.Subject parseFrom(byte[] data) + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty 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.Subject parseFrom(java.io.InputStream input) + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -186,26 +244,26 @@ public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseDelimitedFrom(java.io.InputStream input) + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static io.opentdf.platform.policy.subjectmapping.Subject parseDelimitedFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty 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.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty 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.Subject parseFrom( + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -218,7 +276,7 @@ public static io.opentdf.platform.policy.subjectmapping.Subject parseFrom( public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.Subject prototype) { + public static Builder newBuilder(io.opentdf.platform.policy.subjectmapping.SubjectProperty prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -235,71 +293,63 @@ protected Builder newBuilderForType( } /** *
    -   * A Representation of a subject as attribute->value pairs.  This would mirror user attributes retrieved
    +   * A property of a Subject/Entity as a field->value pair.  This would mirror external user attributes retrieved
        * from an authoritative source such as an IDP (Identity Provider) or User Store.  Examples include such ADFS/LDAP, OKTA, etc.
    +   * For now, a valid property must contain both field & value. 
        * 
    * - * Protobuf type {@code policy.subjectmapping.Subject} + * Protobuf type {@code policy.subjectmapping.SubjectProperty} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:policy.subjectmapping.Subject) - io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder { + // @@protoc_insertion_point(builder_implements:policy.subjectmapping.SubjectProperty) + io.opentdf.platform.policy.subjectmapping.SubjectPropertyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_descriptor; + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_fieldAccessorTable + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.opentdf.platform.policy.subjectmapping.Subject.class, io.opentdf.platform.policy.subjectmapping.Subject.Builder.class); + io.opentdf.platform.policy.subjectmapping.SubjectProperty.class, io.opentdf.platform.policy.subjectmapping.SubjectProperty.Builder.class); } - // Construct using io.opentdf.platform.policy.subjectmapping.Subject.newBuilder() + // Construct using io.opentdf.platform.policy.subjectmapping.SubjectProperty.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAttributesFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - attributes_ = null; - if (attributesBuilder_ != null) { - attributesBuilder_.dispose(); - attributesBuilder_ = null; - } + externalField_ = ""; + externalValue_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_Subject_descriptor; + return io.opentdf.platform.policy.subjectmapping.SubjectMappingProto.internal_static_policy_subjectmapping_SubjectProperty_descriptor; } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject getDefaultInstanceForType() { - return io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance(); + public io.opentdf.platform.policy.subjectmapping.SubjectProperty getDefaultInstanceForType() { + return io.opentdf.platform.policy.subjectmapping.SubjectProperty.getDefaultInstance(); } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject build() { - io.opentdf.platform.policy.subjectmapping.Subject result = buildPartial(); + public io.opentdf.platform.policy.subjectmapping.SubjectProperty build() { + io.opentdf.platform.policy.subjectmapping.SubjectProperty result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -307,23 +357,21 @@ public io.opentdf.platform.policy.subjectmapping.Subject build() { } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject buildPartial() { - io.opentdf.platform.policy.subjectmapping.Subject result = new io.opentdf.platform.policy.subjectmapping.Subject(this); + public io.opentdf.platform.policy.subjectmapping.SubjectProperty buildPartial() { + io.opentdf.platform.policy.subjectmapping.SubjectProperty result = new io.opentdf.platform.policy.subjectmapping.SubjectProperty(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } - private void buildPartial0(io.opentdf.platform.policy.subjectmapping.Subject result) { + private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectProperty result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.attributes_ = attributesBuilder_ == null - ? attributes_ - : attributesBuilder_.build(); - to_bitField0_ |= 0x00000001; + result.externalField_ = externalField_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.externalValue_ = externalValue_; } - result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -360,18 +408,25 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.opentdf.platform.policy.subjectmapping.Subject) { - return mergeFrom((io.opentdf.platform.policy.subjectmapping.Subject)other); + if (other instanceof io.opentdf.platform.policy.subjectmapping.SubjectProperty) { + return mergeFrom((io.opentdf.platform.policy.subjectmapping.SubjectProperty)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.Subject other) { - if (other == io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance()) return this; - if (other.hasAttributes()) { - mergeAttributes(other.getAttributes()); + public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectProperty other) { + if (other == io.opentdf.platform.policy.subjectmapping.SubjectProperty.getDefaultInstance()) return this; + if (!other.getExternalField().isEmpty()) { + externalField_ = other.externalField_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getExternalValue().isEmpty()) { + externalValue_ = other.externalValue_; + bitField0_ |= 0x00000002; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -400,12 +455,15 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getAttributesFieldBuilder().getBuilder(), - extensionRegistry); + externalField_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 + case 18: { + externalValue_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -423,125 +481,148 @@ public Builder mergeFrom( } private int bitField0_; - private com.google.protobuf.Struct attributes_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> attributesBuilder_; + private java.lang.Object externalField_ = ""; /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return Whether the attributes field is set. + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The externalField. */ - public boolean hasAttributes() { - return ((bitField0_ & 0x00000001) != 0); + public java.lang.String getExternalField() { + java.lang.Object ref = externalField_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalField_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; - * @return The attributes. + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The bytes for externalField. */ - public com.google.protobuf.Struct getAttributes() { - if (attributesBuilder_ == null) { - return attributes_ == null ? com.google.protobuf.Struct.getDefaultInstance() : attributes_; + public com.google.protobuf.ByteString + getExternalFieldBytes() { + java.lang.Object ref = externalField_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalField_ = b; + return b; } else { - return attributesBuilder_.getMessage(); + return (com.google.protobuf.ByteString) ref; } } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @param value The externalField to set. + * @return This builder for chaining. */ - public Builder setAttributes(com.google.protobuf.Struct value) { - if (attributesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attributes_ = value; - } else { - attributesBuilder_.setMessage(value); - } + public Builder setExternalField( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + externalField_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return This builder for chaining. */ - public Builder setAttributes( - com.google.protobuf.Struct.Builder builderForValue) { - if (attributesBuilder_ == null) { - attributes_ = builderForValue.build(); - } else { - attributesBuilder_.setMessage(builderForValue.build()); - } + public Builder clearExternalField() { + externalField_ = getDefaultInstance().getExternalField(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @param value The bytes for externalField to set. + * @return This builder for chaining. + */ + public Builder setExternalFieldBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + externalField_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } + + private java.lang.Object externalValue_ = ""; /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The externalValue. */ - public Builder mergeAttributes(com.google.protobuf.Struct value) { - if (attributesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0) && - attributes_ != null && - attributes_ != com.google.protobuf.Struct.getDefaultInstance()) { - getAttributesBuilder().mergeFrom(value); - } else { - attributes_ = value; - } + public java.lang.String getExternalValue() { + java.lang.Object ref = externalValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalValue_ = s; + return s; } else { - attributesBuilder_.mergeFrom(value); - } - if (attributes_ != null) { - bitField0_ |= 0x00000001; - onChanged(); + return (java.lang.String) ref; } - return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The bytes for externalValue. */ - public Builder clearAttributes() { - bitField0_ = (bitField0_ & ~0x00000001); - attributes_ = null; - if (attributesBuilder_ != null) { - attributesBuilder_.dispose(); - attributesBuilder_ = null; + public com.google.protobuf.ByteString + getExternalValueBytes() { + java.lang.Object ref = externalValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + externalValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; } - onChanged(); - return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @param value The externalValue to set. + * @return This builder for chaining. */ - public com.google.protobuf.Struct.Builder getAttributesBuilder() { - bitField0_ |= 0x00000001; + public Builder setExternalValue( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + externalValue_ = value; + bitField0_ |= 0x00000002; onChanged(); - return getAttributesFieldBuilder().getBuilder(); + return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return This builder for chaining. */ - public com.google.protobuf.StructOrBuilder getAttributesOrBuilder() { - if (attributesBuilder_ != null) { - return attributesBuilder_.getMessageOrBuilder(); - } else { - return attributes_ == null ? - com.google.protobuf.Struct.getDefaultInstance() : attributes_; - } + public Builder clearExternalValue() { + externalValue_ = getDefaultInstance().getExternalValue(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; } /** - * .google.protobuf.Struct attributes = 1 [json_name = "attributes"]; + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @param value The bytes for externalValue to set. + * @return This builder for chaining. */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> - getAttributesFieldBuilder() { - if (attributesBuilder_ == null) { - attributesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>( - getAttributes(), - getParentForChildren(), - isClean()); - attributes_ = null; - } - return attributesBuilder_; + public Builder setExternalValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + externalValue_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; } @java.lang.Override public final Builder setUnknownFields( @@ -556,23 +637,23 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:policy.subjectmapping.Subject) + // @@protoc_insertion_point(builder_scope:policy.subjectmapping.SubjectProperty) } - // @@protoc_insertion_point(class_scope:policy.subjectmapping.Subject) - private static final io.opentdf.platform.policy.subjectmapping.Subject DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:policy.subjectmapping.SubjectProperty) + private static final io.opentdf.platform.policy.subjectmapping.SubjectProperty DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.Subject(); + DEFAULT_INSTANCE = new io.opentdf.platform.policy.subjectmapping.SubjectProperty(); } - public static io.opentdf.platform.policy.subjectmapping.Subject getDefaultInstance() { + public static io.opentdf.platform.policy.subjectmapping.SubjectProperty getDefaultInstance() { return DEFAULT_INSTANCE; } - private static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public Subject parsePartialFrom( + public SubjectProperty parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -591,17 +672,17 @@ public Subject parsePartialFrom( } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.Subject getDefaultInstanceForType() { + public io.opentdf.platform.policy.subjectmapping.SubjectProperty getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectPropertyOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectPropertyOrBuilder.java new file mode 100644 index 0000000000..b464a4c11f --- /dev/null +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectPropertyOrBuilder.java @@ -0,0 +1,34 @@ +// 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 SubjectPropertyOrBuilder extends + // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectProperty) + com.google.protobuf.MessageOrBuilder { + + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The externalField. + */ + java.lang.String getExternalField(); + /** + * string external_field = 1 [json_name = "externalField", (.buf.validate.field) = { ... } + * @return The bytes for externalField. + */ + com.google.protobuf.ByteString + getExternalFieldBytes(); + + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The externalValue. + */ + java.lang.String getExternalValue(); + /** + * string external_value = 2 [json_name = "externalValue", (.buf.validate.field) = { ... } + * @return The bytes for externalValue. + */ + com.google.protobuf.ByteString + getExternalValueBytes(); +} diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index d1fabddf88..5edabbf542 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "errors" + "fmt" "log/slog" sq "github.com/Masterminds/squirrel" @@ -182,6 +183,15 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err &scsJSON, &attributeValueJSON, ) + slog.Debug( + "subjectMappingHydrateItem", + slog.Any("row", row), + slog.String("id", id), + slog.String("actionsJSON", string(actionsJSON)), + slog.String("metadataJSON", string(metadataJSON)), + slog.String("scsJSON", string(scsJSON)), + slog.String("attributeValueJSON", string(attributeValueJSON)), + ) if err != nil { return nil, db.WrapIfKnownInvalidQueryErr(err) } @@ -257,27 +267,29 @@ func createSubjectConditionSetSql(subjectSets []*subjectmapping.SubjectSet, meta } // Creates a new subject condition set and returns the id of the created -func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjectmapping.SubjectConditionSetCreate) (string, error) { +func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjectmapping.SubjectConditionSetCreate) (*subjectmapping.SubjectConditionSet, error) { // TODO: remove roundtrip [https://github.com/opentdf/platform/pull/314] metadataJSON, _, err := db.MarshalCreateMetadata(s.Metadata) if err != nil { - return "", err + return nil, err } sql, args, err := createSubjectConditionSetSql(s.SubjectSets, metadataJSON) if err != nil { - return "", err + return nil, err } var id string r, err := c.QueryRow(ctx, sql, args, err) if err != nil { - return "", err + return nil, err } if err = r.Scan(&id); err != nil { - return "", db.WrapIfKnownInvalidQueryErr(err) + return nil, db.WrapIfKnownInvalidQueryErr(err) } - return id, nil + return &subjectmapping.SubjectConditionSet{ + Id: id, + }, nil } func getSubjectConditionSetSql(id string) (string, []interface{}, error) { @@ -439,10 +451,11 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp scsId = s.ExistingSubjectConditionSetId } else if s.NewSubjectConditionSet != nil { // create the new subject condition sets - scsId, err = c.CreateSubjectConditionSet(ctx, s.NewSubjectConditionSet) + scs, err := c.CreateSubjectConditionSet(ctx, s.NewSubjectConditionSet) if err != nil { return "", err } + scsId = scs.Id } else { return "", errors.Join(db.ErrMissingRequiredValue, errors.New("either an existing Subject Condition Set ID or a new one is required when creating a subject mapping")) } @@ -615,3 +628,98 @@ func (c PolicyDbClient) DeleteSubjectMapping(ctx context.Context, id string) (st return id, nil } + +// This function generates a SQL select statement for SubjectMappings that based on external Subject property fields & values. There is +// some complexity in the SQL generation due to the external fields/values being stored in a JSONB column on the subject_condition_set table +// and the JSON structure being SubjectSets -> ConditionGroups -> Conditions. +// +// Unfortunately we must do some slight filtering at the SQL level to avoid extreme and potentially non-rare edge cases. Subject Mappings will +// be returned if there is any condition found among the structures that matches: +// 1. The external field, external value, and an IN operator +// 2. The external field, _no_ external value, and a NOT_IN operator +// +// Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping +// in some way or another. This could theoretically be every attribute in the DB if a policy admin has relied heavily on that field. +// +// NOTE: if you have any issues, set the log level to 'debug' for more comprehensive context. +func selectSubjectEntitlementsSql(subjectProperties []*subjectmapping.SubjectProperty) (string, []interface{}, error) { + var err error + if len(subjectProperties) == 0 { + err = errors.Join(db.ErrMissingRequiredValue, errors.New("one or more subject properties is required")) + slog.Error("subject property missing required value", slog.Any("properties provided", subjectProperties), slog.String("error", err.Error())) + return "", nil, err + } + where := "(" + for i, sp := range subjectProperties { + if sp.ExternalField == "" || sp.ExternalValue == "" { + err = errors.Join(db.ErrMissingRequiredValue, errors.New("all subject properties must include defined external field and value")) + slog.Error("subject property missing required value", slog.Any("properties provided", subjectProperties), slog.String("error", err.Error())) + return "", nil, err + } + if i > 0 { + where += " OR " + } + + hasField := "each_condition->>'subject_external_field' = '" + sp.ExternalField + "'" + hasValue := "(each_condition->>'subject_external_values')::jsonb @> '[\"" + sp.ExternalValue + "\"]'::jsonb" + hasInOperator := "each_condition->>'operator' = 'SUBJECT_MAPPING_OPERATOR_ENUM_IN'" + hasNotInOperator := "each_condition->>'operator' = 'SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN'" + // Parses the json and matches the row if either of the following conditions are met: + where += "((" + hasField + " AND " + hasValue + " AND " + hasInOperator + ")" + + " OR " + + "(" + hasField + " AND NOT " + hasValue + " AND " + hasNotInOperator + "))" + slog.Debug("current condition filter WHERE clause", slog.String("subject_external_field", sp.ExternalField), slog.String("subject_external_value", sp.ExternalValue), slog.String("where", where)) + } + where += ")" + + t := Tables.SubjectConditionSet + smT := Tables.SubjectMappings + + whereSubQ, _, err := db.NewStatementBuilder(). + // SELECT 1 is consumed by EXISTS clause, not true selection of data + Select("1"). + From("jsonb_array_elements(" + t.Field("condition") + ") AS ss" + + ", jsonb_array_elements(ss->'condition_groups') AS cg" + + ", jsonb_array_elements(cg->'conditions') AS each_condition"). + Where(where). + ToSql() + if err != nil { + slog.Error("could not generate SQL for subject entitlements", slog.String("error", err.Error())) + return "", nil, err + } + slog.Debug("checking for existence of any condition in the SubjectSets > ConditionGroups > Conditions that matches the provided subject properties", slog.String("where", whereSubQ)) + + return subjectMappingSelect(). + From(smT.Name()). + Where("EXISTS (" + whereSubQ + ")"). + ToSql() +} + +// GetSubjectEntitlements liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned +// if there is any single condition found among the structures that matches: +// 1. The external field, external value, and an IN operator +// 2. The external field, _no_ external value, and a NOT_IN operator +// +// Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping +// in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no +// logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum +// initial filter. +// +// NOTE: if you have any issues, set the log level to 'debug' for more comprehensive context. +func (c PolicyDbClient) GetSubjectEntitlements(ctx context.Context, properties []*subjectmapping.SubjectProperty) ([]*subjectmapping.SubjectMapping, error) { + sql, args, err := selectSubjectEntitlementsSql(properties) + slog.Debug("generated SQL for subject entitlements", slog.Any("properties", properties), slog.String("sql", sql), slog.Any("args", args)) + if err != nil { + return nil, err + } + fmt.Println("sql", sql) + + rows, err := c.Query(ctx, sql, args, err) + slog.Debug("executed SQL for subject entitlements", slog.Any("properties", properties), slog.String("sql", sql), slog.Any("args", args), slog.Any("rows", rows), slog.Any("error", err)) + if err != nil { + return nil, err + } + defer rows.Close() + + return subjectMappingHydrateList(rows) +} diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index bbb550b2b6..bf81ee15de 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -148,12 +148,12 @@ func (s SubjectMappingService) CreateSubjectConditionSet(ctx context.Context, rsp := &sm.CreateSubjectConditionSetResponse{} slog.Debug("creating subject condition set", slog.String("subjectConditionSet", req.String())) - id, err := s.dbClient.CreateSubjectConditionSet(context.Background(), req.SubjectConditionSet) + scs, err := s.dbClient.CreateSubjectConditionSet(context.Background(), req.SubjectConditionSet) if err != nil { return nil, services.HandleError(err, services.ErrCreationFailed, slog.String("subjectConditionSet", req.String())) } - rsp.Id = id + rsp.Id = scs.Id return rsp, nil } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 50004b17c2..5e0a0e3d52 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -6,7 +6,6 @@ import "authorization/authorization.proto"; import "buf/validate/validate.proto"; import "common/common.proto"; import "google/api/annotations.proto"; -import "google/protobuf/struct.proto"; import "policy/attributes/attributes.proto"; /* @@ -184,14 +183,27 @@ message SubjectMapping { repeated authorization.Action actions = 5; } -// A Representation of a subject as attribute->value pairs. This would mirror user attributes retrieved +// A property of a Subject/Entity as a field->value pair. This would mirror external 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 { - google.protobuf.Struct attributes = 1; +// For now, a valid property must contain both field & value. +message SubjectProperty { + string external_field = 1 [(buf.validate.field).required = true]; + string external_value = 2 [(buf.validate.field).required = true]; } +// MatchSubjectMappingsRequest liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned +// if there is any single condition found among the structures that matches for one of the provided properties: +// 1. The external field, external value, and an IN operator +// 2. The external field, _no_ external value, and a NOT_IN operator +// +// Without this filtering, if a field was something like 'emailAddress' or 'username', every Subject is probably going to relate to that mapping +// in some way or another, potentially matching every single attribute in the DB if a policy admin has relied heavily on that field. There is no +// logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum +// initial filter. +// +// NOTE: if you have any issues, debug logs are available within the service to help identify why a mapping was or was not returned. message MatchSubjectMappingsRequest { - Subject subject = 1; + repeated SubjectProperty subject_properties = 1; } message MatchSubjectMappingsResponse { @@ -312,7 +324,7 @@ service SubjectMappingService { rpc MatchSubjectMappings(MatchSubjectMappingsRequest) returns (MatchSubjectMappingsResponse) { option (google.api.http) = { post: "/subject-mappings/match" - body: "subject" + body: "subject_properties" }; } From ac2310ed72ed8dbafd0e44c3dc7cb0aa990e3ed3 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Fri, 8 Mar 2024 16:55:03 -0500 Subject: [PATCH 27/39] unify subject mappings naming throughout --- integration/subject_mappings_test.go | 40 +++++++++---------- services/policy/db/subject_mappings.go | 15 ++++--- .../policy/subjectmapping/subject_mapping.go | 15 +++++++ 3 files changed, 44 insertions(+), 26 deletions(-) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index 29d5c5e6e3..633dda716f 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -705,7 +705,7 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NonExistentId_Fails assert.ErrorIs(s.T(), err, db.ErrNotFound) } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InOne() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_InOne() { fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_set1") externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField externalValues := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues @@ -717,13 +717,13 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InOne() { }, } - sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.Nil(s.T(), err) assert.NotZero(s.T(), sm) assert.Equal(s.T(), fixtureScs.Id, sm[0].SubjectConditionSet.Id) } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_DoesNotReturnNotInWhenMatches() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_DoesNotReturnNotInWhenMatches() { fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField externalValues := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues @@ -735,13 +735,13 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_DoesNotReturnNotInWhen }, } - smList, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + smList, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.Nil(s.T(), err) assert.NotZero(s.T(), smList) assert.Equal(s.T(), 0, len(smList)) } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NotInOneMatch() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_NotInOneMatch() { fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField @@ -754,7 +754,7 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NotInOneMatch() { }, } - smList, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + smList, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.Nil(s.T(), err) assert.NotZero(s.T(), smList) assert.Equal(s.T(), 1, len(smList)) @@ -762,39 +762,39 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NotInOneMatch() { assert.Equal(s.T(), expectedMappedFixture.Id, smList[0].Id) } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_MissingFieldInProperty_Fails() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_MissingFieldInProperty_Fails() { props := []*subjectmapping.SubjectProperty{ { ExternalValue: "some_value", }, } - sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) assert.Zero(s.T(), sm) } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_MissingValueInProperty_Fails() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_MissingValueInProperty_Fails() { props := []*subjectmapping.SubjectProperty{ { ExternalField: "some_field", }, } - sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) assert.Zero(s.T(), sm) } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NoPropertiesProvided_Fails() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_NoPropertiesProvided_Fails() { props := []*subjectmapping.SubjectProperty{} - sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) assert.Zero(s.T(), sm) } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InMultiple() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_InMultiple() { simpleScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_in") simpleExternalField := simpleScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField simpleExternalValues := simpleScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues @@ -814,7 +814,7 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InMultiple() { }, } - gotEntitlements, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + gotEntitlements, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.Nil(s.T(), err) assert.NotZero(s.T(), gotEntitlements) assert.GreaterOrEqual(s.T(), len(gotEntitlements), 2) @@ -835,7 +835,7 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InMultiple() { assert.True(s.T(), foundMappedSubjectConditionSet1) } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NotInMultiple() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_NotInMultiple() { fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_not_in") externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField expectedMappedFixture := s.f.GetSubjectMappingKey("subject_mapping_subject_simple_not_in") @@ -855,7 +855,7 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NotInMultiple() { }, } - smList, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + smList, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.Nil(s.T(), err) assert.NotZero(s.T(), smList) assert.Equal(s.T(), 2, len(smList)) @@ -868,7 +868,7 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NotInMultiple() { } } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InOneAndNotInASecond() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_InOneAndNotInASecond() { fixtureScs := s.f.GetSubjectConditionSetKey("subject_condition_simple_in") externalField := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField externalValues := fixtureScs.Condition.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalValues @@ -889,7 +889,7 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InOneAndNotInASecond() }, } - smList, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + smList, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.Nil(s.T(), err) assert.NotZero(s.T(), smList) for _, sm := range smList { @@ -901,14 +901,14 @@ func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_InOneAndNotInASecond() } } -func (s *SubjectMappingsSuite) TestGetSubjectEntitlements_NonExistentField_ReturnsNoMappings() { +func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_NonExistentField_ReturnsNoMappings() { props := []*subjectmapping.SubjectProperty{ { ExternalField: "non_existent_field", ExternalValue: "non_existent_value", }, } - sm, err := s.db.PolicyClient.GetSubjectEntitlements(s.ctx, props) + sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) assert.Nil(s.T(), err) assert.NotZero(s.T(), sm) assert.Equal(s.T(), 0, len(sm)) diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 5edabbf542..e6a1f9af5e 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -629,8 +629,10 @@ func (c PolicyDbClient) DeleteSubjectMapping(ctx context.Context, id string) (st return id, nil } -// This function generates a SQL select statement for SubjectMappings that based on external Subject property fields & values. There is -// some complexity in the SQL generation due to the external fields/values being stored in a JSONB column on the subject_condition_set table +// This function generates a SQL select statement for SubjectMappings that based on external Subject property fields & values. This relationship +// is sometimes called Entitlements or Subject Entitlements. +// +// There is complexity in the SQL generation due to the external fields/values being stored in a JSONB column on the subject_condition_set table // and the JSON structure being SubjectSets -> ConditionGroups -> Conditions. // // Unfortunately we must do some slight filtering at the SQL level to avoid extreme and potentially non-rare edge cases. Subject Mappings will @@ -642,7 +644,7 @@ func (c PolicyDbClient) DeleteSubjectMapping(ctx context.Context, id string) (st // in some way or another. This could theoretically be every attribute in the DB if a policy admin has relied heavily on that field. // // NOTE: if you have any issues, set the log level to 'debug' for more comprehensive context. -func selectSubjectEntitlementsSql(subjectProperties []*subjectmapping.SubjectProperty) (string, []interface{}, error) { +func selectMatchedSubjectMappingsSql(subjectProperties []*subjectmapping.SubjectProperty) (string, []interface{}, error) { var err error if len(subjectProperties) == 0 { err = errors.Join(db.ErrMissingRequiredValue, errors.New("one or more subject properties is required")) @@ -695,7 +697,7 @@ func selectSubjectEntitlementsSql(subjectProperties []*subjectmapping.SubjectPro ToSql() } -// GetSubjectEntitlements liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned +// GetMatchedSubjectMappings liberally returns a list of SubjectMappings based on the provided SubjectProperties. The SubjectMappings are returned // if there is any single condition found among the structures that matches: // 1. The external field, external value, and an IN operator // 2. The external field, _no_ external value, and a NOT_IN operator @@ -705,9 +707,10 @@ func selectSubjectEntitlementsSql(subjectProperties []*subjectmapping.SubjectPro // logic applied beyond a single condition within the query to avoid business logic interpreting the supplied conditions beyond the bare minimum // initial filter. // +// NOTE: This relationship is sometimes called Entitlements or Subject Entitlements. // NOTE: if you have any issues, set the log level to 'debug' for more comprehensive context. -func (c PolicyDbClient) GetSubjectEntitlements(ctx context.Context, properties []*subjectmapping.SubjectProperty) ([]*subjectmapping.SubjectMapping, error) { - sql, args, err := selectSubjectEntitlementsSql(properties) +func (c PolicyDbClient) GetMatchedSubjectMappings(ctx context.Context, properties []*subjectmapping.SubjectProperty) ([]*subjectmapping.SubjectMapping, error) { + sql, args, err := selectMatchedSubjectMappingsSql(properties) slog.Debug("generated SQL for subject entitlements", slog.Any("properties", properties), slog.String("sql", sql), slog.Any("args", args)) if err != nil { return nil, err diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index bf81ee15de..72f6bf5c1b 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -108,6 +108,21 @@ func (s SubjectMappingService) DeleteSubjectMapping(ctx context.Context, return rsp, nil } +func (s SubjectMappingService) MatchSubjectMappings(ctx context.Context, + req *sm.MatchSubjectMappingsRequest, +) (*sm.MatchSubjectMappingsResponse, error) { + rsp := &sm.MatchSubjectMappingsResponse{} + slog.Debug("matching subject mappings", slog.Any("subjectProperties", req.SubjectProperties)) + + smList, err := s.dbClient.GetMatchedSubjectMappings(ctx, req.SubjectProperties) + if err != nil { + return nil, services.HandleError(err, services.ErrGetRetrievalFailed, slog.Any("subjectProperties", req.SubjectProperties)) + } + + rsp.SubjectMappings = smList + return rsp, nil +} + /* -------------------------------------------------------- * ----------------- SubjectConditionSets ----------------- * -------------------------------------------------------*/ From d2cd8f55893fa8db08aacab76a91a834f2372436 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 09:15:46 -0400 Subject: [PATCH 28/39] sync up create/update/delete response with rest of policy API updates in the protos --- docs/grpc/index.html | 18 +- .../subject_mapping.swagger.json | 15 +- .../subjectmapping/subject_mapping.pb.go | 134 ++++---- .../CreateSubjectMappingResponse.java | 289 ++++++++++++------ ...CreateSubjectMappingResponseOrBuilder.java | 29 +- .../DeleteSubjectMappingResponse.java | 289 ++++++++++++------ ...DeleteSubjectMappingResponseOrBuilder.java | 29 +- .../subjectmapping/SubjectMappingProto.java | 217 ++++++------- .../UpdateSubjectMappingResponse.java | 289 ++++++++++++------ ...UpdateSubjectMappingResponseOrBuilder.java | 29 +- .../subjectmapping/subject_mapping.proto | 9 +- 11 files changed, 868 insertions(+), 479 deletions(-) diff --git a/docs/grpc/index.html b/docs/grpc/index.html index ed67d3d40b..f7026289dc 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -5020,10 +5020,10 @@

    CreateSubjectMapping - id - string + subject_mapping + SubjectMapping -

    +

    Only ID of the updated Subject Mapping provided

    @@ -5116,10 +5116,10 @@

    DeleteSubjectMapping - id - string + subject_mapping + SubjectMapping -

    +

    Only ID of the updated Subject Mapping provided

    @@ -5636,10 +5636,10 @@

    UpdateSubjectMapping - id - string + subject_mapping + SubjectMapping -

    +

    Only ID of the updated Subject Mapping provided

    diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index f7681b2e05..6c037304b9 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -717,8 +717,9 @@ "subjectmappingCreateSubjectMappingResponse": { "type": "object", "properties": { - "id": { - "type": "string" + "subjectMapping": { + "$ref": "#/definitions/subjectmappingSubjectMapping", + "title": "Only ID of the updated Subject Mapping provided" } } }, @@ -733,8 +734,9 @@ "subjectmappingDeleteSubjectMappingResponse": { "type": "object", "properties": { - "id": { - "type": "string" + "subjectMapping": { + "$ref": "#/definitions/subjectmappingSubjectMapping", + "title": "Only ID of the updated Subject Mapping provided" } } }, @@ -911,8 +913,9 @@ "subjectmappingUpdateSubjectMappingResponse": { "type": "object", "properties": { - "id": { - "type": "string" + "subjectMapping": { + "$ref": "#/definitions/subjectmappingSubjectMapping", + "title": "Only ID of the updated Subject Mapping provided" } } } diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 9ec2944018..74ad718dc8 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -892,7 +892,8 @@ type CreateSubjectMappingResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Only ID of the updated Subject Mapping provided + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` } func (x *CreateSubjectMappingResponse) Reset() { @@ -927,11 +928,11 @@ func (*CreateSubjectMappingResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{13} } -func (x *CreateSubjectMappingResponse) GetId() string { +func (x *CreateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { if x != nil { - return x.Id + return x.SubjectMapping } - return "" + return nil } type UpdateSubjectMappingRequest struct { @@ -1012,7 +1013,8 @@ type UpdateSubjectMappingResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Only ID of the updated Subject Mapping provided + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` } func (x *UpdateSubjectMappingResponse) Reset() { @@ -1047,11 +1049,11 @@ func (*UpdateSubjectMappingResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{15} } -func (x *UpdateSubjectMappingResponse) GetId() string { +func (x *UpdateSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { if x != nil { - return x.Id + return x.SubjectMapping } - return "" + return nil } type DeleteSubjectMappingRequest struct { @@ -1106,7 +1108,8 @@ type DeleteSubjectMappingResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Only ID of the updated Subject Mapping provided + SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` } func (x *DeleteSubjectMappingResponse) Reset() { @@ -1141,11 +1144,11 @@ func (*DeleteSubjectMappingResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{17} } -func (x *DeleteSubjectMappingResponse) GetId() string { +func (x *DeleteSubjectMappingResponse) GetSubjectMapping() *SubjectMapping { if x != nil { - return x.Id + return x.SubjectMapping } - return "" + return nil } type GetSubjectConditionSetRequest struct { @@ -1831,10 +1834,14 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x53, 0x65, 0x74, 0x12, 0x39, 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, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xfb, + 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, 0xfb, 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, @@ -1850,17 +1857,25 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x0d, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2e, 0x0a, 0x1c, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x35, 0x0a, 0x1b, + 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, 0x2e, 0x0a, 0x1c, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, + 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, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 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, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe7, 0x01, 0x0a, @@ -2161,43 +2176,46 @@ var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 35, // 15: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable 24, // 16: policy.subjectmapping.CreateSubjectMappingRequest.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate 33, // 17: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action - 35, // 18: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable - 33, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action - 5, // 20: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 6, // 21: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 5, // 22: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet - 35, // 23: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable - 4, // 24: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 24, // 25: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 35, // 26: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable - 4, // 27: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet - 8, // 28: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest - 12, // 29: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest - 10, // 30: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest - 14, // 31: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest - 16, // 32: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest - 18, // 33: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest - 22, // 34: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest - 20, // 35: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest - 25, // 36: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest - 27, // 37: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest - 29, // 38: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest - 9, // 39: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse - 13, // 40: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse - 11, // 41: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse - 15, // 42: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse - 17, // 43: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse - 19, // 44: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse - 23, // 45: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse - 21, // 46: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse - 26, // 47: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse - 28, // 48: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse - 30, // 49: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse - 39, // [39:50] is the sub-list for method output_type - 28, // [28:39] is the sub-list for method input_type - 28, // [28:28] is the sub-list for extension type_name - 28, // [28:28] is the sub-list for extension extendee - 0, // [0:28] is the sub-list for field type_name + 6, // 18: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 35, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable + 33, // 20: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action + 6, // 21: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 6, // 22: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 5, // 23: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 6, // 24: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 5, // 25: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet + 35, // 26: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable + 4, // 27: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 24, // 28: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 35, // 29: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable + 4, // 30: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet + 8, // 31: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 32: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 33: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 14, // 34: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 16, // 35: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 18, // 36: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 22, // 37: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest + 20, // 38: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest + 25, // 39: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest + 27, // 40: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest + 29, // 41: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest + 9, // 42: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 43: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 44: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 15, // 45: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 17, // 46: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 19, // 47: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 23, // 48: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse + 21, // 49: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse + 26, // 50: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse + 28, // 51: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse + 30, // 52: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse + 42, // [42:53] is the sub-list for method output_type + 31, // [31:42] is the sub-list for method input_type + 31, // [31:31] is the sub-list for extension type_name + 31, // [31:31] is the sub-list for extension extendee + 0, // [0:31] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java index 8ce6675331..824b7afa4c 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java @@ -17,7 +17,6 @@ private CreateSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Buil super(builder); } private CreateSubjectMappingResponse() { - id_ = ""; } @java.lang.Override @@ -40,43 +39,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.Builder.class); } - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; + private int bitField0_; + public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. */ @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; - } + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. */ @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 io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + /** + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; } private byte memoizedIsInitialized = -1; @@ -93,8 +92,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(1, getSubjectMapping()); } getUnknownFields().writeTo(output); } @@ -105,8 +104,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(1, getSubjectMapping()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -123,8 +123,11 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse) obj; - if (!getId() - .equals(other.getId())) return false; + if (hasSubjectMapping() != other.hasSubjectMapping()) return false; + if (hasSubjectMapping()) { + if (!getSubjectMapping() + .equals(other.getSubjectMapping())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -136,8 +139,10 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); + if (hasSubjectMapping()) { + hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMapping().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -257,19 +262,29 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectMappingFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - id_ = ""; + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } return this; } @@ -303,9 +318,14 @@ public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse bu private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; + result.subjectMapping_ = subjectMappingBuilder_ == null + ? subjectMapping_ + : subjectMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -352,10 +372,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingResponse.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); + if (other.hasSubjectMapping()) { + mergeSubjectMapping(other.getSubjectMapping()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -384,7 +402,9 @@ public Builder mergeFrom( done = true; break; case 10: { - id_ = input.readStringRequireUtf8(); + input.readMessage( + getSubjectMappingFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -405,76 +425,161 @@ public Builder mergeFrom( } private int bitField0_; - private java.lang.Object id_ = ""; + private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> subjectMappingBuilder_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. */ - 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; + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { + if (subjectMappingBuilder_ == null) { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; } else { - return (java.lang.String) ref; + return subjectMappingBuilder_.getMessage(); } } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - 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; + public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectMapping_ = value; } else { - return (com.google.protobuf.ByteString) ref; + subjectMappingBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; + public Builder setSubjectMapping( + io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder builderForValue) { + if (subjectMappingBuilder_ == null) { + subjectMapping_ = builderForValue.build(); + } else { + subjectMappingBuilder_.setMessage(builderForValue.build()); + } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); + public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectMapping_ != null && + subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance()) { + getSubjectMappingBuilder().mergeFrom(value); + } else { + subjectMapping_ = value; + } + } else { + subjectMappingBuilder_.mergeFrom(value); + } + if (subjectMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder clearSubjectMapping() { bitField0_ = (bitField0_ & ~0x00000001); + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; + public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder getSubjectMappingBuilder() { bitField0_ |= 0x00000001; onChanged(); - return this; + return getSubjectMappingFieldBuilder().getBuilder(); + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + if (subjectMappingBuilder_ != null) { + return subjectMappingBuilder_.getMessageOrBuilder(); + } else { + return subjectMapping_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> + getSubjectMappingFieldBuilder() { + if (subjectMappingBuilder_ == null) { + subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder>( + getSubjectMapping(), + getParentForChildren(), + isClean()); + subjectMapping_ = null; + } + return subjectMappingBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java index 40d85f905c..f925819d32 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java @@ -9,14 +9,29 @@ public interface CreateSubjectMappingResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. */ - java.lang.String getId(); + boolean hasSubjectMapping(); /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. */ - com.google.protobuf.ByteString - getIdBytes(); + io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping(); + /** + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java index df4888f833..18d44dac26 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponse.java @@ -17,7 +17,6 @@ private DeleteSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Buil super(builder); } private DeleteSubjectMappingResponse() { - id_ = ""; } @java.lang.Override @@ -40,43 +39,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.Builder.class); } - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; + private int bitField0_; + public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. */ @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; - } + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. */ @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 io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + /** + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; } private byte memoizedIsInitialized = -1; @@ -93,8 +92,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(1, getSubjectMapping()); } getUnknownFields().writeTo(output); } @@ -105,8 +104,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(1, getSubjectMapping()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -123,8 +123,11 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse) obj; - if (!getId() - .equals(other.getId())) return false; + if (hasSubjectMapping() != other.hasSubjectMapping()) return false; + if (hasSubjectMapping()) { + if (!getSubjectMapping() + .equals(other.getSubjectMapping())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -136,8 +139,10 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); + if (hasSubjectMapping()) { + hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMapping().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -257,19 +262,29 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectMappingFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - id_ = ""; + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } return this; } @@ -303,9 +318,14 @@ public io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse bu private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; + result.subjectMapping_ = subjectMappingBuilder_ == null + ? subjectMapping_ + : subjectMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -352,10 +372,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectMappingResponse.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); + if (other.hasSubjectMapping()) { + mergeSubjectMapping(other.getSubjectMapping()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -384,7 +402,9 @@ public Builder mergeFrom( done = true; break; case 10: { - id_ = input.readStringRequireUtf8(); + input.readMessage( + getSubjectMappingFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -405,76 +425,161 @@ public Builder mergeFrom( } private int bitField0_; - private java.lang.Object id_ = ""; + private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> subjectMappingBuilder_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. */ - 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; + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { + if (subjectMappingBuilder_ == null) { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; } else { - return (java.lang.String) ref; + return subjectMappingBuilder_.getMessage(); } } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - 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; + public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectMapping_ = value; } else { - return (com.google.protobuf.ByteString) ref; + subjectMappingBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; + public Builder setSubjectMapping( + io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder builderForValue) { + if (subjectMappingBuilder_ == null) { + subjectMapping_ = builderForValue.build(); + } else { + subjectMappingBuilder_.setMessage(builderForValue.build()); + } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); + public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectMapping_ != null && + subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance()) { + getSubjectMappingBuilder().mergeFrom(value); + } else { + subjectMapping_ = value; + } + } else { + subjectMappingBuilder_.mergeFrom(value); + } + if (subjectMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder clearSubjectMapping() { bitField0_ = (bitField0_ & ~0x00000001); + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; + public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder getSubjectMappingBuilder() { bitField0_ |= 0x00000001; onChanged(); - return this; + return getSubjectMappingFieldBuilder().getBuilder(); + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + if (subjectMappingBuilder_ != null) { + return subjectMappingBuilder_.getMessageOrBuilder(); + } else { + return subjectMapping_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> + getSubjectMappingFieldBuilder() { + if (subjectMappingBuilder_ == null) { + subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder>( + getSubjectMapping(), + getParentForChildren(), + isClean()); + subjectMapping_ = null; + } + return subjectMappingBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java index 3894c8c332..5ed68cde96 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectMappingResponseOrBuilder.java @@ -9,14 +9,29 @@ public interface DeleteSubjectMappingResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. */ - java.lang.String getId(); + boolean hasSubjectMapping(); /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. */ - com.google.protobuf.ByteString - getIdBytes(); + io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping(); + /** + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); } 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 6c35b696c1..e1ac70e725 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 @@ -224,109 +224,114 @@ public static void registerAllExtensions( "cy.subjectmapping.SubjectConditionSetCre" + "ateR\026newSubjectConditionSet\0229\n\007actions\030\005" + " \003(\0132\025.authorization.ActionB\010\272H\005\222\001\002\010\001R\007a" + - "ctions\".\n\034CreateSubjectMappingResponse\022\016" + - "\n\002id\030\001 \001(\tR\002id\"\373\001\n\033UpdateSubjectMappingR" + - "equest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022@\n\017update" + - "_metadata\030\002 \001(\0132\027.common.MetadataMutable" + - "R\016updateMetadata\022D\n\037update_subject_condi" + - "tion_set_id\030\003 \001(\tR\033updateSubjectConditio" + - "nSetId\022<\n\016update_actions\030\005 \003(\0132\025.authori" + - "zation.ActionR\rupdateActions\".\n\034UpdateSu" + - "bjectMappingResponse\022\016\n\002id\030\001 \001(\tR\002id\"5\n\033" + - "DeleteSubjectMappingRequest\022\026\n\002id\030\001 \001(\tB" + - "\006\272H\003\310\001\001R\002id\".\n\034DeleteSubjectMappingRespo" + - "nse\022\016\n\002id\030\001 \001(\tR\002id\"7\n\035GetSubjectConditi" + - "onSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n" + - "\036GetSubjectConditionSetResponse\022^\n\025subje" + - "ct_condition_set\030\001 \001(\0132*.policy.subjectm" + - "apping.SubjectConditionSetR\023subjectCondi" + - "tionSet\022e\n\033associated_subject_mappings\030\002" + - " \003(\0132%.policy.subjectmapping.SubjectMapp" + - "ingR\031associatedSubjectMappings\"!\n\037ListSu" + - "bjectConditionSetsRequest\"\204\001\n ListSubjec" + - "tConditionSetsResponse\022`\n\026subject_condit" + - "ion_sets\030\001 \003(\0132*.policy.subjectmapping.S" + - "ubjectConditionSetR\024subjectConditionSets" + - "\"\240\001\n\031SubjectConditionSetCreate\0223\n\010metada" + - "ta\030\001 \001(\0132\027.common.MetadataMutableR\010metad" + - "ata\022N\n\014subject_sets\030\002 \003(\0132!.policy.subje" + - "ctmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectS" + - "ets\"\210\001\n CreateSubjectConditionSetRequest" + - "\022d\n\025subject_condition_set\030\001 \001(\01320.policy" + - ".subjectmapping.SubjectConditionSetCreat" + - "eR\023subjectConditionSet\"3\n!CreateSubjectC" + - "onditionSetResponse\022\016\n\002id\030\001 \001(\tR\002id\"\317\001\n " + - "UpdateSubjectConditionSetRequest\022\026\n\002id\030\001" + - " \001(\tB\006\272H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(" + - "\0132\027.common.MetadataMutableR\016updateMetada" + - "ta\022Q\n\023update_subject_sets\030\003 \003(\0132!.policy" + - ".subjectmapping.SubjectSetR\021updateSubjec" + - "tSets\"3\n!UpdateSubjectConditionSetRespon" + - "se\022\016\n\002id\030\001 \001(\tR\002id\":\n DeleteSubjectCondi" + - "tionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"3" + - "\n!DeleteSubjectConditionSetResponse\022\016\n\002i" + - "d\030\001 \001(\tR\002id*\233\001\n\032SubjectMappingOperatorEn" + - "um\022-\n)SUBJECT_MAPPING_OPERATOR_ENUM_UNSP" + - "ECIFIED\020\000\022$\n SUBJECT_MAPPING_OPERATOR_EN" + - "UM_IN\020\001\022(\n$SUBJECT_MAPPING_OPERATOR_ENUM" + - "_NOT_IN\020\002*\220\001\n\030ConditionBooleanTypeEnum\022+" + - "\n\'CONDITION_BOOLEAN_TYPE_ENUM_UNSPECIFIE" + - "D\020\000\022#\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND\020\001" + - "\022\"\n\036CONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n" + - "\025SubjectMappingService\022\251\001\n\024MatchSubjectM" + - "appings\0222.policy.subjectmapping.MatchSub" + - "jectMappingsRequest\0323.policy.subjectmapp" + - "ing.MatchSubjectMappingsResponse\"(\202\323\344\223\002\"" + - "\"\027/subject-mappings/match:\007subject\022\227\001\n\023L" + - "istSubjectMappings\0221.policy.subjectmappi" + - "ng.ListSubjectMappingsRequest\0322.policy.s" + - "ubjectmapping.ListSubjectMappingsRespons" + - "e\"\031\202\323\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSubj" + - "ectMapping\022/.policy.subjectmapping.GetSu" + - "bjectMappingRequest\0320.policy.subjectmapp" + - "ing.GetSubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/" + - "subject-mappings/{id}\022\235\001\n\024CreateSubjectM" + - "apping\0222.policy.subjectmapping.CreateSub" + - "jectMappingRequest\0323.policy.subjectmappi" + - "ng.CreateSubjectMappingResponse\"\034\202\323\344\223\002\026\"" + - "\021/subject-mappings:\001*\022\242\001\n\024UpdateSubjectM" + - "apping\0222.policy.subjectmapping.UpdateSub" + - "jectMappingRequest\0323.policy.subjectmappi" + - "ng.UpdateSubjectMappingResponse\"!\202\323\344\223\002\0332" + - "\026/subject-mappings/{id}:\001*\022\237\001\n\024DeleteSub" + - "jectMapping\0222.policy.subjectmapping.Dele" + - "teSubjectMappingRequest\0323.policy.subject" + - "mapping.DeleteSubjectMappingResponse\"\036\202\323" + - "\344\223\002\030*\026/subject-mappings/{id}\022\254\001\n\030ListSub" + - "jectConditionSets\0226.policy.subjectmappin" + - "g.ListSubjectConditionSetsRequest\0327.poli" + - "cy.subjectmapping.ListSubjectConditionSe" + - "tsResponse\"\037\202\323\344\223\002\031\022\027/subject-condition-s" + - "ets\022\253\001\n\026GetSubjectConditionSet\0224.policy." + - "subjectmapping.GetSubjectConditionSetReq" + - "uest\0325.policy.subjectmapping.GetSubjectC" + - "onditionSetResponse\"$\202\323\344\223\002\036\022\034/subject-co" + - "ndition-sets/{id}\022\262\001\n\031CreateSubjectCondi" + - "tionSet\0227.policy.subjectmapping.CreateSu" + - "bjectConditionSetRequest\0328.policy.subjec" + - "tmapping.CreateSubjectConditionSetRespon" + - "se\"\"\202\323\344\223\002\034\"\027/subject-condition-sets:\001*\022\267" + - "\001\n\031UpdateSubjectConditionSet\0227.policy.su" + - "bjectmapping.UpdateSubjectConditionSetRe" + - "quest\0328.policy.subjectmapping.UpdateSubj" + - "ectConditionSetResponse\"\'\202\323\344\223\002!2\034/subjec" + - "t-condition-sets/{id}:\001*\022\264\001\n\031DeleteSubje" + - "ctConditionSet\0227.policy.subjectmapping.D" + - "eleteSubjectConditionSetRequest\0328.policy" + - ".subjectmapping.DeleteSubjectConditionSe" + - "tResponse\"$\202\323\344\223\002\036*\034/subject-condition-se" + - "ts/{id}B\364\001\n)io.opentdf.platform.policy.s" + - "ubjectmappingB\023SubjectMappingProtoP\001Z=gi" + - "thub.com/opentdf/platform/protocol/go/po" + - "licy/subjectmapping\242\002\003PSX\252\002\025Policy.Subje" + - "ctmapping\312\002\025Policy\\Subjectmapping\342\002!Poli" + - "cy\\Subjectmapping\\GPBMetadata\352\002\026Policy::" + - "Subjectmappingb\006proto3" + "ctions\"n\n\034CreateSubjectMappingResponse\022N" + + "\n\017subject_mapping\030\001 \001(\0132%.policy.subject" + + "mapping.SubjectMappingR\016subjectMapping\"\373" + + "\001\n\033UpdateSubjectMappingRequest\022\026\n\002id\030\001 \001" + + "(\tB\006\272H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132" + + "\027.common.MetadataMutableR\016updateMetadata" + + "\022D\n\037update_subject_condition_set_id\030\003 \001(" + + "\tR\033updateSubjectConditionSetId\022<\n\016update" + + "_actions\030\005 \003(\0132\025.authorization.ActionR\ru" + + "pdateActions\"n\n\034UpdateSubjectMappingResp" + + "onse\022N\n\017subject_mapping\030\001 \001(\0132%.policy.s" + + "ubjectmapping.SubjectMappingR\016subjectMap" + + "ping\"5\n\033DeleteSubjectMappingRequest\022\026\n\002i" + + "d\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectMapp" + + "ingResponse\022N\n\017subject_mapping\030\001 \001(\0132%.p" + + "olicy.subjectmapping.SubjectMappingR\016sub" + + "jectMapping\"7\n\035GetSubjectConditionSetReq" + + "uest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetSubj" + + "ectConditionSetResponse\022^\n\025subject_condi" + + "tion_set\030\001 \001(\0132*.policy.subjectmapping.S" + + "ubjectConditionSetR\023subjectConditionSet\022" + + "e\n\033associated_subject_mappings\030\002 \003(\0132%.p" + + "olicy.subjectmapping.SubjectMappingR\031ass" + + "ociatedSubjectMappings\"!\n\037ListSubjectCon" + + "ditionSetsRequest\"\204\001\n ListSubjectConditi" + + "onSetsResponse\022`\n\026subject_condition_sets" + + "\030\001 \003(\0132*.policy.subjectmapping.SubjectCo" + + "nditionSetR\024subjectConditionSets\"\240\001\n\031Sub" + + "jectConditionSetCreate\0223\n\010metadata\030\001 \001(\013" + + "2\027.common.MetadataMutableR\010metadata\022N\n\014s" + + "ubject_sets\030\002 \003(\0132!.policy.subjectmappin" + + "g.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\210\001\n " + + "CreateSubjectConditionSetRequest\022d\n\025subj" + + "ect_condition_set\030\001 \001(\01320.policy.subject" + + "mapping.SubjectConditionSetCreateR\023subje" + + "ctConditionSet\"3\n!CreateSubjectCondition" + + "SetResponse\022\016\n\002id\030\001 \001(\tR\002id\"\317\001\n UpdateSu" + + "bjectConditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H" + + "\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132\027.comm" + + "on.MetadataMutableR\016updateMetadata\022Q\n\023up" + + "date_subject_sets\030\003 \003(\0132!.policy.subject" + + "mapping.SubjectSetR\021updateSubjectSets\"3\n" + + "!UpdateSubjectConditionSetResponse\022\016\n\002id" + + "\030\001 \001(\tR\002id\":\n DeleteSubjectConditionSetR" + + "equest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"3\n!Delete" + + "SubjectConditionSetResponse\022\016\n\002id\030\001 \001(\tR" + + "\002id*\233\001\n\032SubjectMappingOperatorEnum\022-\n)SU" + + "BJECT_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\'CONDIT" + + "ION_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022#\n\037C" + + "ONDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036COND" + + "ITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n\025Subject" + + "MappingService\022\251\001\n\024MatchSubjectMappings\022" + + "2.policy.subjectmapping.MatchSubjectMapp" + + "ingsRequest\0323.policy.subjectmapping.Matc" + + "hSubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/subje" + + "ct-mappings/match:\007subject\022\227\001\n\023ListSubje" + + "ctMappings\0221.policy.subjectmapping.ListS" + + "ubjectMappingsRequest\0322.policy.subjectma" + + "pping.ListSubjectMappingsResponse\"\031\202\323\344\223\002" + + "\023\022\021/subject-mappings\022\226\001\n\021GetSubjectMappi" + + "ng\022/.policy.subjectmapping.GetSubjectMap" + + "pingRequest\0320.policy.subjectmapping.GetS" + + "ubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subject-" + + "mappings/{id}\022\235\001\n\024CreateSubjectMapping\0222" + + ".policy.subjectmapping.CreateSubjectMapp" + + "ingRequest\0323.policy.subjectmapping.Creat" + + "eSubjectMappingResponse\"\034\202\323\344\223\002\026\"\021/subjec" + + "t-mappings:\001*\022\242\001\n\024UpdateSubjectMapping\0222" + + ".policy.subjectmapping.UpdateSubjectMapp" + + "ingRequest\0323.policy.subjectmapping.Updat" + + "eSubjectMappingResponse\"!\202\323\344\223\002\0332\026/subjec" + + "t-mappings/{id}:\001*\022\237\001\n\024DeleteSubjectMapp" + + "ing\0222.policy.subjectmapping.DeleteSubjec" + + "tMappingRequest\0323.policy.subjectmapping." + + "DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030*\026/s" + + "ubject-mappings/{id}\022\254\001\n\030ListSubjectCond" + + "itionSets\0226.policy.subjectmapping.ListSu" + + "bjectConditionSetsRequest\0327.policy.subje" + + "ctmapping.ListSubjectConditionSetsRespon" + + "se\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022\253\001\n\026" + + "GetSubjectConditionSet\0224.policy.subjectm" + + "apping.GetSubjectConditionSetRequest\0325.p" + + "olicy.subjectmapping.GetSubjectCondition" + + "SetResponse\"$\202\323\344\223\002\036\022\034/subject-condition-" + + "sets/{id}\022\262\001\n\031CreateSubjectConditionSet\022" + + "7.policy.subjectmapping.CreateSubjectCon" + + "ditionSetRequest\0328.policy.subjectmapping" + + ".CreateSubjectConditionSetResponse\"\"\202\323\344\223" + + "\002\034\"\027/subject-condition-sets:\001*\022\267\001\n\031Updat" + + "eSubjectConditionSet\0227.policy.subjectmap" + + "ping.UpdateSubjectConditionSetRequest\0328." + + "policy.subjectmapping.UpdateSubjectCondi" + + "tionSetResponse\"\'\202\323\344\223\002!2\034/subject-condit" + + "ion-sets/{id}:\001*\022\264\001\n\031DeleteSubjectCondit" + + "ionSet\0227.policy.subjectmapping.DeleteSub" + + "jectConditionSetRequest\0328.policy.subject" + + "mapping.DeleteSubjectConditionSetRespons" + + "e\"$\202\323\344\223\002\036*\034/subject-condition-sets/{id}B" + + "\364\001\n)io.opentdf.platform.policy.subjectma" + + "ppingB\023SubjectMappingProtoP\001Z=github.com" + + "/opentdf/platform/protocol/go/policy/sub" + + "jectmapping\242\002\003PSX\252\002\025Policy.Subjectmappin" + + "g\312\002\025Policy\\Subjectmapping\342\002!Policy\\Subje" + + "ctmapping\\GPBMetadata\352\002\026Policy::Subjectm" + + "appingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -421,7 +426,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor, - new java.lang.String[] { "Id", }); + new java.lang.String[] { "SubjectMapping", }); internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor = getDescriptor().getMessageTypes().get(14); internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable = new @@ -433,7 +438,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor, - new java.lang.String[] { "Id", }); + new java.lang.String[] { "SubjectMapping", }); internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_descriptor = getDescriptor().getMessageTypes().get(16); internal_static_policy_subjectmapping_DeleteSubjectMappingRequest_fieldAccessorTable = new @@ -445,7 +450,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectMappingResponse_descriptor, - new java.lang.String[] { "Id", }); + new java.lang.String[] { "SubjectMapping", }); internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_descriptor = getDescriptor().getMessageTypes().get(18); internal_static_policy_subjectmapping_GetSubjectConditionSetRequest_fieldAccessorTable = new diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java index 54c0dffe01..3d531f5018 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponse.java @@ -17,7 +17,6 @@ private UpdateSubjectMappingResponse(com.google.protobuf.GeneratedMessageV3.Buil super(builder); } private UpdateSubjectMappingResponse() { - id_ = ""; } @java.lang.Override @@ -40,43 +39,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.Builder.class); } - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; + private int bitField0_; + public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. */ @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; - } + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. */ @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 io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + /** + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; } private byte memoizedIsInitialized = -1; @@ -93,8 +92,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(1, getSubjectMapping()); } getUnknownFields().writeTo(output); } @@ -105,8 +104,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(1, getSubjectMapping()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -123,8 +123,11 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse) obj; - if (!getId() - .equals(other.getId())) return false; + if (hasSubjectMapping() != other.hasSubjectMapping()) return false; + if (hasSubjectMapping()) { + if (!getSubjectMapping() + .equals(other.getSubjectMapping())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -136,8 +139,10 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); + if (hasSubjectMapping()) { + hash = (37 * hash) + SUBJECT_MAPPING_FIELD_NUMBER; + hash = (53 * hash) + getSubjectMapping().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -257,19 +262,29 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectMappingFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - id_ = ""; + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } return this; } @@ -303,9 +318,14 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse bu private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; + result.subjectMapping_ = subjectMappingBuilder_ == null + ? subjectMapping_ + : subjectMappingBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -352,10 +372,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingResponse.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); + if (other.hasSubjectMapping()) { + mergeSubjectMapping(other.getSubjectMapping()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -384,7 +402,9 @@ public Builder mergeFrom( done = true; break; case 10: { - id_ = input.readStringRequireUtf8(); + input.readMessage( + getSubjectMappingFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -405,76 +425,161 @@ public Builder mergeFrom( } private int bitField0_; - private java.lang.Object id_ = ""; + private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> subjectMappingBuilder_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. */ - 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; + public boolean hasSubjectMapping() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping() { + if (subjectMappingBuilder_ == null) { + return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; } else { - return (java.lang.String) ref; + return subjectMappingBuilder_.getMessage(); } } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - 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; + public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectMapping_ = value; } else { - return (com.google.protobuf.ByteString) ref; + subjectMappingBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; + public Builder setSubjectMapping( + io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder builderForValue) { + if (subjectMappingBuilder_ == null) { + subjectMapping_ = builderForValue.build(); + } else { + subjectMappingBuilder_.setMessage(builderForValue.build()); + } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); + public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { + if (subjectMappingBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectMapping_ != null && + subjectMapping_ != io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance()) { + getSubjectMappingBuilder().mergeFrom(value); + } else { + subjectMapping_ = value; + } + } else { + subjectMappingBuilder_.mergeFrom(value); + } + if (subjectMapping_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public Builder clearSubjectMapping() { bitField0_ = (bitField0_ & ~0x00000001); + subjectMapping_ = null; + if (subjectMappingBuilder_ != null) { + subjectMappingBuilder_.dispose(); + subjectMappingBuilder_ = null; + } onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; + public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder getSubjectMappingBuilder() { bitField0_ |= 0x00000001; onChanged(); - return this; + return getSubjectMappingFieldBuilder().getBuilder(); + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { + if (subjectMappingBuilder_ != null) { + return subjectMappingBuilder_.getMessageOrBuilder(); + } else { + return subjectMapping_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; + } + } + /** + *
    +     * Only ID of the updated Subject Mapping provided
    +     * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> + getSubjectMappingFieldBuilder() { + if (subjectMappingBuilder_ == null) { + subjectMappingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder>( + getSubjectMapping(), + getParentForChildren(), + isClean()); + subjectMapping_ = null; + } + return subjectMappingBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java index e77471a2be..46fd125189 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingResponseOrBuilder.java @@ -9,14 +9,29 @@ public interface UpdateSubjectMappingResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return Whether the subjectMapping field is set. */ - java.lang.String getId(); + boolean hasSubjectMapping(); /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + * @return The subjectMapping. */ - com.google.protobuf.ByteString - getIdBytes(); + io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping(); + /** + *
    +   * Only ID of the updated Subject Mapping provided
    +   * 
    + * + * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 50004b17c2..6ab64c4b83 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -230,7 +230,8 @@ message CreateSubjectMappingRequest{ repeated authorization.Action actions = 5 [(buf.validate.field).repeated.min_items = 1]; } message CreateSubjectMappingResponse { - string id = 1; + // Only ID of the updated Subject Mapping provided + SubjectMapping subject_mapping = 1; } message UpdateSubjectMappingRequest { @@ -245,14 +246,16 @@ message UpdateSubjectMappingRequest { repeated authorization.Action update_actions = 5; } message UpdateSubjectMappingResponse { - string id = 1; + // Only ID of the updated Subject Mapping provided + SubjectMapping subject_mapping = 1; } message DeleteSubjectMappingRequest { string id = 1 [(buf.validate.field).required = true]; } message DeleteSubjectMappingResponse { - string id = 1; + // Only ID of the updated Subject Mapping provided + SubjectMapping subject_mapping = 1; } /** From 77bf8ba7eef35c2d075bc006c8b95c7d8f767322 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 09:19:39 -0400 Subject: [PATCH 29/39] sync up subject condition set RPCs as well --- docs/grpc/index.html | 18 +- .../subject_mapping.swagger.json | 15 +- .../subjectmapping/subject_mapping.pb.go | 448 +++++++++--------- .../CreateSubjectConditionSetResponse.java | 289 +++++++---- ...eSubjectConditionSetResponseOrBuilder.java | 29 +- .../DeleteSubjectConditionSetResponse.java | 289 +++++++---- ...eSubjectConditionSetResponseOrBuilder.java | 29 +- .../subjectmapping/SubjectMappingProto.java | 158 +++--- .../UpdateSubjectConditionSetResponse.java | 289 +++++++---- ...eSubjectConditionSetResponseOrBuilder.java | 29 +- .../subjectmapping/subject_mapping.proto | 9 +- 11 files changed, 998 insertions(+), 604 deletions(-) diff --git a/docs/grpc/index.html b/docs/grpc/index.html index f7026289dc..1ff640f98a 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -4944,10 +4944,10 @@

    CreateSubjectCo - id - string + subject_condition_set + SubjectConditionSet -

    +

    Only ID of created Subject Condition Set provided

    @@ -5068,10 +5068,10 @@

    DeleteSubjectCo - id - string + subject_condition_set + SubjectConditionSet -

    +

    Only ID of created Subject Condition Set provided

    @@ -5567,10 +5567,10 @@

    UpdateSubjectCo - id - string + subject_condition_set + SubjectConditionSet -

    +

    Only ID of created Subject Condition Set provided

    diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 6c037304b9..1ca16be56c 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -681,8 +681,9 @@ "subjectmappingCreateSubjectConditionSetResponse": { "type": "object", "properties": { - "id": { - "type": "string" + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSet", + "title": "Only ID of created Subject Condition Set provided" } } }, @@ -726,8 +727,9 @@ "subjectmappingDeleteSubjectConditionSetResponse": { "type": "object", "properties": { - "id": { - "type": "string" + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSet", + "title": "Only ID of created Subject Condition Set provided" } } }, @@ -905,8 +907,9 @@ "subjectmappingUpdateSubjectConditionSetResponse": { "type": "object", "properties": { - "id": { - "type": "string" + "subjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSet", + "title": "Only ID of created Subject Condition Set provided" } } }, diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 74ad718dc8..1a6cd35853 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -1447,7 +1447,8 @@ type CreateSubjectConditionSetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Only ID of created Subject Condition Set provided + SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` } func (x *CreateSubjectConditionSetResponse) Reset() { @@ -1482,11 +1483,11 @@ func (*CreateSubjectConditionSetResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{24} } -func (x *CreateSubjectConditionSetResponse) GetId() string { +func (x *CreateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { if x != nil { - return x.Id + return x.SubjectConditionSet } - return "" + return nil } type UpdateSubjectConditionSetRequest struct { @@ -1558,7 +1559,8 @@ type UpdateSubjectConditionSetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Only ID of created Subject Condition Set provided + SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` } func (x *UpdateSubjectConditionSetResponse) Reset() { @@ -1593,11 +1595,11 @@ func (*UpdateSubjectConditionSetResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{26} } -func (x *UpdateSubjectConditionSetResponse) GetId() string { +func (x *UpdateSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { if x != nil { - return x.Id + return x.SubjectConditionSet } - return "" + return nil } type DeleteSubjectConditionSetRequest struct { @@ -1652,7 +1654,8 @@ type DeleteSubjectConditionSetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Only ID of created Subject Condition Set provided + SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` } func (x *DeleteSubjectConditionSetResponse) Reset() { @@ -1687,11 +1690,11 @@ func (*DeleteSubjectConditionSetResponse) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{28} } -func (x *DeleteSubjectConditionSetResponse) GetId() string { +func (x *DeleteSubjectConditionSetResponse) GetSubjectConditionSet() *SubjectConditionSet { if x != nil { - return x.Id + return x.SubjectConditionSet } - return "" + return nil } var File_policy_subjectmapping_subject_mapping_proto protoreflect.FileDescriptor @@ -1922,187 +1925,203 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x2e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x33, - 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x22, 0xcf, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x33, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, + 0x01, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, + 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 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, 0x33, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 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, + 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, + 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, + 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 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, 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, 0xe0, 0x0e, 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, + 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, + 0xe0, 0x0e, 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, 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, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, - 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, - 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, - 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, - 0x01, 0x2a, 0x32, 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, 0x12, 0xac, 0x01, 0x0a, - 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, - 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, - 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, - 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x73, + 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, + 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x12, 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, + 0x67, 0x12, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, - 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, + 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, 0x21, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 0x43, 0x6f, 0x6e, 0x64, + 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, 0x12, + 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, + 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x38, 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, + 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, + 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, + 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, + 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, + 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 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, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 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 ( @@ -2187,35 +2206,38 @@ var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 35, // 26: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable 4, // 27: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet 24, // 28: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 35, // 29: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable - 4, // 30: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet - 8, // 31: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest - 12, // 32: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest - 10, // 33: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest - 14, // 34: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest - 16, // 35: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest - 18, // 36: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest - 22, // 37: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest - 20, // 38: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest - 25, // 39: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest - 27, // 40: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest - 29, // 41: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest - 9, // 42: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse - 13, // 43: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse - 11, // 44: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse - 15, // 45: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse - 17, // 46: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse - 19, // 47: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse - 23, // 48: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse - 21, // 49: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse - 26, // 50: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse - 28, // 51: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse - 30, // 52: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse - 42, // [42:53] is the sub-list for method output_type - 31, // [31:42] is the sub-list for method input_type - 31, // [31:31] is the sub-list for extension type_name - 31, // [31:31] is the sub-list for extension extendee - 0, // [0:31] is the sub-list for field type_name + 5, // 29: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 35, // 30: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable + 4, // 31: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet + 5, // 32: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 5, // 33: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 8, // 34: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 35: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 36: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 14, // 37: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 16, // 38: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 18, // 39: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 22, // 40: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest + 20, // 41: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest + 25, // 42: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest + 27, // 43: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest + 29, // 44: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest + 9, // 45: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 46: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 47: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 15, // 48: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 17, // 49: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 19, // 50: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 23, // 51: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse + 21, // 52: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse + 26, // 53: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse + 28, // 54: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse + 30, // 55: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse + 45, // [45:56] is the sub-list for method output_type + 34, // [34:45] is the sub-list for method input_type + 34, // [34:34] is the sub-list for extension type_name + 34, // [34:34] is the sub-list for extension extendee + 0, // [0:34] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java index 5ba40add57..8496952ed9 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java @@ -17,7 +17,6 @@ private CreateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3 super(builder); } private CreateSubjectConditionSetResponse() { - id_ = ""; } @java.lang.Override @@ -40,43 +39,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.Builder.class); } - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ @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; - } + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. */ @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 io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } private byte memoizedIsInitialized = -1; @@ -93,8 +92,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(1, getSubjectConditionSet()); } getUnknownFields().writeTo(output); } @@ -105,8 +104,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(1, getSubjectConditionSet()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -123,8 +123,11 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse) obj; - if (!getId() - .equals(other.getId())) return false; + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -136,8 +139,10 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -257,19 +262,29 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - id_ = ""; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } return this; } @@ -303,9 +318,14 @@ public io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetRespon private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -352,10 +372,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectConditionSetResponse.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -384,7 +402,9 @@ public Builder mergeFrom( done = true; break; case 10: { - id_ = input.readStringRequireUtf8(); + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -405,76 +425,161 @@ public Builder mergeFrom( } private int bitField0_; - private java.lang.Object id_ = ""; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ - 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; + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } else { - return (java.lang.String) ref; + return subjectConditionSetBuilder_.getMessage(); } } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - 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; + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; } else { - return (com.google.protobuf.ByteString) ref; + subjectConditionSetBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { bitField0_ |= 0x00000001; onChanged(); - return this; + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java index f9e50081c4..644321b993 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java @@ -9,14 +9,29 @@ public interface CreateSubjectConditionSetResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ - java.lang.String getId(); + boolean hasSubjectConditionSet(); /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. */ - com.google.protobuf.ByteString - getIdBytes(); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); + /** + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java index 4811b9a03c..6bffddd83d 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java @@ -17,7 +17,6 @@ private DeleteSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3 super(builder); } private DeleteSubjectConditionSetResponse() { - id_ = ""; } @java.lang.Override @@ -40,43 +39,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.Builder.class); } - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ @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; - } + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. */ @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 io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } private byte memoizedIsInitialized = -1; @@ -93,8 +92,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(1, getSubjectConditionSet()); } getUnknownFields().writeTo(output); } @@ -105,8 +104,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(1, getSubjectConditionSet()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -123,8 +123,11 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse) obj; - if (!getId() - .equals(other.getId())) return false; + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -136,8 +139,10 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -257,19 +262,29 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - id_ = ""; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } return this; } @@ -303,9 +318,14 @@ public io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetRespon private void buildPartial0(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -352,10 +372,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.DeleteSubjectConditionSetResponse.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -384,7 +402,9 @@ public Builder mergeFrom( done = true; break; case 10: { - id_ = input.readStringRequireUtf8(); + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -405,76 +425,161 @@ public Builder mergeFrom( } private int bitField0_; - private java.lang.Object id_ = ""; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ - 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; + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } else { - return (java.lang.String) ref; + return subjectConditionSetBuilder_.getMessage(); } } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - 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; + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; } else { - return (com.google.protobuf.ByteString) ref; + subjectConditionSetBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { bitField0_ |= 0x00000001; onChanged(); - return this; + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java index 37cab35938..1a2a6cc237 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java @@ -9,14 +9,29 @@ public interface DeleteSubjectConditionSetResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ - java.lang.String getId(); + boolean hasSubjectConditionSet(); /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. */ - com.google.protobuf.ByteString - getIdBytes(); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); + /** + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); } 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 e1ac70e725..9469715196 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 @@ -259,79 +259,85 @@ public static void registerAllExtensions( "CreateSubjectConditionSetRequest\022d\n\025subj" + "ect_condition_set\030\001 \001(\01320.policy.subject" + "mapping.SubjectConditionSetCreateR\023subje" + - "ctConditionSet\"3\n!CreateSubjectCondition" + - "SetResponse\022\016\n\002id\030\001 \001(\tR\002id\"\317\001\n UpdateSu" + - "bjectConditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H" + - "\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132\027.comm" + - "on.MetadataMutableR\016updateMetadata\022Q\n\023up" + - "date_subject_sets\030\003 \003(\0132!.policy.subject" + - "mapping.SubjectSetR\021updateSubjectSets\"3\n" + - "!UpdateSubjectConditionSetResponse\022\016\n\002id" + - "\030\001 \001(\tR\002id\":\n DeleteSubjectConditionSetR" + - "equest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"3\n!Delete" + - "SubjectConditionSetResponse\022\016\n\002id\030\001 \001(\tR" + - "\002id*\233\001\n\032SubjectMappingOperatorEnum\022-\n)SU" + - "BJECT_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\'CONDIT" + - "ION_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022#\n\037C" + - "ONDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036COND" + - "ITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n\025Subject" + - "MappingService\022\251\001\n\024MatchSubjectMappings\022" + - "2.policy.subjectmapping.MatchSubjectMapp" + - "ingsRequest\0323.policy.subjectmapping.Matc" + - "hSubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/subje" + - "ct-mappings/match:\007subject\022\227\001\n\023ListSubje" + - "ctMappings\0221.policy.subjectmapping.ListS" + - "ubjectMappingsRequest\0322.policy.subjectma" + - "pping.ListSubjectMappingsResponse\"\031\202\323\344\223\002" + - "\023\022\021/subject-mappings\022\226\001\n\021GetSubjectMappi" + - "ng\022/.policy.subjectmapping.GetSubjectMap" + - "pingRequest\0320.policy.subjectmapping.GetS" + - "ubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subject-" + - "mappings/{id}\022\235\001\n\024CreateSubjectMapping\0222" + - ".policy.subjectmapping.CreateSubjectMapp" + - "ingRequest\0323.policy.subjectmapping.Creat" + - "eSubjectMappingResponse\"\034\202\323\344\223\002\026\"\021/subjec" + - "t-mappings:\001*\022\242\001\n\024UpdateSubjectMapping\0222" + - ".policy.subjectmapping.UpdateSubjectMapp" + - "ingRequest\0323.policy.subjectmapping.Updat" + - "eSubjectMappingResponse\"!\202\323\344\223\002\0332\026/subjec" + - "t-mappings/{id}:\001*\022\237\001\n\024DeleteSubjectMapp" + - "ing\0222.policy.subjectmapping.DeleteSubjec" + - "tMappingRequest\0323.policy.subjectmapping." + - "DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030*\026/s" + - "ubject-mappings/{id}\022\254\001\n\030ListSubjectCond" + - "itionSets\0226.policy.subjectmapping.ListSu" + - "bjectConditionSetsRequest\0327.policy.subje" + - "ctmapping.ListSubjectConditionSetsRespon" + - "se\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022\253\001\n\026" + - "GetSubjectConditionSet\0224.policy.subjectm" + - "apping.GetSubjectConditionSetRequest\0325.p" + - "olicy.subjectmapping.GetSubjectCondition" + - "SetResponse\"$\202\323\344\223\002\036\022\034/subject-condition-" + - "sets/{id}\022\262\001\n\031CreateSubjectConditionSet\022" + - "7.policy.subjectmapping.CreateSubjectCon" + - "ditionSetRequest\0328.policy.subjectmapping" + - ".CreateSubjectConditionSetResponse\"\"\202\323\344\223" + - "\002\034\"\027/subject-condition-sets:\001*\022\267\001\n\031Updat" + - "eSubjectConditionSet\0227.policy.subjectmap" + - "ping.UpdateSubjectConditionSetRequest\0328." + - "policy.subjectmapping.UpdateSubjectCondi" + - "tionSetResponse\"\'\202\323\344\223\002!2\034/subject-condit" + - "ion-sets/{id}:\001*\022\264\001\n\031DeleteSubjectCondit" + - "ionSet\0227.policy.subjectmapping.DeleteSub" + - "jectConditionSetRequest\0328.policy.subject" + - "mapping.DeleteSubjectConditionSetRespons" + - "e\"$\202\323\344\223\002\036*\034/subject-condition-sets/{id}B" + - "\364\001\n)io.opentdf.platform.policy.subjectma" + - "ppingB\023SubjectMappingProtoP\001Z=github.com" + - "/opentdf/platform/protocol/go/policy/sub" + - "jectmapping\242\002\003PSX\252\002\025Policy.Subjectmappin" + - "g\312\002\025Policy\\Subjectmapping\342\002!Policy\\Subje" + - "ctmapping\\GPBMetadata\352\002\026Policy::Subjectm" + - "appingb\006proto3" + "ctConditionSet\"\203\001\n!CreateSubjectConditio" + + "nSetResponse\022^\n\025subject_condition_set\030\001 " + + "\001(\0132*.policy.subjectmapping.SubjectCondi" + + "tionSetR\023subjectConditionSet\"\317\001\n UpdateS" + + "ubjectConditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272" + + "H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132\027.com" + + "mon.MetadataMutableR\016updateMetadata\022Q\n\023u" + + "pdate_subject_sets\030\003 \003(\0132!.policy.subjec" + + "tmapping.SubjectSetR\021updateSubjectSets\"\203" + + "\001\n!UpdateSubjectConditionSetResponse\022^\n\025" + + "subject_condition_set\030\001 \001(\0132*.policy.sub" + + "jectmapping.SubjectConditionSetR\023subject" + + "ConditionSet\":\n DeleteSubjectConditionSe" + + "tRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\203\001\n!Del" + + "eteSubjectConditionSetResponse\022^\n\025subjec" + + "t_condition_set\030\001 \001(\0132*.policy.subjectma" + + "pping.SubjectConditionSetR\023subjectCondit" + + "ionSet*\233\001\n\032SubjectMappingOperatorEnum\022-\n" + + ")SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFI" + + "ED\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\'CON" + + "DITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022#" + + "\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036C" + + "ONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n\025Subj" + + "ectMappingService\022\251\001\n\024MatchSubjectMappin" + + "gs\0222.policy.subjectmapping.MatchSubjectM" + + "appingsRequest\0323.policy.subjectmapping.M" + + "atchSubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/su" + + "bject-mappings/match:\007subject\022\227\001\n\023ListSu" + + "bjectMappings\0221.policy.subjectmapping.Li" + + "stSubjectMappingsRequest\0322.policy.subjec" + + "tmapping.ListSubjectMappingsResponse\"\031\202\323" + + "\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSubjectMa" + + "pping\022/.policy.subjectmapping.GetSubject" + + "MappingRequest\0320.policy.subjectmapping.G" + + "etSubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subje" + + "ct-mappings/{id}\022\235\001\n\024CreateSubjectMappin" + + "g\0222.policy.subjectmapping.CreateSubjectM" + + "appingRequest\0323.policy.subjectmapping.Cr" + + "eateSubjectMappingResponse\"\034\202\323\344\223\002\026\"\021/sub" + + "ject-mappings:\001*\022\242\001\n\024UpdateSubjectMappin" + + "g\0222.policy.subjectmapping.UpdateSubjectM" + + "appingRequest\0323.policy.subjectmapping.Up" + + "dateSubjectMappingResponse\"!\202\323\344\223\002\0332\026/sub" + + "ject-mappings/{id}:\001*\022\237\001\n\024DeleteSubjectM" + + "apping\0222.policy.subjectmapping.DeleteSub" + + "jectMappingRequest\0323.policy.subjectmappi" + + "ng.DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030*" + + "\026/subject-mappings/{id}\022\254\001\n\030ListSubjectC" + + "onditionSets\0226.policy.subjectmapping.Lis" + + "tSubjectConditionSetsRequest\0327.policy.su" + + "bjectmapping.ListSubjectConditionSetsRes" + + "ponse\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022\253" + + "\001\n\026GetSubjectConditionSet\0224.policy.subje" + + "ctmapping.GetSubjectConditionSetRequest\032" + + "5.policy.subjectmapping.GetSubjectCondit" + + "ionSetResponse\"$\202\323\344\223\002\036\022\034/subject-conditi" + + "on-sets/{id}\022\262\001\n\031CreateSubjectConditionS" + + "et\0227.policy.subjectmapping.CreateSubject" + + "ConditionSetRequest\0328.policy.subjectmapp" + + "ing.CreateSubjectConditionSetResponse\"\"\202" + + "\323\344\223\002\034\"\027/subject-condition-sets:\001*\022\267\001\n\031Up" + + "dateSubjectConditionSet\0227.policy.subject" + + "mapping.UpdateSubjectConditionSetRequest" + + "\0328.policy.subjectmapping.UpdateSubjectCo" + + "nditionSetResponse\"\'\202\323\344\223\002!2\034/subject-con" + + "dition-sets/{id}:\001*\022\264\001\n\031DeleteSubjectCon" + + "ditionSet\0227.policy.subjectmapping.Delete" + + "SubjectConditionSetRequest\0328.policy.subj" + + "ectmapping.DeleteSubjectConditionSetResp" + + "onse\"$\202\323\344\223\002\036*\034/subject-condition-sets/{i" + + "d}B\364\001\n)io.opentdf.platform.policy.subjec" + + "tmappingB\023SubjectMappingProtoP\001Z=github." + + "com/opentdf/platform/protocol/go/policy/" + + "subjectmapping\242\002\003PSX\252\002\025Policy.Subjectmap" + + "ping\312\002\025Policy\\Subjectmapping\342\002!Policy\\Su" + + "bjectmapping\\GPBMetadata\352\002\026Policy::Subje" + + "ctmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -492,7 +498,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "Id", }); + new java.lang.String[] { "SubjectConditionSet", }); internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor = getDescriptor().getMessageTypes().get(25); internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new @@ -504,7 +510,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "Id", }); + new java.lang.String[] { "SubjectConditionSet", }); internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_descriptor = getDescriptor().getMessageTypes().get(27); internal_static_policy_subjectmapping_DeleteSubjectConditionSetRequest_fieldAccessorTable = new @@ -516,7 +522,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_DeleteSubjectConditionSetResponse_descriptor, - new java.lang.String[] { "Id", }); + new java.lang.String[] { "SubjectConditionSet", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(build.buf.validate.ValidateProto.field); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java index 3128676bc5..e122e14c56 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java @@ -17,7 +17,6 @@ private UpdateSubjectConditionSetResponse(com.google.protobuf.GeneratedMessageV3 super(builder); } private UpdateSubjectConditionSetResponse() { - id_ = ""; } @java.lang.Override @@ -40,43 +39,43 @@ protected java.lang.Object newInstance( io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.class, io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.Builder.class); } - public static final int ID_FIELD_NUMBER = 1; - @SuppressWarnings("serial") - private volatile java.lang.Object id_ = ""; + private int bitField0_; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ @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; - } + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. */ @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 io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + /** + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + @java.lang.Override + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } private byte memoizedIsInitialized = -1; @@ -93,8 +92,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(1, getSubjectConditionSet()); } getUnknownFields().writeTo(output); } @@ -105,8 +104,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(1, getSubjectConditionSet()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -123,8 +123,11 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other = (io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse) obj; - if (!getId() - .equals(other.getId())) return false; + if (hasSubjectConditionSet() != other.hasSubjectConditionSet()) return false; + if (hasSubjectConditionSet()) { + if (!getSubjectConditionSet() + .equals(other.getSubjectConditionSet())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -136,8 +139,10 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); + if (hasSubjectConditionSet()) { + hash = (37 * hash) + SUBJECT_CONDITION_SET_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSet().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -257,19 +262,29 @@ public static final class Builder extends // Construct using io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.newBuilder() private Builder() { - + maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getSubjectConditionSetFieldBuilder(); + } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - id_ = ""; + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } return this; } @@ -303,9 +318,14 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRespon private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse result) { int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.id_ = id_; + result.subjectConditionSet_ = subjectConditionSetBuilder_ == null + ? subjectConditionSet_ + : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; } + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -352,10 +372,8 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse other) { if (other == io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetResponse.getDefaultInstance()) return this; - if (!other.getId().isEmpty()) { - id_ = other.id_; - bitField0_ |= 0x00000001; - onChanged(); + if (other.hasSubjectConditionSet()) { + mergeSubjectConditionSet(other.getSubjectConditionSet()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -384,7 +402,9 @@ public Builder mergeFrom( done = true; break; case 10: { - id_ = input.readStringRequireUtf8(); + input.readMessage( + getSubjectConditionSetFieldBuilder().getBuilder(), + extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 @@ -405,76 +425,161 @@ public Builder mergeFrom( } private int bitField0_; - private java.lang.Object id_ = ""; + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ - 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; + public boolean hasSubjectConditionSet() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { + if (subjectConditionSetBuilder_ == null) { + return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } else { - return (java.lang.String) ref; + return subjectConditionSetBuilder_.getMessage(); } } /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - 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; + public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + subjectConditionSet_ = value; } else { - return (com.google.protobuf.ByteString) ref; + subjectConditionSetBuilder_.setMessage(value); } + bitField0_ |= 0x00000001; + onChanged(); + return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The id to set. - * @return This builder for chaining. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - public Builder setId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - id_ = value; + public Builder setSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSet_ = builderForValue.build(); + } else { + subjectConditionSetBuilder_.setMessage(builderForValue.build()); + } bitField0_ |= 0x00000001; onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @return This builder for chaining. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - public Builder clearId() { - id_ = getDefaultInstance().getId(); + public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { + if (subjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0) && + subjectConditionSet_ != null && + subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { + getSubjectConditionSetBuilder().mergeFrom(value); + } else { + subjectConditionSet_ = value; + } + } else { + subjectConditionSetBuilder_.mergeFrom(value); + } + if (subjectConditionSet_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } + return this; + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public Builder clearSubjectConditionSet() { bitField0_ = (bitField0_ & ~0x00000001); + subjectConditionSet_ = null; + if (subjectConditionSetBuilder_ != null) { + subjectConditionSetBuilder_.dispose(); + subjectConditionSetBuilder_ = null; + } onChanged(); return this; } /** - * string id = 1 [json_name = "id"]; - * @param value The bytes for id to set. - * @return This builder for chaining. + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ - public Builder setIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - id_ = value; + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { bitField0_ |= 0x00000001; onChanged(); - return this; + return getSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { + if (subjectConditionSetBuilder_ != null) { + return subjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return subjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; + } + } + /** + *
    +     * Only ID of created Subject Condition Set provided
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> + getSubjectConditionSetFieldBuilder() { + if (subjectConditionSetBuilder_ == null) { + subjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder>( + getSubjectConditionSet(), + getParentForChildren(), + isClean()); + subjectConditionSet_ = null; + } + return subjectConditionSetBuilder_; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java index fbfd1bc96c..f4e8fea99c 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java @@ -9,14 +9,29 @@ public interface UpdateSubjectConditionSetResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - * string id = 1 [json_name = "id"]; - * @return The id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return Whether the subjectConditionSet field is set. */ - java.lang.String getId(); + boolean hasSubjectConditionSet(); /** - * string id = 1 [json_name = "id"]; - * @return The bytes for id. + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + * @return The subjectConditionSet. */ - com.google.protobuf.ByteString - getIdBytes(); + io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); + /** + *
    +   * Only ID of created Subject Condition Set provided
    +   * 
    + * + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; + */ + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 6ab64c4b83..157d7de981 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -286,7 +286,8 @@ message CreateSubjectConditionSetRequest { SubjectConditionSetCreate subject_condition_set = 1; } message CreateSubjectConditionSetResponse { - string id = 1; + // Only ID of created Subject Condition Set provided + SubjectConditionSet subject_condition_set = 1; } message UpdateSubjectConditionSetRequest { @@ -298,14 +299,16 @@ message UpdateSubjectConditionSetRequest { repeated SubjectSet update_subject_sets = 3; } message UpdateSubjectConditionSetResponse { - string id = 1; + // Only ID of created Subject Condition Set provided + SubjectConditionSet subject_condition_set = 1; } message DeleteSubjectConditionSetRequest { string id = 1 [(buf.validate.field).required = true]; } message DeleteSubjectConditionSetResponse { - string id = 1; + // Only ID of created Subject Condition Set provided + SubjectConditionSet subject_condition_set = 1; } From a871c40c39e64112faa5737a2ef4e182a0504fd7 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 09:20:00 -0400 Subject: [PATCH 30/39] match rpc handlers to proto expectations --- .../policy/subjectmapping/subject_mapping.go | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index bbb550b2b6..0289ea3714 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -39,12 +39,12 @@ func (s SubjectMappingService) CreateSubjectMapping(ctx context.Context, rsp := &sm.CreateSubjectMappingResponse{} slog.Debug("creating subject mapping") - id, err := s.dbClient.CreateSubjectMapping(context.Background(), req) + sm, err := s.dbClient.CreateSubjectMapping(context.Background(), req) if err != nil { return nil, services.HandleError(err, services.ErrCreationFailed, slog.String("subjectMapping", req.String())) } - rsp.Id = id + rsp.SubjectMapping = sm return rsp, nil } @@ -84,12 +84,12 @@ func (s SubjectMappingService) UpdateSubjectMapping(ctx context.Context, rsp := &sm.UpdateSubjectMappingResponse{} slog.Debug("updating subject mapping", slog.String("subjectMapping", req.String())) - id, err := s.dbClient.UpdateSubjectMapping(ctx, req) + sm, err := s.dbClient.UpdateSubjectMapping(ctx, req) if err != nil { return nil, services.HandleError(err, services.ErrUpdateFailed, slog.String("id", req.Id), slog.String("subjectMapping fields", req.String())) } - rsp.Id = id + rsp.SubjectMapping = sm return rsp, nil } @@ -99,12 +99,12 @@ func (s SubjectMappingService) DeleteSubjectMapping(ctx context.Context, rsp := &sm.DeleteSubjectMappingResponse{} slog.Debug("deleting subject mapping", slog.String("id", req.Id)) - id, err := s.dbClient.DeleteSubjectMapping(ctx, req.Id) + sm, err := s.dbClient.DeleteSubjectMapping(ctx, req.Id) if err != nil { return nil, services.HandleError(err, services.ErrDeletionFailed, slog.String("id", req.Id)) } - rsp.Id = id + rsp.SubjectMapping = sm return rsp, nil } @@ -148,12 +148,12 @@ func (s SubjectMappingService) CreateSubjectConditionSet(ctx context.Context, rsp := &sm.CreateSubjectConditionSetResponse{} slog.Debug("creating subject condition set", slog.String("subjectConditionSet", req.String())) - id, err := s.dbClient.CreateSubjectConditionSet(context.Background(), req.SubjectConditionSet) + conditionSet, err := s.dbClient.CreateSubjectConditionSet(context.Background(), req.SubjectConditionSet) if err != nil { return nil, services.HandleError(err, services.ErrCreationFailed, slog.String("subjectConditionSet", req.String())) } - rsp.Id = id + rsp.SubjectConditionSet = conditionSet return rsp, nil } @@ -163,12 +163,12 @@ func (s SubjectMappingService) UpdateSubjectConditionSet(ctx context.Context, rsp := &sm.UpdateSubjectConditionSetResponse{} slog.Debug("updating subject condition set", slog.String("subjectConditionSet", req.String())) - id, err := s.dbClient.UpdateSubjectConditionSet(ctx, req) + conditionSet, err := s.dbClient.UpdateSubjectConditionSet(ctx, req) if err != nil { return nil, services.HandleError(err, services.ErrUpdateFailed, slog.String("id", req.Id), slog.String("subjectConditionSet fields", req.String())) } - rsp.Id = id + rsp.SubjectConditionSet = conditionSet return rsp, nil } @@ -178,11 +178,11 @@ func (s SubjectMappingService) DeleteSubjectConditionSet(ctx context.Context, rsp := &sm.DeleteSubjectConditionSetResponse{} slog.Debug("deleting subject condition set", slog.String("id", req.Id)) - id, err := s.dbClient.DeleteSubjectConditionSet(ctx, req.Id) + conditionSet, err := s.dbClient.DeleteSubjectConditionSet(ctx, req.Id) if err != nil { return nil, services.HandleError(err, services.ErrDeletionFailed, slog.String("id", req.Id)) } - rsp.Id = id + rsp.SubjectConditionSet = conditionSet return rsp, nil } From 795e6262e40c4ff5db84e1d370641e814a920ed0 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 09:20:58 -0400 Subject: [PATCH 31/39] tiny test fixes to namespaces after merging --- integration/attribute_values_test.go | 2 +- integration/attributes_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/attribute_values_test.go b/integration/attribute_values_test.go index d71381bbd2..c3a6d4b9e9 100644 --- a/integration/attribute_values_test.go +++ b/integration/attribute_values_test.go @@ -289,7 +289,7 @@ func setupDeactivateAttributeValue(s *AttributeValuesSuite) (string, string, str Name: "cascading-deactivate-attribute-value.com", }) assert.Nil(s.T(), err) - assert.NotZero(s.T(), nsId) + assert.NotZero(s.T(), n.Id) // add an attribute under that namespaces attr := &attributes.CreateAttributeRequest{ diff --git a/integration/attributes_test.go b/integration/attributes_test.go index f1220daa37..f47203060c 100644 --- a/integration/attributes_test.go +++ b/integration/attributes_test.go @@ -384,7 +384,7 @@ func setupCascadeDeactivateAttribute(s *AttributesSuite) (string, string, string Name: "test__cascading-deactivate-ns", }) assert.Nil(s.T(), err) - assert.NotZero(s.T(), nsId) + assert.NotZero(s.T(), n.Id) // add an attribute under that namespaces attr := &attributes.CreateAttributeRequest{ From b781aacaa32ee65c510b718fca0f62e6a12781a2 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 09:36:41 -0400 Subject: [PATCH 32/39] further sync up with Policy API proto/rpc behavior --- docs/grpc/index.html | 128 +- .../subject_mapping.swagger.json | 96 +- .../subjectmapping/subject_mapping.pb.go | 955 ++++++------ .../policy/subjectmapping/Condition.java | 16 +- .../CreateSubjectMappingRequest.java | 1294 +++++++++-------- .../CreateSubjectMappingRequestOrBuilder.java | 106 +- .../MatchSubjectMappingsRequest.java | 48 + .../MatchSubjectMappingsRequestOrBuilder.java | 12 + .../subjectmapping/SubjectConditionSet.java | 676 +++------ .../SubjectConditionSetCreate.java | 530 ++++--- .../SubjectConditionSetCreateOrBuilder.java | 65 +- .../SubjectConditionSetOrBuilder.java | 80 +- .../policy/subjectmapping/SubjectMapping.java | 540 +++---- .../SubjectMappingOrBuilder.java | 52 +- .../subjectmapping/SubjectMappingProto.java | 312 ++-- .../UpdateSubjectConditionSetRequest.java | 671 ++++++--- ...teSubjectConditionSetRequestOrBuilder.java | 86 +- .../UpdateSubjectMappingRequest.java | 973 ++++++++----- .../UpdateSubjectMappingRequestOrBuilder.java | 95 +- .../subjectmapping/subject_mapping.proto | 144 +- 20 files changed, 3619 insertions(+), 3260 deletions(-) diff --git a/docs/grpc/index.html b/docs/grpc/index.html index 1ff640f98a..7f63277f99 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -4841,7 +4841,7 @@

    policy/subjectmapping/subje

    Condition

    -

    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"]

    }

    +

    A Condition defines a rule of

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

    {

    "subject_external_field": "division",

    "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN",

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

    }

    Example: Subjects that are not part of the Fantastic Four:

    {

    "subject_external_field": "superhero_name",

    "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN",

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

    }

    @@ -4968,24 +4968,26 @@

    CreateSubjectMappingR

    - - + + - + - - - - + + + + - + @@ -4996,10 +4998,10 @@

    CreateSubjectMappingR

    - - - - + + + + @@ -5308,7 +5310,7 @@

    MatchSubjectMappingsR

    - + @@ -5384,10 +5386,10 @@

    SubjectConditionSet

    - - - - + + + + @@ -5397,13 +5399,6 @@

    SubjectConditionSet

    - - - - - - -
    metadatacommon.MetadataMutableattribute_value_idstring

    Required +Attribute Value to be mapped to

    attribute_value_idstring

    Attribute Value to be mapped to

    actionsauthorization.Actionrepeated

    The actions permitted by subjects in this mapping

    existing_subject_condition_set_id string

    Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)

    Either of the following: +Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)

    actionsauthorization.Actionrepeated

    The actions permitted by subjects in this mapping

    metadatacommon.MetadataMutable

    Optional

    subject Subject

    Required

    namestring

    an optional name for ease of reference

    subject_setsSubjectSetrepeated

    subject_setsSubjectSetrepeated

    multiple Subject Sets are evaluated with AND logic

    @@ -5421,18 +5416,19 @@

    SubjectConditionSetCrea - - metadata - common.MetadataMutable - -

    - - subject_sets SubjectSet repeated -

    multiple Subject Sets are evaluated with AND logic

    +

    Required

    + + + + metadata + common.MetadataMutable + +

    Optional +Common metadata

    @@ -5459,13 +5455,6 @@

    SubjectMapping

    - - metadata - common.Metadata - -

    - - attribute_value policy.attributes.Value @@ -5487,6 +5476,13 @@

    SubjectMapping

    The actions permitted by subjects in this mapping

    + + metadata + common.Metadata + +

    + + @@ -5532,21 +5528,29 @@

    UpdateSubjectCon id string -

    +

    Required

    - update_metadata + update_subject_sets + SubjectSet + repeated +

    Optional +If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions

    + + + + metadata common.MetadataMutable -

    +

    Common metadata

    - update_subject_sets - SubjectSet - repeated -

    if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions

    + metadata_update_behavior + common.MetadataUpdateEnum + +

    @@ -5594,30 +5598,38 @@

    UpdateSubjectMappingR id string -

    - - - - update_metadata - common.MetadataMutable - -

    +

    Required

    - update_subject_condition_set_id + subject_condition_set_id string -

    Replaces the existing SubjectConditionSet id with a new one

    +

    Optional +Replaces the existing SubjectConditionSet id with a new one

    - update_actions + actions authorization.Action repeated

    Replaces entire list of actions permitted by subjects

    + + metadata + common.MetadataMutable + +

    Common metadata

    + + + + metadata_update_behavior + common.MetadataUpdateEnum + +

    + + diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 1ca16be56c..169a96cdb6 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -144,6 +144,7 @@ "parameters": [ { "name": "id", + "description": "Required", "in": "path", "required": true, "type": "string" @@ -155,16 +156,20 @@ "schema": { "type": "object", "properties": { - "updateMetadata": { - "$ref": "#/definitions/commonMetadataMutable" - }, "updateSubjectSets": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/subjectmappingSubjectSet" }, - "title": "if provided, replaces entire existing structure of Subject Sets, Condition Groups, \u0026 Conditions" + "title": "Optional\nIf provided, replaces entire existing structure of Subject Sets, Condition Groups, \u0026 Conditions" + }, + "metadata": { + "$ref": "#/definitions/commonMetadataMutable", + "title": "Common metadata" + }, + "metadataUpdateBehavior": { + "$ref": "#/definitions/commonMetadataUpdateEnum" } } } @@ -248,6 +253,7 @@ "parameters": [ { "name": "subject", + "description": "Required", "in": "body", "required": true, "schema": { @@ -336,6 +342,7 @@ "parameters": [ { "name": "id", + "description": "Required", "in": "path", "required": true, "type": "string" @@ -347,20 +354,24 @@ "schema": { "type": "object", "properties": { - "updateMetadata": { - "$ref": "#/definitions/commonMetadataMutable" - }, - "updateSubjectConditionSetId": { + "subjectConditionSetId": { "type": "string", - "title": "Replaces the existing SubjectConditionSet id with a new one" + "title": "Optional\nReplaces the existing SubjectConditionSet id with a new one" }, - "updateActions": { + "actions": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/authorizationAction" }, "title": "Replaces entire list of actions permitted by subjects" + }, + "metadata": { + "$ref": "#/definitions/commonMetadataMutable", + "title": "Common metadata" + }, + "metadataUpdateBehavior": { + "$ref": "#/definitions/commonMetadataUpdateEnum" } } } @@ -486,6 +497,16 @@ } } }, + "commonMetadataUpdateEnum": { + "type": "string", + "enum": [ + "METADATA_UPDATE_ENUM_UNSPECIFIED", + "METADATA_UPDATE_ENUM_EXTEND", + "METADATA_UPDATE_ENUM_REPLACE" + ], + "default": "METADATA_UPDATE_ENUM_UNSPECIFIED", + "title": "- METADATA_UPDATE_ENUM_UNSPECIFIED: unspecified update type\n - METADATA_UPDATE_ENUM_EXTEND: only update the fields that are provided\n - METADATA_UPDATE_ENUM_REPLACE: replace the entire metadata with the provided metadata" + }, "kasregistryKeyAccessServer": { "type": "object", "properties": { @@ -640,7 +661,7 @@ "title": "list of comparison values for the subject_external_field, evaluated by the operator" } }, - "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}", + "description": "Example: Subjects with field \"division\" and a value of \"Accounting\" or \"Marketing\":\n{\n\"subject_external_field\": \"division\",\n\"operator\": \"SUBJECT_MAPPING_OPERATOR_ENUM_IN\",\n\"subject_external_values\" : [\"Accounting\", \"Marketing\"]\n}\n\nExample: Subjects that are not part of the Fantastic Four:\n{\n\"subject_external_field\": \"superhero_name\",\n\"operator\": \"SUBJECT_MAPPING_OPERATOR_ENUM_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": { @@ -690,20 +711,9 @@ "subjectmappingCreateSubjectMappingRequest": { "type": "object", "properties": { - "metadata": { - "$ref": "#/definitions/commonMetadataMutable" - }, "attributeValueId": { "type": "string", - "title": "Attribute Value to be mapped to" - }, - "existingSubjectConditionSetId": { - "type": "string", - "title": "Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)" - }, - "newSubjectConditionSet": { - "$ref": "#/definitions/subjectmappingSubjectConditionSetCreate", - "title": "Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)" + "title": "Required\nAttribute Value to be mapped to" }, "actions": { "type": "array", @@ -712,6 +722,18 @@ "$ref": "#/definitions/authorizationAction" }, "title": "The actions permitted by subjects in this mapping" + }, + "existingSubjectConditionSetId": { + "type": "string", + "title": "Either of the following:\nReuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)" + }, + "newSubjectConditionSet": { + "$ref": "#/definitions/subjectmappingSubjectConditionSetCreate", + "title": "Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)" + }, + "metadata": { + "$ref": "#/definitions/commonMetadataMutable", + "title": "Optional" } } }, @@ -817,20 +839,15 @@ "id": { "type": "string" }, - "name": { - "type": "string", - "title": "an optional name for ease of reference" - }, - "metadata": { - "$ref": "#/definitions/commonMetadata" - }, "subjectSets": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/subjectmappingSubjectSet" - }, - "title": "multiple Subject Sets are evaluated with AND logic" + } + }, + "metadata": { + "$ref": "#/definitions/commonMetadata" } }, "description": "A container for multiple Subject Sets, each containing Condition Groups, each containing Conditions. Multiple Subject Sets in a SubjectConditionSet\nare evaluated with AND logic. As each Subject Mapping has only one Attribute Value, the SubjectConditionSet is reusable across multiple\nSubject Mappings / Attribute Values and is an independent unit." @@ -838,16 +855,17 @@ "subjectmappingSubjectConditionSetCreate": { "type": "object", "properties": { - "metadata": { - "$ref": "#/definitions/commonMetadataMutable" - }, "subjectSets": { "type": "array", "items": { "type": "object", "$ref": "#/definitions/subjectmappingSubjectSet" }, - "title": "multiple Subject Sets are evaluated with AND logic" + "title": "Required" + }, + "metadata": { + "$ref": "#/definitions/commonMetadataMutable", + "title": "Optional\nCommon metadata" } } }, @@ -857,9 +875,6 @@ "id": { "type": "string" }, - "metadata": { - "$ref": "#/definitions/commonMetadata" - }, "attributeValue": { "$ref": "#/definitions/policyattributesValue", "title": "the Attribute Value mapped to; aka: \"The Entity Entitlement Attribute\"" @@ -875,6 +890,9 @@ "$ref": "#/definitions/authorizationAction" }, "title": "The actions permitted by subjects in this mapping" + }, + "metadata": { + "$ref": "#/definitions/commonMetadata" } }, "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_condition_set\": {\"subject_sets\":[{subject_set_1},{subject_set_2}]...},\n\"actions\": [{\"standard\": \"STANDARD_ACTION_DECRYPT\"}\", {\"standard\": \"STANDARD_ACTION_TRANSMIT\"}]\n}", diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index 1a6cd35853..d6bc3b0b0c 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -129,17 +129,17 @@ func (ConditionBooleanTypeEnum) EnumDescriptor() ([]byte, []int) { // * // A Condition defines a rule of // -// Example: Match Subjects with field "division" and a value of "Accounting" or "Marketing": +// Example: Subjects with field "division" and a value of "Accounting" or "Marketing": // { // "subject_external_field": "division", -// "operator": "IN", +// "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN", // "subject_external_values" : ["Accounting", "Marketing"] // } // -// Example: Match a subject by ensuring they are not part of the Fantastic Four: +// Example: Subjects that are not part of the Fantastic Four: // { // "subject_external_field": "superhero_name", -// "operator": "NOT_IN", +// "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", // "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] // } type Condition struct { @@ -322,12 +322,9 @@ type SubjectConditionSet struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // an optional name for ease of reference - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Metadata *common.Metadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"` - // multiple Subject Sets are evaluated with AND logic - SubjectSets []*SubjectSet `protobuf:"bytes,4,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SubjectSets []*SubjectSet `protobuf:"bytes,3,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` + Metadata *common.Metadata `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *SubjectConditionSet) Reset() { @@ -369,11 +366,11 @@ func (x *SubjectConditionSet) GetId() string { return "" } -func (x *SubjectConditionSet) GetName() string { +func (x *SubjectConditionSet) GetSubjectSets() []*SubjectSet { if x != nil { - return x.Name + return x.SubjectSets } - return "" + return nil } func (x *SubjectConditionSet) GetMetadata() *common.Metadata { @@ -383,13 +380,6 @@ func (x *SubjectConditionSet) GetMetadata() *common.Metadata { return nil } -func (x *SubjectConditionSet) GetSubjectSets() []*SubjectSet { - if x != nil { - return x.SubjectSets - } - return nil -} - // 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 @@ -405,14 +395,14 @@ type SubjectMapping 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"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" - AttributeValue *attributes.Value `protobuf:"bytes,3,opt,name=attribute_value,json=attributeValue,proto3" json:"attribute_value,omitempty"` + AttributeValue *attributes.Value `protobuf:"bytes,2,opt,name=attribute_value,json=attributeValue,proto3" json:"attribute_value,omitempty"` // the reusable SubjectConditionSet mapped to the given Attribute Value - SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,4,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` + SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,3,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` // The actions permitted by subjects in this mapping - Actions []*authorization.Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"` + Actions []*authorization.Action `protobuf:"bytes,4,rep,name=actions,proto3" json:"actions,omitempty"` + Metadata *common.Metadata `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *SubjectMapping) Reset() { @@ -454,13 +444,6 @@ func (x *SubjectMapping) GetId() string { return "" } -func (x *SubjectMapping) GetMetadata() *common.Metadata { - if x != nil { - return x.Metadata - } - return nil -} - func (x *SubjectMapping) GetAttributeValue() *attributes.Value { if x != nil { return x.AttributeValue @@ -482,6 +465,13 @@ func (x *SubjectMapping) GetActions() []*authorization.Action { return nil } +func (x *SubjectMapping) GetMetadata() *common.Metadata { + if x != nil { + return x.Metadata + } + 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 { @@ -536,6 +526,7 @@ type MatchSubjectMappingsRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + // Required Subject *Subject `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"` } @@ -809,15 +800,18 @@ type CreateSubjectMappingRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` + // Required // Attribute Value to be mapped to - AttributeValueId string `protobuf:"bytes,2,opt,name=attribute_value_id,json=attributeValueId,proto3" json:"attribute_value_id,omitempty"` + AttributeValueId string `protobuf:"bytes,1,opt,name=attribute_value_id,json=attributeValueId,proto3" json:"attribute_value_id,omitempty"` + // The actions permitted by subjects in this mapping + Actions []*authorization.Action `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"` + // Either of the following: // Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set) ExistingSubjectConditionSetId string `protobuf:"bytes,3,opt,name=existing_subject_condition_set_id,json=existingSubjectConditionSetId,proto3" json:"existing_subject_condition_set_id,omitempty"` // Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided) NewSubjectConditionSet *SubjectConditionSetCreate `protobuf:"bytes,4,opt,name=new_subject_condition_set,json=newSubjectConditionSet,proto3" json:"new_subject_condition_set,omitempty"` - // The actions permitted by subjects in this mapping - Actions []*authorization.Action `protobuf:"bytes,5,rep,name=actions,proto3" json:"actions,omitempty"` + // Optional + Metadata *common.MetadataMutable `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *CreateSubjectMappingRequest) Reset() { @@ -852,18 +846,18 @@ func (*CreateSubjectMappingRequest) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{12} } -func (x *CreateSubjectMappingRequest) GetMetadata() *common.MetadataMutable { +func (x *CreateSubjectMappingRequest) GetAttributeValueId() string { if x != nil { - return x.Metadata + return x.AttributeValueId } - return nil + return "" } -func (x *CreateSubjectMappingRequest) GetAttributeValueId() string { +func (x *CreateSubjectMappingRequest) GetActions() []*authorization.Action { if x != nil { - return x.AttributeValueId + return x.Actions } - return "" + return nil } func (x *CreateSubjectMappingRequest) GetExistingSubjectConditionSetId() string { @@ -880,9 +874,9 @@ func (x *CreateSubjectMappingRequest) GetNewSubjectConditionSet() *SubjectCondit return nil } -func (x *CreateSubjectMappingRequest) GetActions() []*authorization.Action { +func (x *CreateSubjectMappingRequest) GetMetadata() *common.MetadataMutable { if x != nil { - return x.Actions + return x.Metadata } return nil } @@ -940,12 +934,16 @@ type UpdateSubjectMappingRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - UpdateMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=update_metadata,json=updateMetadata,proto3" json:"update_metadata,omitempty"` + // Required + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Optional // Replaces the existing SubjectConditionSet id with a new one - UpdateSubjectConditionSetId string `protobuf:"bytes,3,opt,name=update_subject_condition_set_id,json=updateSubjectConditionSetId,proto3" json:"update_subject_condition_set_id,omitempty"` + SubjectConditionSetId string `protobuf:"bytes,2,opt,name=subject_condition_set_id,json=subjectConditionSetId,proto3" json:"subject_condition_set_id,omitempty"` // Replaces entire list of actions permitted by subjects - UpdateActions []*authorization.Action `protobuf:"bytes,5,rep,name=update_actions,json=updateActions,proto3" json:"update_actions,omitempty"` + Actions []*authorization.Action `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"` + // Common metadata + Metadata *common.MetadataMutable `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"` + MetadataUpdateBehavior common.MetadataUpdateEnum `protobuf:"varint,101,opt,name=metadata_update_behavior,json=metadataUpdateBehavior,proto3,enum=common.MetadataUpdateEnum" json:"metadata_update_behavior,omitempty"` } func (x *UpdateSubjectMappingRequest) Reset() { @@ -987,27 +985,34 @@ func (x *UpdateSubjectMappingRequest) GetId() string { return "" } -func (x *UpdateSubjectMappingRequest) GetUpdateMetadata() *common.MetadataMutable { +func (x *UpdateSubjectMappingRequest) GetSubjectConditionSetId() string { if x != nil { - return x.UpdateMetadata + return x.SubjectConditionSetId } - return nil + return "" } -func (x *UpdateSubjectMappingRequest) GetUpdateSubjectConditionSetId() string { +func (x *UpdateSubjectMappingRequest) GetActions() []*authorization.Action { if x != nil { - return x.UpdateSubjectConditionSetId + return x.Actions } - return "" + return nil } -func (x *UpdateSubjectMappingRequest) GetUpdateActions() []*authorization.Action { +func (x *UpdateSubjectMappingRequest) GetMetadata() *common.MetadataMutable { if x != nil { - return x.UpdateActions + return x.Metadata } return nil } +func (x *UpdateSubjectMappingRequest) GetMetadataUpdateBehavior() common.MetadataUpdateEnum { + if x != nil { + return x.MetadataUpdateBehavior + } + return common.MetadataUpdateEnum(0) +} + type UpdateSubjectMappingResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1344,9 +1349,11 @@ type SubjectConditionSetCreate struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Metadata *common.MetadataMutable `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"` - // multiple Subject Sets are evaluated with AND logic - SubjectSets []*SubjectSet `protobuf:"bytes,2,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` + // Required + SubjectSets []*SubjectSet `protobuf:"bytes,1,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` + // Optional + // Common metadata + Metadata *common.MetadataMutable `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *SubjectConditionSetCreate) Reset() { @@ -1381,16 +1388,16 @@ func (*SubjectConditionSetCreate) Descriptor() ([]byte, []int) { return file_policy_subjectmapping_subject_mapping_proto_rawDescGZIP(), []int{22} } -func (x *SubjectConditionSetCreate) GetMetadata() *common.MetadataMutable { +func (x *SubjectConditionSetCreate) GetSubjectSets() []*SubjectSet { if x != nil { - return x.Metadata + return x.SubjectSets } return nil } -func (x *SubjectConditionSetCreate) GetSubjectSets() []*SubjectSet { +func (x *SubjectConditionSetCreate) GetMetadata() *common.MetadataMutable { if x != nil { - return x.SubjectSets + return x.Metadata } return nil } @@ -1495,10 +1502,14 @@ type UpdateSubjectConditionSetRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - UpdateMetadata *common.MetadataMutable `protobuf:"bytes,2,opt,name=update_metadata,json=updateMetadata,proto3" json:"update_metadata,omitempty"` - // if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions - UpdateSubjectSets []*SubjectSet `protobuf:"bytes,3,rep,name=update_subject_sets,json=updateSubjectSets,proto3" json:"update_subject_sets,omitempty"` + // Required + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // Optional + // If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions + UpdateSubjectSets []*SubjectSet `protobuf:"bytes,2,rep,name=update_subject_sets,json=updateSubjectSets,proto3" json:"update_subject_sets,omitempty"` + // Common metadata + Metadata *common.MetadataMutable `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"` + MetadataUpdateBehavior common.MetadataUpdateEnum `protobuf:"varint,101,opt,name=metadata_update_behavior,json=metadataUpdateBehavior,proto3,enum=common.MetadataUpdateEnum" json:"metadata_update_behavior,omitempty"` } func (x *UpdateSubjectConditionSetRequest) Reset() { @@ -1540,20 +1551,27 @@ func (x *UpdateSubjectConditionSetRequest) GetId() string { return "" } -func (x *UpdateSubjectConditionSetRequest) GetUpdateMetadata() *common.MetadataMutable { +func (x *UpdateSubjectConditionSetRequest) GetUpdateSubjectSets() []*SubjectSet { if x != nil { - return x.UpdateMetadata + return x.UpdateSubjectSets } return nil } -func (x *UpdateSubjectConditionSetRequest) GetUpdateSubjectSets() []*SubjectSet { +func (x *UpdateSubjectConditionSetRequest) GetMetadata() *common.MetadataMutable { if x != nil { - return x.UpdateSubjectSets + return x.Metadata } return nil } +func (x *UpdateSubjectConditionSetRequest) GetMetadataUpdateBehavior() common.MetadataUpdateEnum { + if x != nil { + return x.MetadataUpdateBehavior + } + return common.MetadataUpdateEnum(0) +} + type UpdateSubjectConditionSetResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1748,380 +1766,386 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 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, 0xb7, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x75, 0x70, 0x73, 0x22, 0xa3, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 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, 0x4e, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, - 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa2, 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, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4e, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 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, 0x22, 0xa2, 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, 0x41, 0x0a, 0x0f, + 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 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, + 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, + 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, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, + 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 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, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x2a, 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, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 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, 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, 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, 0xfa, 0x02, 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, 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, 0x34, 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, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x10, 0x61, 0x74, 0x74, 0x72, - 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x21, - 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x6b, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6e, 0x65, 0x77, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 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, 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, 0xfa, 0x02, + 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, 0x34, 0x0a, + 0x12, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, + 0x01, 0x52, 0x10, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x49, 0x64, 0x12, 0x39, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 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, 0x42, 0x08, 0xba, 0x48, 0x05, - 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x6e, - 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x48, + 0x0a, 0x21, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, + 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1d, 0x65, 0x78, 0x69, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x6b, 0x0a, 0x19, 0x6e, 0x65, 0x77, 0x5f, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x16, 0x6e, + 0x65, 0x77, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x64, 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, 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, 0xaa, 0x02, 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, 0x37, 0x0a, 0x18, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x07, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 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, 0x54, 0x0a, 0x18, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x18, 0x65, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, + 0x16, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, + 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 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, 0xfb, - 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x44, 0x0a, 0x1f, 0x75, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x1b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x49, 0x64, 0x12, 0x3c, - 0x0a, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x0d, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 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, 0x37, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe7, 0x01, 0x0a, - 0x1e, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x37, + 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0xe7, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x65, 0x0a, 0x1b, 0x61, 0x73, + 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 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, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, + 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, + 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x19, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x12, 0x4e, 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, 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, 0x42, 0x08, 0xba, 0x48, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 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, 0x22, 0x88, + 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, - 0x65, 0x0a, 0x1b, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 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, 0x53, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x19, 0x61, 0x73, 0x73, - 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x84, 0x01, 0x0a, 0x20, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, - 0x0a, 0x16, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, - 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, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x14, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, - 0x22, 0xa0, 0x01, 0x0a, 0x19, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 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, 0x4e, 0x0a, 0x0c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, + 0x98, 0x02, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x51, 0x0a, 0x13, + 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 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, 0x42, 0x08, 0xba, 0x48, - 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, - 0x65, 0x74, 0x73, 0x22, 0x88, 0x01, 0x0a, 0x20, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x64, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x83, - 0x01, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, - 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x22, 0xcf, 0x01, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, + 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x52, 0x11, 0x75, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, + 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 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, 0x54, 0x0a, 0x18, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, + 0x18, 0x65, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, + 0x75, 0x6d, 0x52, 0x16, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x2a, 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, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, + 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x40, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 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, 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 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, 0x11, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, - 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 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, - 0xe0, 0x0e, 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, + 0x65, 0x74, 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, 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, 0xe0, 0x0e, 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, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, - 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, - 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x12, 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, + 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, + 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1c, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, - 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, - 0x67, 0x12, 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, + 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, 0x1c, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, + 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 0x12, - 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x12, 0x36, 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, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, - 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6c, 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, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, - 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, - 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, 0x70, 0x6f, 0x6c, + 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, 0x21, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 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, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, + 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, + 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x38, 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, + 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, + 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, + 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, + 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, + 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, - 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, - 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, - 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 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, 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 ( @@ -2175,69 +2199,72 @@ var file_policy_subjectmapping_subject_mapping_proto_goTypes = []interface{}{ (*authorization.Action)(nil), // 33: authorization.Action (*structpb.Struct)(nil), // 34: google.protobuf.Struct (*common.MetadataMutable)(nil), // 35: common.MetadataMutable + (common.MetadataUpdateEnum)(0), // 36: common.MetadataUpdateEnum } 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_operator:type_name -> policy.subjectmapping.ConditionBooleanTypeEnum 3, // 3: policy.subjectmapping.SubjectSet.condition_groups:type_name -> policy.subjectmapping.ConditionGroup - 31, // 4: policy.subjectmapping.SubjectConditionSet.metadata:type_name -> common.Metadata - 4, // 5: policy.subjectmapping.SubjectConditionSet.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 31, // 6: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata - 32, // 7: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value - 5, // 8: policy.subjectmapping.SubjectMapping.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 33, // 9: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action + 4, // 4: policy.subjectmapping.SubjectConditionSet.subject_sets:type_name -> policy.subjectmapping.SubjectSet + 31, // 5: policy.subjectmapping.SubjectConditionSet.metadata:type_name -> common.Metadata + 32, // 6: policy.subjectmapping.SubjectMapping.attribute_value:type_name -> policy.attributes.Value + 5, // 7: policy.subjectmapping.SubjectMapping.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 33, // 8: policy.subjectmapping.SubjectMapping.actions:type_name -> authorization.Action + 31, // 9: policy.subjectmapping.SubjectMapping.metadata:type_name -> common.Metadata 34, // 10: policy.subjectmapping.Subject.attributes:type_name -> google.protobuf.Struct 7, // 11: policy.subjectmapping.MatchSubjectMappingsRequest.subject:type_name -> policy.subjectmapping.Subject 6, // 12: policy.subjectmapping.MatchSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping 6, // 13: policy.subjectmapping.GetSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping 6, // 14: policy.subjectmapping.ListSubjectMappingsResponse.subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 35, // 15: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable + 33, // 15: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action 24, // 16: policy.subjectmapping.CreateSubjectMappingRequest.new_subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 33, // 17: policy.subjectmapping.CreateSubjectMappingRequest.actions:type_name -> authorization.Action + 35, // 17: policy.subjectmapping.CreateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable 6, // 18: policy.subjectmapping.CreateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 35, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.update_metadata:type_name -> common.MetadataMutable - 33, // 20: policy.subjectmapping.UpdateSubjectMappingRequest.update_actions:type_name -> authorization.Action - 6, // 21: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 6, // 22: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping - 5, // 23: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 6, // 24: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping - 5, // 25: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet - 35, // 26: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable + 33, // 19: policy.subjectmapping.UpdateSubjectMappingRequest.actions:type_name -> authorization.Action + 35, // 20: policy.subjectmapping.UpdateSubjectMappingRequest.metadata:type_name -> common.MetadataMutable + 36, // 21: policy.subjectmapping.UpdateSubjectMappingRequest.metadata_update_behavior:type_name -> common.MetadataUpdateEnum + 6, // 22: policy.subjectmapping.UpdateSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 6, // 23: policy.subjectmapping.DeleteSubjectMappingResponse.subject_mapping:type_name -> policy.subjectmapping.SubjectMapping + 5, // 24: policy.subjectmapping.GetSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 6, // 25: policy.subjectmapping.GetSubjectConditionSetResponse.associated_subject_mappings:type_name -> policy.subjectmapping.SubjectMapping + 5, // 26: policy.subjectmapping.ListSubjectConditionSetsResponse.subject_condition_sets:type_name -> policy.subjectmapping.SubjectConditionSet 4, // 27: policy.subjectmapping.SubjectConditionSetCreate.subject_sets:type_name -> policy.subjectmapping.SubjectSet - 24, // 28: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate - 5, // 29: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 35, // 30: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_metadata:type_name -> common.MetadataMutable + 35, // 28: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable + 24, // 29: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate + 5, // 30: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet 4, // 31: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet - 5, // 32: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 5, // 33: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 8, // 34: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest - 12, // 35: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest - 10, // 36: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest - 14, // 37: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest - 16, // 38: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest - 18, // 39: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest - 22, // 40: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest - 20, // 41: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest - 25, // 42: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest - 27, // 43: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest - 29, // 44: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest - 9, // 45: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse - 13, // 46: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse - 11, // 47: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse - 15, // 48: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse - 17, // 49: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse - 19, // 50: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse - 23, // 51: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse - 21, // 52: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse - 26, // 53: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse - 28, // 54: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse - 30, // 55: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse - 45, // [45:56] is the sub-list for method output_type - 34, // [34:45] is the sub-list for method input_type - 34, // [34:34] is the sub-list for extension type_name - 34, // [34:34] is the sub-list for extension extendee - 0, // [0:34] is the sub-list for field type_name + 35, // 32: policy.subjectmapping.UpdateSubjectConditionSetRequest.metadata:type_name -> common.MetadataMutable + 36, // 33: policy.subjectmapping.UpdateSubjectConditionSetRequest.metadata_update_behavior:type_name -> common.MetadataUpdateEnum + 5, // 34: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 5, // 35: policy.subjectmapping.DeleteSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet + 8, // 36: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:input_type -> policy.subjectmapping.MatchSubjectMappingsRequest + 12, // 37: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:input_type -> policy.subjectmapping.ListSubjectMappingsRequest + 10, // 38: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:input_type -> policy.subjectmapping.GetSubjectMappingRequest + 14, // 39: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:input_type -> policy.subjectmapping.CreateSubjectMappingRequest + 16, // 40: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:input_type -> policy.subjectmapping.UpdateSubjectMappingRequest + 18, // 41: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:input_type -> policy.subjectmapping.DeleteSubjectMappingRequest + 22, // 42: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:input_type -> policy.subjectmapping.ListSubjectConditionSetsRequest + 20, // 43: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:input_type -> policy.subjectmapping.GetSubjectConditionSetRequest + 25, // 44: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:input_type -> policy.subjectmapping.CreateSubjectConditionSetRequest + 27, // 45: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:input_type -> policy.subjectmapping.UpdateSubjectConditionSetRequest + 29, // 46: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:input_type -> policy.subjectmapping.DeleteSubjectConditionSetRequest + 9, // 47: policy.subjectmapping.SubjectMappingService.MatchSubjectMappings:output_type -> policy.subjectmapping.MatchSubjectMappingsResponse + 13, // 48: policy.subjectmapping.SubjectMappingService.ListSubjectMappings:output_type -> policy.subjectmapping.ListSubjectMappingsResponse + 11, // 49: policy.subjectmapping.SubjectMappingService.GetSubjectMapping:output_type -> policy.subjectmapping.GetSubjectMappingResponse + 15, // 50: policy.subjectmapping.SubjectMappingService.CreateSubjectMapping:output_type -> policy.subjectmapping.CreateSubjectMappingResponse + 17, // 51: policy.subjectmapping.SubjectMappingService.UpdateSubjectMapping:output_type -> policy.subjectmapping.UpdateSubjectMappingResponse + 19, // 52: policy.subjectmapping.SubjectMappingService.DeleteSubjectMapping:output_type -> policy.subjectmapping.DeleteSubjectMappingResponse + 23, // 53: policy.subjectmapping.SubjectMappingService.ListSubjectConditionSets:output_type -> policy.subjectmapping.ListSubjectConditionSetsResponse + 21, // 54: policy.subjectmapping.SubjectMappingService.GetSubjectConditionSet:output_type -> policy.subjectmapping.GetSubjectConditionSetResponse + 26, // 55: policy.subjectmapping.SubjectMappingService.CreateSubjectConditionSet:output_type -> policy.subjectmapping.CreateSubjectConditionSetResponse + 28, // 56: policy.subjectmapping.SubjectMappingService.UpdateSubjectConditionSet:output_type -> policy.subjectmapping.UpdateSubjectConditionSetResponse + 30, // 57: policy.subjectmapping.SubjectMappingService.DeleteSubjectConditionSet:output_type -> policy.subjectmapping.DeleteSubjectConditionSetResponse + 47, // [47:58] is the sub-list for method output_type + 36, // [36:47] is the sub-list for method input_type + 36, // [36:36] is the sub-list for extension type_name + 36, // [36:36] is the sub-list for extension extendee + 0, // [0:36] is the sub-list for field type_name } func init() { file_policy_subjectmapping_subject_mapping_proto_init() } 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 3bddc8cc49..ab3df2a7d0 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 @@ -9,17 +9,17 @@ ** *A Condition defines a rule of <subject external field name> <operator> <subject external values> * - *Example: Match Subjects with field "division" and a value of "Accounting" or "Marketing": + *Example: Subjects with field "division" and a value of "Accounting" or "Marketing": *{ *"subject_external_field": "division", - *"operator": "IN", + *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN", *"subject_external_values" : ["Accounting", "Marketing"] *} * - *Example: Match a subject by ensuring they are not part of the Fantastic Four: + *Example: Subjects that are not part of the Fantastic Four: *{ *"subject_external_field": "superhero_name", - *"operator": "NOT_IN", + *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", *"subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] *} * @@ -376,17 +376,17 @@ protected Builder newBuilderForType( ** *A Condition defines a rule of <subject external field name> <operator> <subject external values> * - *Example: Match Subjects with field "division" and a value of "Accounting" or "Marketing": + *Example: Subjects with field "division" and a value of "Accounting" or "Marketing": *{ *"subject_external_field": "division", - *"operator": "IN", + *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN", *"subject_external_values" : ["Accounting", "Marketing"] *} * - *Example: Match a subject by ensuring they are not part of the Fantastic Four: + *Example: Subjects that are not part of the Fantastic Four: *{ *"subject_external_field": "superhero_name", - *"operator": "NOT_IN", + *"operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", *"subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] *} * diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java index 90c1330e92..498d795875 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequest.java @@ -18,8 +18,8 @@ private CreateSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Build } private CreateSubjectMappingRequest() { attributeValueId_ = ""; - existingSubjectConditionSetId_ = ""; actions_ = java.util.Collections.emptyList(); + existingSubjectConditionSetId_ = ""; } @java.lang.Override @@ -43,41 +43,16 @@ protected java.lang.Object newInstance( } 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 ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 2; + public static final int ATTRIBUTE_VALUE_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object attributeValueId_ = ""; /** *
    +   * Required
        * Attribute Value to be mapped to
        * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } * @return The attributeValueId. */ @java.lang.Override @@ -95,10 +70,11 @@ public java.lang.String getAttributeValueId() { } /** *
    +   * Required
        * Attribute Value to be mapped to
        * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } * @return The bytes for attributeValueId. */ @java.lang.Override @@ -116,11 +92,73 @@ public java.lang.String getAttributeValueId() { } } + public static final int ACTIONS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List actions_; + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List getActionsList() { + return actions_; + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public java.util.List + getActionsOrBuilderList() { + return actions_; + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public int getActionsCount() { + return actions_.size(); + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.authorization.Action getActions(int index) { + return actions_.get(index); + } + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + @java.lang.Override + public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( + int index) { + return actions_.get(index); + } + public static final int EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3; @SuppressWarnings("serial") private volatile java.lang.Object existingSubjectConditionSetId_ = ""; /** *
    +   * Either of the following:
        * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
        * 
    * @@ -142,6 +180,7 @@ public java.lang.String getExistingSubjectConditionSetId() { } /** *
    +   * Either of the following:
        * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
        * 
    * @@ -175,7 +214,7 @@ public java.lang.String getExistingSubjectConditionSetId() { */ @java.lang.Override public boolean hasNewSubjectConditionSet() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000001) != 0); } /** *
    @@ -201,65 +240,42 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuil
         return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_;
       }
     
    -  public static final int ACTIONS_FIELD_NUMBER = 5;
    -  @SuppressWarnings("serial")
    -  private java.util.List actions_;
    -  /**
    -   * 
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List getActionsList() { - return actions_; - } - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - @java.lang.Override - public java.util.List - getActionsOrBuilderList() { - return actions_; - } + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; /** *
    -   * The actions permitted by subjects in this mapping
    +   * Optional
        * 
    * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. */ @java.lang.Override - public int getActionsCount() { - return actions_.size(); + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); } /** *
    -   * The actions permitted by subjects in this mapping
    +   * Optional
        * 
    * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. */ @java.lang.Override - public io.opentdf.platform.authorization.Action getActions(int index) { - return actions_.get(index); + public io.opentdf.platform.common.MetadataMutable getMetadata() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; } /** *
    -   * The actions permitted by subjects in this mapping
    +   * Optional
        * 
    * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; */ @java.lang.Override - public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( - int index) { - return actions_.get(index); + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; } private byte memoizedIsInitialized = -1; @@ -276,20 +292,20 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(1, getMetadata()); - } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeValueId_); + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeValueId_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(2, actions_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, existingSubjectConditionSetId_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getNewSubjectConditionSet()); } - for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(5, actions_.get(i)); + if (((bitField0_ & 0x00000002) != 0)) { + output.writeMessage(100, getMetadata()); } getUnknownFields().writeTo(output); } @@ -300,23 +316,23 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMetadata()); - } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributeValueId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attributeValueId_); + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributeValueId_); + } + for (int i = 0; i < actions_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, actions_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingSubjectConditionSetId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, existingSubjectConditionSetId_); } - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getNewSubjectConditionSet()); } - for (int i = 0; i < actions_.size(); i++) { + if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, actions_.get(i)); + .computeMessageSize(100, getMetadata()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -333,13 +349,10 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest other = (io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest) obj; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } if (!getAttributeValueId() .equals(other.getAttributeValueId())) return false; + if (!getActionsList() + .equals(other.getActionsList())) return false; if (!getExistingSubjectConditionSetId() .equals(other.getExistingSubjectConditionSetId())) return false; if (hasNewSubjectConditionSet() != other.hasNewSubjectConditionSet()) return false; @@ -347,8 +360,11 @@ public boolean equals(final java.lang.Object obj) { if (!getNewSubjectConditionSet() .equals(other.getNewSubjectConditionSet())) return false; } - if (!getActionsList() - .equals(other.getActionsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -360,21 +376,21 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } hash = (37 * hash) + ATTRIBUTE_VALUE_ID_FIELD_NUMBER; hash = (53 * hash) + getAttributeValueId().hashCode(); + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } hash = (37 * hash) + EXISTING_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; hash = (53 * hash) + getExistingSubjectConditionSetId().hashCode(); if (hasNewSubjectConditionSet()) { hash = (37 * hash) + NEW_SUBJECT_CONDITION_SET_FIELD_NUMBER; hash = (53 * hash) + getNewSubjectConditionSet().hashCode(); } - if (getActionsCount() > 0) { - hash = (37 * hash) + ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getActionsList().hashCode(); + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; @@ -506,34 +522,34 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); - getNewSubjectConditionSetFieldBuilder(); getActionsFieldBuilder(); + getNewSubjectConditionSetFieldBuilder(); + getMetadataFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } attributeValueId_ = ""; + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + } else { + actions_ = null; + actionsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); existingSubjectConditionSetId_ = ""; newSubjectConditionSet_ = null; if (newSubjectConditionSetBuilder_ != null) { newSubjectConditionSetBuilder_.dispose(); newSubjectConditionSetBuilder_ = null; } - if (actionsBuilder_ == null) { - actions_ = java.util.Collections.emptyList(); - } else { - actions_ = null; - actionsBuilder_.clear(); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; } - bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -568,9 +584,9 @@ public io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest bui private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result) { if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000002); } result.actions_ = actions_; } else { @@ -580,23 +596,23 @@ private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmappin private void buildPartial0(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest result) { int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000002) != 0)) { result.attributeValueId_ = attributeValueId_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.existingSubjectConditionSetId_ = existingSubjectConditionSetId_; } + int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.newSubjectConditionSet_ = newSubjectConditionSetBuilder_ == null ? newSubjectConditionSet_ : newSubjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; @@ -646,27 +662,16 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest other) { if (other == io.opentdf.platform.policy.subjectmapping.CreateSubjectMappingRequest.getDefaultInstance()) return this; - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } if (!other.getAttributeValueId().isEmpty()) { attributeValueId_ = other.attributeValueId_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (!other.getExistingSubjectConditionSetId().isEmpty()) { - existingSubjectConditionSetId_ = other.existingSubjectConditionSetId_; - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000001; onChanged(); } - if (other.hasNewSubjectConditionSet()) { - mergeNewSubjectConditionSet(other.getNewSubjectConditionSet()); - } if (actionsBuilder_ == null) { if (!other.actions_.isEmpty()) { if (actions_.isEmpty()) { actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureActionsIsMutable(); actions_.addAll(other.actions_); @@ -679,7 +684,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubject actionsBuilder_.dispose(); actionsBuilder_ = null; actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000002); actionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getActionsFieldBuilder() : null; @@ -688,6 +693,17 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.CreateSubject } } } + if (!other.getExistingSubjectConditionSetId().isEmpty()) { + existingSubjectConditionSetId_ = other.existingSubjectConditionSetId_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.hasNewSubjectConditionSet()) { + mergeNewSubjectConditionSet(other.getNewSubjectConditionSet()); + } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -715,15 +731,21 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); + attributeValueId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { - attributeValueId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; + io.opentdf.platform.authorization.Action m = + input.readMessage( + io.opentdf.platform.authorization.Action.parser(), + extensionRegistry); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); + } else { + actionsBuilder_.addMessage(m); + } break; } // case 18 case 26: { @@ -738,19 +760,13 @@ public Builder mergeFrom( bitField0_ |= 0x00000008; break; } // case 34 - case 42: { - io.opentdf.platform.authorization.Action m = - input.readMessage( - io.opentdf.platform.authorization.Action.parser(), - extensionRegistry); - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.add(m); - } else { - actionsBuilder_.addMessage(m); - } + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; break; - } // case 42 + } // case 802 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -768,134 +784,14 @@ public Builder mergeFrom( } 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.lang.Object attributeValueId_ = ""; /** *
    +     * Required
          * Attribute Value to be mapped to
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } * @return The attributeValueId. */ public java.lang.String getAttributeValueId() { @@ -912,10 +808,11 @@ public java.lang.String getAttributeValueId() { } /** *
    +     * Required
          * Attribute Value to be mapped to
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } * @return The bytes for attributeValueId. */ public com.google.protobuf.ByteString @@ -933,10 +830,11 @@ public java.lang.String getAttributeValueId() { } /** *
    +     * Required
          * Attribute Value to be mapped to
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } * @param value The attributeValueId to set. * @return This builder for chaining. */ @@ -944,30 +842,32 @@ public Builder setAttributeValueId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } attributeValueId_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } /** *
    +     * Required
          * Attribute Value to be mapped to
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } * @return This builder for chaining. */ public Builder clearAttributeValueId() { attributeValueId_ = getDefaultInstance().getAttributeValueId(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
    +     * Required
          * Attribute Value to be mapped to
          * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } * @param value The bytes for attributeValueId to set. * @return This builder for chaining. */ @@ -976,379 +876,130 @@ public Builder setAttributeValueIdBytes( if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); attributeValueId_ = value; - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; onChanged(); return this; } - private java.lang.Object existingSubjectConditionSetId_ = ""; + private java.util.List actions_ = + java.util.Collections.emptyList(); + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> actionsBuilder_; + /** *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * The actions permitted by subjects in this mapping
          * 
    * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The existingSubjectConditionSetId. + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ - public java.lang.String getExistingSubjectConditionSetId() { - java.lang.Object ref = existingSubjectConditionSetId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - existingSubjectConditionSetId_ = s; - return s; + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); } else { - return (java.lang.String) ref; + return actionsBuilder_.getMessageList(); } } /** *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * The actions permitted by subjects in this mapping
          * 
    * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return The bytes for existingSubjectConditionSetId. + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ - public com.google.protobuf.ByteString - getExistingSubjectConditionSetIdBytes() { - java.lang.Object ref = existingSubjectConditionSetId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - existingSubjectConditionSetId_ = b; - return b; + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); } else { - return (com.google.protobuf.ByteString) ref; + return actionsBuilder_.getCount(); } } /** *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * The actions permitted by subjects in this mapping
          * 
    * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @param value The existingSubjectConditionSetId to set. - * @return This builder for chaining. + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ - public Builder setExistingSubjectConditionSetId( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - existingSubjectConditionSetId_ = value; - bitField0_ |= 0x00000004; - onChanged(); - return this; + public io.opentdf.platform.authorization.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); + } else { + return actionsBuilder_.getMessage(index); + } } /** *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * The actions permitted by subjects in this mapping
          * 
    * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @return This builder for chaining. + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ - public Builder clearExistingSubjectConditionSetId() { - existingSubjectConditionSetId_ = getDefaultInstance().getExistingSubjectConditionSetId(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); + public Builder setActions( + int index, io.opentdf.platform.authorization.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.set(index, value); + onChanged(); + } else { + actionsBuilder_.setMessage(index, value); + } return this; } /** *
    -     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * The actions permitted by subjects in this mapping
          * 
    * - * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; - * @param value The bytes for existingSubjectConditionSetId to set. - * @return This builder for chaining. + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ - public Builder setExistingSubjectConditionSetIdBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - existingSubjectConditionSetId_ = value; - bitField0_ |= 0x00000004; - onChanged(); + public Builder setActions( + int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); + onChanged(); + } else { + actionsBuilder_.setMessage(index, builderForValue.build()); + } return this; } - - private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> newSubjectConditionSetBuilder_; /** *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * The actions permitted by subjects in this mapping
          * 
    * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return Whether the newSubjectConditionSet field is set. + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ - public boolean hasNewSubjectConditionSet() { - return ((bitField0_ & 0x00000008) != 0); + public Builder addActions(io.opentdf.platform.authorization.Action value) { + if (actionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureActionsIsMutable(); + actions_.add(value); + onChanged(); + } else { + actionsBuilder_.addMessage(value); + } + return this; } /** *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * The actions permitted by subjects in this mapping
          * 
    * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - * @return The newSubjectConditionSet. - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { - if (newSubjectConditionSetBuilder_ == null) { - return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } else { - return newSubjectConditionSetBuilder_.getMessage(); - } - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder setNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { - if (newSubjectConditionSetBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - newSubjectConditionSet_ = value; - } else { - newSubjectConditionSetBuilder_.setMessage(value); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder setNewSubjectConditionSet( - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { - if (newSubjectConditionSetBuilder_ == null) { - newSubjectConditionSet_ = builderForValue.build(); - } else { - newSubjectConditionSetBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; - onChanged(); - return this; - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder mergeNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { - if (newSubjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && - newSubjectConditionSet_ != null && - newSubjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { - getNewSubjectConditionSetBuilder().mergeFrom(value); - } else { - newSubjectConditionSet_ = value; - } - } else { - newSubjectConditionSetBuilder_.mergeFrom(value); - } - if (newSubjectConditionSet_ != null) { - bitField0_ |= 0x00000008; - onChanged(); - } - return this; - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public Builder clearNewSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000008); - newSubjectConditionSet_ = null; - if (newSubjectConditionSetBuilder_ != null) { - newSubjectConditionSetBuilder_.dispose(); - newSubjectConditionSetBuilder_ = null; - } - onChanged(); - return this; - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getNewSubjectConditionSetBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getNewSubjectConditionSetFieldBuilder().getBuilder(); - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { - if (newSubjectConditionSetBuilder_ != null) { - return newSubjectConditionSetBuilder_.getMessageOrBuilder(); - } else { - return newSubjectConditionSet_ == null ? - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; - } - } - /** - *
    -     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    -     * 
    - * - * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> - getNewSubjectConditionSetFieldBuilder() { - if (newSubjectConditionSetBuilder_ == null) { - newSubjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( - getNewSubjectConditionSet(), - getParentForChildren(), - isClean()); - newSubjectConditionSet_ = null; - } - return newSubjectConditionSetBuilder_; - } - - private java.util.List actions_ = - java.util.Collections.emptyList(); - private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { - actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> actionsBuilder_; - - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public java.util.List getActionsList() { - if (actionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(actions_); - } else { - return actionsBuilder_.getMessageList(); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public int getActionsCount() { - if (actionsBuilder_ == null) { - return actions_.size(); - } else { - return actionsBuilder_.getCount(); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public io.opentdf.platform.authorization.Action getActions(int index) { - if (actionsBuilder_ == null) { - return actions_.get(index); - } else { - return actionsBuilder_.getMessage(index); - } - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder setActions( - int index, io.opentdf.platform.authorization.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.set(index, value); - onChanged(); - } else { - actionsBuilder_.setMessage(index, value); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder setActions( - int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (actionsBuilder_ == null) { - ensureActionsIsMutable(); - actions_.set(index, builderForValue.build()); - onChanged(); - } else { - actionsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - public Builder addActions(io.opentdf.platform.authorization.Action value) { - if (actionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureActionsIsMutable(); - actions_.add(value); - onChanged(); - } else { - actionsBuilder_.addMessage(value); - } - return this; - } - /** - *
    -     * The actions permitted by subjects in this mapping
    -     * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public Builder addActions( int index, io.opentdf.platform.authorization.Action value) { @@ -1369,7 +1020,7 @@ public Builder addActions( * The actions permitted by subjects in this mapping *
    * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public Builder addActions( io.opentdf.platform.authorization.Action.Builder builderForValue) { @@ -1387,7 +1038,7 @@ public Builder addActions( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public Builder addActions( int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { @@ -1405,7 +1056,7 @@ public Builder addActions( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public Builder addAllActions( java.lang.Iterable values) { @@ -1424,12 +1075,12 @@ public Builder addAllActions( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public Builder clearActions() { if (actionsBuilder_ == null) { actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { actionsBuilder_.clear(); @@ -1441,7 +1092,7 @@ public Builder clearActions() { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public Builder removeActions(int index) { if (actionsBuilder_ == null) { @@ -1458,7 +1109,7 @@ public Builder removeActions(int index) { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public io.opentdf.platform.authorization.Action.Builder getActionsBuilder( int index) { @@ -1469,7 +1120,7 @@ public io.opentdf.platform.authorization.Action.Builder getActionsBuilder( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( int index) { @@ -1483,7 +1134,7 @@ public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public java.util.List getActionsOrBuilderList() { @@ -1498,7 +1149,7 @@ public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder() { return getActionsFieldBuilder().addBuilder( @@ -1509,7 +1160,7 @@ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder() { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( int index) { @@ -1521,7 +1172,7 @@ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } */ public java.util.List getActionsBuilderList() { @@ -1534,13 +1185,424 @@ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( actions_, - ((bitField0_ & 0x00000010) != 0), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); actions_ = null; } return actionsBuilder_; } + + private java.lang.Object existingSubjectConditionSetId_ = ""; + /** + *
    +     * Either of the following:
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The existingSubjectConditionSetId. + */ + public java.lang.String getExistingSubjectConditionSetId() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + existingSubjectConditionSetId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
    +     * Either of the following:
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return The bytes for existingSubjectConditionSetId. + */ + public com.google.protobuf.ByteString + getExistingSubjectConditionSetIdBytes() { + java.lang.Object ref = existingSubjectConditionSetId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + existingSubjectConditionSetId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
    +     * Either of the following:
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @param value The existingSubjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setExistingSubjectConditionSetId( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + existingSubjectConditionSetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
    +     * Either of the following:
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @return This builder for chaining. + */ + public Builder clearExistingSubjectConditionSetId() { + existingSubjectConditionSetId_ = getDefaultInstance().getExistingSubjectConditionSetId(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + *
    +     * Either of the following:
    +     * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
    +     * 
    + * + * string existing_subject_condition_set_id = 3 [json_name = "existingSubjectConditionSetId"]; + * @param value The bytes for existingSubjectConditionSetId to set. + * @return This builder for chaining. + */ + public Builder setExistingSubjectConditionSetIdBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + existingSubjectConditionSetId_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate newSubjectConditionSet_; + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> newSubjectConditionSetBuilder_; + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return Whether the newSubjectConditionSet field is set. + */ + public boolean hasNewSubjectConditionSet() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + * @return The newSubjectConditionSet. + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate getNewSubjectConditionSet() { + if (newSubjectConditionSetBuilder_ == null) { + return newSubjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } else { + return newSubjectConditionSetBuilder_.getMessage(); + } + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder setNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (newSubjectConditionSetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newSubjectConditionSet_ = value; + } else { + newSubjectConditionSetBuilder_.setMessage(value); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder setNewSubjectConditionSet( + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder builderForValue) { + if (newSubjectConditionSetBuilder_ == null) { + newSubjectConditionSet_ = builderForValue.build(); + } else { + newSubjectConditionSetBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder mergeNewSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate value) { + if (newSubjectConditionSetBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + newSubjectConditionSet_ != null && + newSubjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) { + getNewSubjectConditionSetBuilder().mergeFrom(value); + } else { + newSubjectConditionSet_ = value; + } + } else { + newSubjectConditionSetBuilder_.mergeFrom(value); + } + if (newSubjectConditionSet_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public Builder clearNewSubjectConditionSet() { + bitField0_ = (bitField0_ & ~0x00000008); + newSubjectConditionSet_ = null; + if (newSubjectConditionSetBuilder_ != null) { + newSubjectConditionSetBuilder_.dispose(); + newSubjectConditionSetBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder getNewSubjectConditionSetBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getNewSubjectConditionSetFieldBuilder().getBuilder(); + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder getNewSubjectConditionSetOrBuilder() { + if (newSubjectConditionSetBuilder_ != null) { + return newSubjectConditionSetBuilder_.getMessageOrBuilder(); + } else { + return newSubjectConditionSet_ == null ? + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance() : newSubjectConditionSet_; + } + } + /** + *
    +     * Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided)
    +     * 
    + * + * .policy.subjectmapping.SubjectConditionSetCreate new_subject_condition_set = 4 [json_name = "newSubjectConditionSet"]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder> + getNewSubjectConditionSetFieldBuilder() { + if (newSubjectConditionSetBuilder_ == null) { + newSubjectConditionSetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreateOrBuilder>( + getNewSubjectConditionSet(), + getParentForChildren(), + isClean()); + newSubjectConditionSet_ = null; + } + return newSubjectConditionSetBuilder_; + } + + 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_; + /** + *
    +     * Optional
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + *
    +     * Optional
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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(); + } + } + /** + *
    +     * Optional
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
    +     * Optional
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_ |= 0x00000010; + onChanged(); + return this; + } + /** + *
    +     * Optional
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + *
    +     * Optional
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
    +     * Optional
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
    +     * Optional
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_; + } + } + /** + *
    +     * Optional
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java index 50ae506ccc..030f4dc315 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingRequestOrBuilder.java @@ -8,36 +8,23 @@ public interface CreateSubjectMappingRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.subjectmapping.CreateSubjectMappingRequest) 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(); - /** *
    +   * Required
        * Attribute Value to be mapped to
        * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } * @return The attributeValueId. */ java.lang.String getAttributeValueId(); /** *
    +   * Required
        * Attribute Value to be mapped to
        * 
    * - * string attribute_value_id = 2 [json_name = "attributeValueId", (.buf.validate.field) = { ... } + * string attribute_value_id = 1 [json_name = "attributeValueId", (.buf.validate.field) = { ... } * @return The bytes for attributeValueId. */ com.google.protobuf.ByteString @@ -45,6 +32,51 @@ public interface CreateSubjectMappingRequestOrBuilder extends /** *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + java.util.List + getActionsList(); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.authorization.Action getActions(int index); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + int getActionsCount(); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + java.util.List + getActionsOrBuilderList(); + /** + *
    +   * The actions permitted by subjects in this mapping
    +   * 
    + * + * repeated .authorization.Action actions = 2 [json_name = "actions", (.buf.validate.field) = { ... } + */ + io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( + int index); + + /** + *
    +   * Either of the following:
        * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
        * 
    * @@ -54,6 +86,7 @@ public interface CreateSubjectMappingRequestOrBuilder extends java.lang.String getExistingSubjectConditionSetId(); /** *
    +   * Either of the following:
        * Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set)
        * 
    * @@ -92,45 +125,28 @@ public interface CreateSubjectMappingRequestOrBuilder extends /** *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - java.util.List - getActionsList(); - /** - *
    -   * The actions permitted by subjects in this mapping
    +   * Optional
        * 
    * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. */ - io.opentdf.platform.authorization.Action getActions(int index); + boolean hasMetadata(); /** *
    -   * The actions permitted by subjects in this mapping
    +   * Optional
        * 
    * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } - */ - int getActionsCount(); - /** - *
    -   * The actions permitted by subjects in this mapping
    -   * 
    - * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. */ - java.util.List - getActionsOrBuilderList(); + io.opentdf.platform.common.MetadataMutable getMetadata(); /** *
    -   * The actions permitted by subjects in this mapping
    +   * Optional
        * 
    * - * repeated .authorization.Action actions = 5 [json_name = "actions", (.buf.validate.field) = { ... } + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; */ - io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( - int index); + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java index 4db8fd6c74..4e1e4abdcf 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequest.java @@ -43,6 +43,10 @@ protected java.lang.Object newInstance( public static final int SUBJECT_FIELD_NUMBER = 1; private io.opentdf.platform.policy.subjectmapping.Subject subject_; /** + *
    +   * Required
    +   * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; * @return Whether the subject field is set. */ @@ -51,6 +55,10 @@ public boolean hasSubject() { return ((bitField0_ & 0x00000001) != 0); } /** + *
    +   * Required
    +   * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; * @return The subject. */ @@ -59,6 +67,10 @@ public io.opentdf.platform.policy.subjectmapping.Subject getSubject() { return subject_ == null ? io.opentdf.platform.policy.subjectmapping.Subject.getDefaultInstance() : subject_; } /** + *
    +   * Required
    +   * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; */ @java.lang.Override @@ -417,6 +429,10 @@ public Builder mergeFrom( private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.Subject, io.opentdf.platform.policy.subjectmapping.Subject.Builder, io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder> subjectBuilder_; /** + *
    +     * Required
    +     * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; * @return Whether the subject field is set. */ @@ -424,6 +440,10 @@ public boolean hasSubject() { return ((bitField0_ & 0x00000001) != 0); } /** + *
    +     * Required
    +     * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; * @return The subject. */ @@ -435,6 +455,10 @@ public io.opentdf.platform.policy.subjectmapping.Subject getSubject() { } } /** + *
    +     * Required
    +     * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; */ public Builder setSubject(io.opentdf.platform.policy.subjectmapping.Subject value) { @@ -451,6 +475,10 @@ public Builder setSubject(io.opentdf.platform.policy.subjectmapping.Subject valu return this; } /** + *
    +     * Required
    +     * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; */ public Builder setSubject( @@ -465,6 +493,10 @@ public Builder setSubject( return this; } /** + *
    +     * Required
    +     * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; */ public Builder mergeSubject(io.opentdf.platform.policy.subjectmapping.Subject value) { @@ -486,6 +518,10 @@ public Builder mergeSubject(io.opentdf.platform.policy.subjectmapping.Subject va return this; } /** + *
    +     * Required
    +     * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; */ public Builder clearSubject() { @@ -499,6 +535,10 @@ public Builder clearSubject() { return this; } /** + *
    +     * Required
    +     * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; */ public io.opentdf.platform.policy.subjectmapping.Subject.Builder getSubjectBuilder() { @@ -507,6 +547,10 @@ public io.opentdf.platform.policy.subjectmapping.Subject.Builder getSubjectBuild return getSubjectFieldBuilder().getBuilder(); } /** + *
    +     * Required
    +     * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder getSubjectOrBuilder() { @@ -518,6 +562,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder getSubjectOrBu } } /** + *
    +     * Required
    +     * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java index 2c80f50ecb..b6fc529b65 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/MatchSubjectMappingsRequestOrBuilder.java @@ -9,16 +9,28 @@ public interface MatchSubjectMappingsRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** + *
    +   * Required
    +   * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; * @return Whether the subject field is set. */ boolean hasSubject(); /** + *
    +   * Required
    +   * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; * @return The subject. */ io.opentdf.platform.policy.subjectmapping.Subject getSubject(); /** + *
    +   * Required
    +   * 
    + * * .policy.subjectmapping.Subject subject = 1 [json_name = "subject"]; */ io.opentdf.platform.policy.subjectmapping.SubjectOrBuilder getSubjectOrBuilder(); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSet.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSet.java index 7564ca1863..f7381f4661 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSet.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSet.java @@ -24,7 +24,6 @@ private SubjectConditionSet(com.google.protobuf.GeneratedMessageV3.Builder bu } private SubjectConditionSet() { id_ = ""; - name_ = ""; subjectSets_ = java.util.Collections.emptyList(); } @@ -88,99 +87,18 @@ public java.lang.String getId() { } } - public static final int NAME_FIELD_NUMBER = 2; - @SuppressWarnings("serial") - private volatile java.lang.Object name_ = ""; - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string name = 2 [json_name = "name"]; - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - 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(); - name_ = s; - return s; - } - } - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string name = 2 [json_name = "name"]; - * @return The bytes for name. - */ - @java.lang.Override - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int METADATA_FIELD_NUMBER = 3; - private io.opentdf.platform.common.Metadata metadata_; - /** - * .common.Metadata metadata = 3 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - @java.lang.Override - public boolean hasMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.Metadata metadata = 3 [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 = 3 [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 SUBJECT_SETS_FIELD_NUMBER = 4; + public static final int SUBJECT_SETS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List subjectSets_; /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List getSubjectSetsList() { return subjectSets_; } /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List @@ -188,33 +106,21 @@ public java.util.List getS return subjectSets_; } /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public int getSubjectSetsCount() { return subjectSets_.size(); } /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { return subjectSets_.get(index); } /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( @@ -222,6 +128,32 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS return subjectSets_.get(index); } + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.Metadata metadata_; + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .common.Metadata metadata = 100 [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 = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -239,14 +171,11 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_); + for (int i = 0; i < subjectSets_.size(); i++) { + output.writeMessage(3, subjectSets_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(3, getMetadata()); - } - for (int i = 0; i < subjectSets_.size(); i++) { - output.writeMessage(4, subjectSets_.get(i)); + output.writeMessage(100, getMetadata()); } getUnknownFields().writeTo(output); } @@ -260,16 +189,13 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_); - } - if (((bitField0_ & 0x00000001) != 0)) { + for (int i = 0; i < subjectSets_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getMetadata()); + .computeMessageSize(3, subjectSets_.get(i)); } - for (int i = 0; i < subjectSets_.size(); i++) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, subjectSets_.get(i)); + .computeMessageSize(100, getMetadata()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -288,15 +214,13 @@ public boolean equals(final java.lang.Object obj) { if (!getId() .equals(other.getId())) return false; - if (!getName() - .equals(other.getName())) return false; + if (!getSubjectSetsList() + .equals(other.getSubjectSetsList())) return false; if (hasMetadata() != other.hasMetadata()) return false; if (hasMetadata()) { if (!getMetadata() .equals(other.getMetadata())) return false; } - if (!getSubjectSetsList() - .equals(other.getSubjectSetsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -310,16 +234,14 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } if (getSubjectSetsCount() > 0) { hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; hash = (53 * hash) + getSubjectSetsList().hashCode(); } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -456,8 +378,8 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); getSubjectSetsFieldBuilder(); + getMetadataFieldBuilder(); } } @java.lang.Override @@ -465,19 +387,18 @@ public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; - name_ = ""; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } if (subjectSetsBuilder_ == null) { subjectSets_ = java.util.Collections.emptyList(); } else { subjectSets_ = null; subjectSetsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } return this; } @@ -512,9 +433,9 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet buildPartia private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet result) { if (subjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000002); } result.subjectSets_ = subjectSets_; } else { @@ -527,9 +448,6 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectCond if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } - if (((from_bitField0_ & 0x00000002) != 0)) { - result.name_ = name_; - } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.metadata_ = metadataBuilder_ == null @@ -589,19 +507,11 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectCondit bitField0_ |= 0x00000001; onChanged(); } - if (!other.getName().isEmpty()) { - name_ = other.name_; - bitField0_ |= 0x00000002; - onChanged(); - } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } if (subjectSetsBuilder_ == null) { if (!other.subjectSets_.isEmpty()) { if (subjectSets_.isEmpty()) { subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureSubjectSetsIsMutable(); subjectSets_.addAll(other.subjectSets_); @@ -614,7 +524,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectCondit subjectSetsBuilder_.dispose(); subjectSetsBuilder_ = null; subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000002); subjectSetsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubjectSetsFieldBuilder() : null; @@ -623,6 +533,9 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectCondit } } } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -654,19 +567,7 @@ public Builder mergeFrom( bitField0_ |= 0x00000001; break; } // case 10 - case 18: { - name_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - break; - } // case 18 case 26: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 34: { io.opentdf.platform.policy.subjectmapping.SubjectSet m = input.readMessage( io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), @@ -678,7 +579,14 @@ public Builder mergeFrom( subjectSetsBuilder_.addMessage(m); } break; - } // case 34 + } // case 26 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 802 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -768,225 +676,12 @@ public Builder setIdBytes( return this; } - private java.lang.Object name_ = ""; - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @return The bytes for name. - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName( - java.lang.String value) { - if (value == null) { throw new NullPointerException(); } - name_ = value; - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @return This builder for chaining. - */ - public Builder clearName() { - name_ = getDefaultInstance().getName(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - *
    -     * an optional name for ease of reference
    -     * 
    - * - * string name = 2 [json_name = "name"]; - * @param value The bytes for name to set. - * @return This builder for chaining. - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { throw new NullPointerException(); } - checkByteStringIsUtf8(value); - name_ = value; - bitField0_ |= 0x00000002; - 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 = 3 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - public boolean hasMetadata() { - return ((bitField0_ & 0x00000004) != 0); - } - /** - * .common.Metadata metadata = 3 [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 = 3 [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_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 3 [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_ |= 0x00000004; - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 3 [json_name = "metadata"]; - */ - public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { - if (metadataBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && - metadata_ != null && - metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { - getMetadataBuilder().mergeFrom(value); - } else { - metadata_ = value; - } - } else { - metadataBuilder_.mergeFrom(value); - } - if (metadata_ != null) { - bitField0_ |= 0x00000004; - onChanged(); - } - return this; - } - /** - * .common.Metadata metadata = 3 [json_name = "metadata"]; - */ - public Builder clearMetadata() { - bitField0_ = (bitField0_ & ~0x00000004); - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.Metadata metadata = 3 [json_name = "metadata"]; - */ - public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getMetadataFieldBuilder().getBuilder(); - } - /** - * .common.Metadata metadata = 3 [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 = 3 [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 subjectSets_ = java.util.Collections.emptyList(); private void ensureSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { subjectSets_ = new java.util.ArrayList(subjectSets_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000002; } } @@ -994,11 +689,7 @@ private void ensureSubjectSetsIsMutable() { io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> subjectSetsBuilder_; /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsList() { if (subjectSetsBuilder_ == null) { @@ -1008,11 +699,7 @@ public java.util.List getS } } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public int getSubjectSetsCount() { if (subjectSetsBuilder_ == null) { @@ -1022,11 +709,7 @@ public int getSubjectSetsCount() { } } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { if (subjectSetsBuilder_ == null) { @@ -1036,11 +719,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int i } } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -1057,11 +736,7 @@ public Builder setSubjectSets( return this; } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1075,11 +750,7 @@ public Builder setSubjectSets( return this; } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { if (subjectSetsBuilder_ == null) { @@ -1095,11 +766,7 @@ public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectS return this; } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -1116,11 +783,7 @@ public Builder addSubjectSets( return this; } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1134,11 +797,7 @@ public Builder addSubjectSets( return this; } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -1152,11 +811,7 @@ public Builder addSubjectSets( return this; } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addAllSubjectSets( java.lang.Iterable values) { @@ -1171,16 +826,12 @@ public Builder addAllSubjectSets( return this; } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder clearSubjectSets() { if (subjectSetsBuilder_ == null) { subjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { subjectSetsBuilder_.clear(); @@ -1188,11 +839,7 @@ public Builder clearSubjectSets() { return this; } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder removeSubjectSets(int index) { if (subjectSetsBuilder_ == null) { @@ -1205,22 +852,14 @@ public Builder removeSubjectSets(int index) { return this; } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetsBuilder( int index) { return getSubjectSetsFieldBuilder().getBuilder(index); } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index) { @@ -1230,11 +869,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS } } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsOrBuilderList() { @@ -1245,22 +880,14 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS } } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder() { return getSubjectSetsFieldBuilder().addBuilder( io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder( int index) { @@ -1268,11 +895,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe index, io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); } /** - *
    -     * multiple Subject Sets are evaluated with AND logic
    -     * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsBuilderList() { @@ -1285,13 +908,134 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe 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_ & 0x00000008) != 0), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); subjectSets_ = null; } return subjectSetsBuilder_; } + + 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 = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .common.Metadata metadata = 100 [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 = 100 [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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [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_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .common.Metadata metadata = 100 [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 = 100 [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_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java index 4327f011c0..17d2584774 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreate.java @@ -41,41 +41,15 @@ protected java.lang.Object newInstance( } 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 SUBJECT_SETS_FIELD_NUMBER = 2; + public static final int SUBJECT_SETS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List subjectSets_; /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List getSubjectSetsList() { @@ -83,10 +57,10 @@ public java.util.List getS } /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public java.util.List @@ -95,10 +69,10 @@ public java.util.List getS } /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public int getSubjectSetsCount() { @@ -106,10 +80,10 @@ public int getSubjectSetsCount() { } /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { @@ -117,10 +91,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int i } /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( @@ -128,6 +102,47 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS return subjectSets_.get(index); } + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
    +   * Optional
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
    +   * Optional
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [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_; + } + /** + *
    +   * Optional
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : metadata_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -142,11 +157,11 @@ public final boolean isInitialized() { @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 < subjectSets_.size(); i++) { - output.writeMessage(2, subjectSets_.get(i)); + output.writeMessage(1, subjectSets_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); } getUnknownFields().writeTo(output); } @@ -157,13 +172,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) != 0)) { + for (int i = 0; i < subjectSets_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getMetadata()); + .computeMessageSize(1, subjectSets_.get(i)); } - for (int i = 0; i < subjectSets_.size(); i++) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, subjectSets_.get(i)); + .computeMessageSize(100, getMetadata()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -180,13 +195,13 @@ public boolean equals(final java.lang.Object obj) { } io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate other = (io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate) obj; + if (!getSubjectSetsList() + .equals(other.getSubjectSetsList())) return false; if (hasMetadata() != other.hasMetadata()) return false; if (hasMetadata()) { if (!getMetadata() .equals(other.getMetadata())) return false; } - if (!getSubjectSetsList() - .equals(other.getSubjectSetsList())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -198,14 +213,14 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - if (hasMetadata()) { - hash = (37 * hash) + METADATA_FIELD_NUMBER; - hash = (53 * hash) + getMetadata().hashCode(); - } if (getSubjectSetsCount() > 0) { hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; hash = (53 * hash) + getSubjectSetsList().hashCode(); } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -336,26 +351,26 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); getSubjectSetsFieldBuilder(); + getMetadataFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } if (subjectSetsBuilder_ == null) { subjectSets_ = java.util.Collections.emptyList(); } else { subjectSets_ = null; subjectSetsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } return this; } @@ -390,9 +405,9 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate build private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result) { if (subjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0)) { + if (((bitField0_ & 0x00000001) != 0)) { subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); } result.subjectSets_ = subjectSets_; } else { @@ -403,7 +418,7 @@ private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmappin private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) != 0)) { + if (((from_bitField0_ & 0x00000002) != 0)) { result.metadata_ = metadataBuilder_ == null ? metadata_ : metadataBuilder_.build(); @@ -456,14 +471,11 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate other) { if (other == io.opentdf.platform.policy.subjectmapping.SubjectConditionSetCreate.getDefaultInstance()) return this; - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } if (subjectSetsBuilder_ == null) { if (!other.subjectSets_.isEmpty()) { if (subjectSets_.isEmpty()) { subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); } else { ensureSubjectSetsIsMutable(); subjectSets_.addAll(other.subjectSets_); @@ -476,7 +488,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectCondit subjectSetsBuilder_.dispose(); subjectSetsBuilder_ = null; subjectSets_ = other.subjectSets_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); subjectSetsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSubjectSetsFieldBuilder() : null; @@ -485,6 +497,9 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectCondit } } } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -512,13 +527,6 @@ public Builder mergeFrom( done = true; break; case 10: { - input.readMessage( - getMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000001; - break; - } // case 10 - case 18: { io.opentdf.platform.policy.subjectmapping.SubjectSet m = input.readMessage( io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), @@ -530,7 +538,14 @@ public Builder mergeFrom( subjectSetsBuilder_.addMessage(m); } break; - } // case 18 + } // case 10 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 802 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -548,133 +563,12 @@ public Builder mergeFrom( } 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 subjectSets_ = java.util.Collections.emptyList(); private void ensureSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!((bitField0_ & 0x00000001) != 0)) { subjectSets_ = new java.util.ArrayList(subjectSets_); - bitField0_ |= 0x00000002; + bitField0_ |= 0x00000001; } } @@ -683,10 +577,10 @@ private void ensureSubjectSetsIsMutable() { /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsList() { if (subjectSetsBuilder_ == null) { @@ -697,10 +591,10 @@ public java.util.List getS } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public int getSubjectSetsCount() { if (subjectSetsBuilder_ == null) { @@ -711,10 +605,10 @@ public int getSubjectSetsCount() { } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { if (subjectSetsBuilder_ == null) { @@ -725,10 +619,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int i } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -746,10 +640,10 @@ public Builder setSubjectSets( } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -764,10 +658,10 @@ public Builder setSubjectSets( } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { if (subjectSetsBuilder_ == null) { @@ -784,10 +678,10 @@ public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectS } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -805,10 +699,10 @@ public Builder addSubjectSets( } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -823,10 +717,10 @@ public Builder addSubjectSets( } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -841,10 +735,10 @@ public Builder addSubjectSets( } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder addAllSubjectSets( java.lang.Iterable values) { @@ -860,15 +754,15 @@ public Builder addAllSubjectSets( } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder clearSubjectSets() { if (subjectSetsBuilder_ == null) { subjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { subjectSetsBuilder_.clear(); @@ -877,10 +771,10 @@ public Builder clearSubjectSets() { } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public Builder removeSubjectSets(int index) { if (subjectSetsBuilder_ == null) { @@ -894,10 +788,10 @@ public Builder removeSubjectSets(int index) { } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetsBuilder( int index) { @@ -905,10 +799,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSe } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index) { @@ -919,10 +813,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsOrBuilderList() { @@ -934,10 +828,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectS } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder() { return getSubjectSetsFieldBuilder().addBuilder( @@ -945,10 +839,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder( int index) { @@ -957,10 +851,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe } /** *
    -     * multiple Subject Sets are evaluated with AND logic
    +     * Required
          * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ public java.util.List getSubjectSetsBuilderList() { @@ -973,13 +867,179 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSe 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_ & 0x00000002) != 0), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); subjectSets_ = null; } return subjectSetsBuilder_; } + + 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_; + /** + *
    +     * Optional
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000002) != 0); + } + /** + *
    +     * Optional
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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(); + } + } + /** + *
    +     * Optional
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * Optional
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_ |= 0x00000002; + onChanged(); + return this; + } + /** + *
    +     * Optional
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } + return this; + } + /** + *
    +     * Optional
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
    +     * Optional
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000002; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
    +     * Optional
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_; + } + } + /** + *
    +     * Optional
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java index 5dabf06b05..34ea4721be 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetCreateOrBuilder.java @@ -8,62 +8,77 @@ public interface SubjectConditionSetCreateOrBuilder extends // @@protoc_insertion_point(interface_extends:policy.subjectmapping.SubjectConditionSetCreate) 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(); - /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ java.util.List getSubjectSetsList(); /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index); /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ int getSubjectSetsCount(); /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ java.util.List getSubjectSetsOrBuilderList(); /** *
    -   * multiple Subject Sets are evaluated with AND logic
    +   * Required
        * 
    * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 1 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index); + + /** + *
    +   * Optional
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
    +   * Optional
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
    +   * Optional
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetOrBuilder.java index 5c7bc5d970..d3e6049b18 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/SubjectConditionSetOrBuilder.java @@ -21,81 +21,41 @@ public interface SubjectConditionSetOrBuilder extends getIdBytes(); /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string name = 2 [json_name = "name"]; - * @return The name. - */ - java.lang.String getName(); - /** - *
    -   * an optional name for ease of reference
    -   * 
    - * - * string name = 2 [json_name = "name"]; - * @return The bytes for name. - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * .common.Metadata metadata = 3 [json_name = "metadata"]; - * @return Whether the metadata field is set. - */ - boolean hasMetadata(); - /** - * .common.Metadata metadata = 3 [json_name = "metadata"]; - * @return The metadata. - */ - io.opentdf.platform.common.Metadata getMetadata(); - /** - * .common.Metadata metadata = 3 [json_name = "metadata"]; - */ - io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); - - /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ java.util.List getSubjectSetsList(); /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index); /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ int getSubjectSetsCount(); /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ java.util.List getSubjectSetsOrBuilderList(); /** - *
    -   * multiple Subject Sets are evaluated with AND logic
    -   * 
    - * - * repeated .policy.subjectmapping.SubjectSet subject_sets = 4 [json_name = "subjectSets", (.buf.validate.field) = { ... } + * repeated .policy.subjectmapping.SubjectSet subject_sets = 3 [json_name = "subjectSets", (.buf.validate.field) = { ... } */ io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index); + + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder(); } 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 defee7c4b0..a294113a09 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 @@ -95,52 +95,26 @@ public java.lang.String getId() { } } - 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 ATTRIBUTE_VALUE_FIELD_NUMBER = 3; + public static final int ATTRIBUTE_VALUE_FIELD_NUMBER = 2; private io.opentdf.platform.policy.attributes.Value attributeValue_; /** *
        * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
        * 
    * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; * @return Whether the attributeValue field is set. */ @java.lang.Override public boolean hasAttributeValue() { - return ((bitField0_ & 0x00000002) != 0); + return ((bitField0_ & 0x00000001) != 0); } /** *
        * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
        * 
    * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; * @return The attributeValue. */ @java.lang.Override @@ -152,33 +126,33 @@ public io.opentdf.platform.policy.attributes.Value getAttributeValue() { * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; */ @java.lang.Override public io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrBuilder() { return attributeValue_ == null ? io.opentdf.platform.policy.attributes.Value.getDefaultInstance() : attributeValue_; } - public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 4; + public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 3; private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; /** *
        * the reusable SubjectConditionSet mapped to the given Attribute Value
        * 
    * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; * @return Whether the subjectConditionSet field is set. */ @java.lang.Override public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** *
        * the reusable SubjectConditionSet mapped to the given Attribute Value
        * 
    * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; * @return The subjectConditionSet. */ @java.lang.Override @@ -190,14 +164,14 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectC * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } - public static final int ACTIONS_FIELD_NUMBER = 5; + public static final int ACTIONS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List actions_; /** @@ -205,7 +179,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder ge * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ @java.lang.Override public java.util.List getActionsList() { @@ -216,7 +190,7 @@ public java.util.List getActionsList() * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ @java.lang.Override public java.util.List @@ -228,7 +202,7 @@ public java.util.List getActionsList() * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ @java.lang.Override public int getActionsCount() { @@ -239,7 +213,7 @@ public int getActionsCount() { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ @java.lang.Override public io.opentdf.platform.authorization.Action getActions(int index) { @@ -250,7 +224,7 @@ public io.opentdf.platform.authorization.Action getActions(int index) { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ @java.lang.Override public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( @@ -258,6 +232,32 @@ public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( return actions_.get(index); } + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.Metadata metadata_; + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + * .common.Metadata metadata = 100 [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 = 100 [json_name = "metadata"]; + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { + return metadata_ == null ? io.opentdf.platform.common.Metadata.getDefaultInstance() : metadata_; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -276,16 +276,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getMetadata()); + output.writeMessage(2, getAttributeValue()); } if (((bitField0_ & 0x00000002) != 0)) { - output.writeMessage(3, getAttributeValue()); - } - if (((bitField0_ & 0x00000004) != 0)) { - output.writeMessage(4, getSubjectConditionSet()); + output.writeMessage(3, getSubjectConditionSet()); } for (int i = 0; i < actions_.size(); i++) { - output.writeMessage(5, actions_.get(i)); + output.writeMessage(4, actions_.get(i)); + } + if (((bitField0_ & 0x00000004) != 0)) { + output.writeMessage(100, getMetadata()); } getUnknownFields().writeTo(output); } @@ -301,19 +301,19 @@ public int getSerializedSize() { } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getMetadata()); + .computeMessageSize(2, getAttributeValue()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getAttributeValue()); + .computeMessageSize(3, getSubjectConditionSet()); } - if (((bitField0_ & 0x00000004) != 0)) { + for (int i = 0; i < actions_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getSubjectConditionSet()); + .computeMessageSize(4, actions_.get(i)); } - for (int i = 0; i < actions_.size(); i++) { + if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, actions_.get(i)); + .computeMessageSize(100, getMetadata()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -332,11 +332,6 @@ public boolean equals(final java.lang.Object obj) { if (!getId() .equals(other.getId())) return false; - if (hasMetadata() != other.hasMetadata()) return false; - if (hasMetadata()) { - if (!getMetadata() - .equals(other.getMetadata())) return false; - } if (hasAttributeValue() != other.hasAttributeValue()) return false; if (hasAttributeValue()) { if (!getAttributeValue() @@ -349,6 +344,11 @@ public boolean equals(final java.lang.Object obj) { } if (!getActionsList() .equals(other.getActionsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -362,10 +362,6 @@ public int hashCode() { 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 (hasAttributeValue()) { hash = (37 * hash) + ATTRIBUTE_VALUE_FIELD_NUMBER; hash = (53 * hash) + getAttributeValue().hashCode(); @@ -378,6 +374,10 @@ public int hashCode() { hash = (37 * hash) + ACTIONS_FIELD_NUMBER; hash = (53 * hash) + getActionsList().hashCode(); } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -522,10 +522,10 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getMetadataFieldBuilder(); getAttributeValueFieldBuilder(); getSubjectConditionSetFieldBuilder(); getActionsFieldBuilder(); + getMetadataFieldBuilder(); } } @java.lang.Override @@ -533,11 +533,6 @@ public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; - metadata_ = null; - if (metadataBuilder_ != null) { - metadataBuilder_.dispose(); - metadataBuilder_ = null; - } attributeValue_ = null; if (attributeValueBuilder_ != null) { attributeValueBuilder_.dispose(); @@ -554,7 +549,12 @@ public Builder clear() { actions_ = null; actionsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } return this; } @@ -589,9 +589,9 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMapping buildPartial() { private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.SubjectMapping result) { if (actionsBuilder_ == null) { - if (((bitField0_ & 0x00000010) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { actions_ = java.util.Collections.unmodifiableList(actions_); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); } result.actions_ = actions_; } else { @@ -606,21 +606,21 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.SubjectMapp } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { - result.metadata_ = metadataBuilder_ == null - ? metadata_ - : metadataBuilder_.build(); - to_bitField0_ |= 0x00000001; - } - if (((from_bitField0_ & 0x00000004) != 0)) { result.attributeValue_ = attributeValueBuilder_ == null ? attributeValue_ : attributeValueBuilder_.build(); - to_bitField0_ |= 0x00000002; + to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000008) != 0)) { + if (((from_bitField0_ & 0x00000004) != 0)) { result.subjectConditionSet_ = subjectConditionSetBuilder_ == null ? subjectConditionSet_ : subjectConditionSetBuilder_.build(); + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); to_bitField0_ |= 0x00000004; } result.bitField0_ |= to_bitField0_; @@ -675,9 +675,6 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappin bitField0_ |= 0x00000001; onChanged(); } - if (other.hasMetadata()) { - mergeMetadata(other.getMetadata()); - } if (other.hasAttributeValue()) { mergeAttributeValue(other.getAttributeValue()); } @@ -688,7 +685,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappin if (!other.actions_.isEmpty()) { if (actions_.isEmpty()) { actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureActionsIsMutable(); actions_.addAll(other.actions_); @@ -701,7 +698,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappin actionsBuilder_.dispose(); actionsBuilder_ = null; actions_ = other.actions_; - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); actionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getActionsFieldBuilder() : null; @@ -710,6 +707,9 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.SubjectMappin } } } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -743,26 +743,19 @@ public Builder mergeFrom( } // case 10 case 18: { input.readMessage( - getMetadataFieldBuilder().getBuilder(), + getAttributeValueFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000002; break; } // case 18 case 26: { input.readMessage( - getAttributeValueFieldBuilder().getBuilder(), + getSubjectConditionSetFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { - input.readMessage( - getSubjectConditionSetFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000008; - break; - } // case 34 - case 42: { io.opentdf.platform.authorization.Action m = input.readMessage( io.opentdf.platform.authorization.Action.parser(), @@ -774,7 +767,14 @@ public Builder mergeFrom( actionsBuilder_.addMessage(m); } break; - } // case 42 + } // case 34 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 802 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -864,127 +864,6 @@ public Builder setIdBytes( 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 io.opentdf.platform.policy.attributes.Value attributeValue_; private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.policy.attributes.Value, io.opentdf.platform.policy.attributes.Value.Builder, io.opentdf.platform.policy.attributes.ValueOrBuilder> attributeValueBuilder_; @@ -993,18 +872,18 @@ public io.opentdf.platform.common.MetadataOrBuilder getMetadataOrBuilder() { * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; * @return Whether the attributeValue field is set. */ public boolean hasAttributeValue() { - return ((bitField0_ & 0x00000004) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** *
          * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
          * 
    * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; * @return The attributeValue. */ public io.opentdf.platform.policy.attributes.Value getAttributeValue() { @@ -1019,7 +898,7 @@ public io.opentdf.platform.policy.attributes.Value getAttributeValue() { * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; */ public Builder setAttributeValue(io.opentdf.platform.policy.attributes.Value value) { if (attributeValueBuilder_ == null) { @@ -1030,7 +909,7 @@ public Builder setAttributeValue(io.opentdf.platform.policy.attributes.Value val } else { attributeValueBuilder_.setMessage(value); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1039,7 +918,7 @@ public Builder setAttributeValue(io.opentdf.platform.policy.attributes.Value val * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; */ public Builder setAttributeValue( io.opentdf.platform.policy.attributes.Value.Builder builderForValue) { @@ -1048,7 +927,7 @@ public Builder setAttributeValue( } else { attributeValueBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1057,11 +936,11 @@ public Builder setAttributeValue( * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; */ public Builder mergeAttributeValue(io.opentdf.platform.policy.attributes.Value value) { if (attributeValueBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0) && + if (((bitField0_ & 0x00000002) != 0) && attributeValue_ != null && attributeValue_ != io.opentdf.platform.policy.attributes.Value.getDefaultInstance()) { getAttributeValueBuilder().mergeFrom(value); @@ -1072,7 +951,7 @@ public Builder mergeAttributeValue(io.opentdf.platform.policy.attributes.Value v attributeValueBuilder_.mergeFrom(value); } if (attributeValue_ != null) { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); } return this; @@ -1082,10 +961,10 @@ public Builder mergeAttributeValue(io.opentdf.platform.policy.attributes.Value v * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; */ public Builder clearAttributeValue() { - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); attributeValue_ = null; if (attributeValueBuilder_ != null) { attributeValueBuilder_.dispose(); @@ -1099,10 +978,10 @@ public Builder clearAttributeValue() { * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; */ public io.opentdf.platform.policy.attributes.Value.Builder getAttributeValueBuilder() { - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; onChanged(); return getAttributeValueFieldBuilder().getBuilder(); } @@ -1111,7 +990,7 @@ public io.opentdf.platform.policy.attributes.Value.Builder getAttributeValueBuil * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; */ public io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrBuilder() { if (attributeValueBuilder_ != null) { @@ -1126,7 +1005,7 @@ public io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrB * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.policy.attributes.Value, io.opentdf.platform.policy.attributes.Value.Builder, io.opentdf.platform.policy.attributes.ValueOrBuilder> @@ -1150,18 +1029,18 @@ public io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrB * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; * @return Whether the subjectConditionSet field is set. */ public boolean hasSubjectConditionSet() { - return ((bitField0_ & 0x00000008) != 0); + return ((bitField0_ & 0x00000004) != 0); } /** *
          * the reusable SubjectConditionSet mapped to the given Attribute Value
          * 
    * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; * @return The subjectConditionSet. */ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet() { @@ -1176,7 +1055,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectC * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; */ public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { if (subjectConditionSetBuilder_ == null) { @@ -1187,7 +1066,7 @@ public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping. } else { subjectConditionSetBuilder_.setMessage(value); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1196,7 +1075,7 @@ public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping. * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; */ public Builder setSubjectConditionSet( io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder builderForValue) { @@ -1205,7 +1084,7 @@ public Builder setSubjectConditionSet( } else { subjectConditionSetBuilder_.setMessage(builderForValue.build()); } - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1214,11 +1093,11 @@ public Builder setSubjectConditionSet( * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; */ public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { if (subjectConditionSetBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0) && + if (((bitField0_ & 0x00000004) != 0) && subjectConditionSet_ != null && subjectConditionSet_ != io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance()) { getSubjectConditionSetBuilder().mergeFrom(value); @@ -1229,7 +1108,7 @@ public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmappin subjectConditionSetBuilder_.mergeFrom(value); } if (subjectConditionSet_ != null) { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); } return this; @@ -1239,10 +1118,10 @@ public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmappin * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; */ public Builder clearSubjectConditionSet() { - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); subjectConditionSet_ = null; if (subjectConditionSetBuilder_ != null) { subjectConditionSetBuilder_.dispose(); @@ -1256,10 +1135,10 @@ public Builder clearSubjectConditionSet() { * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000004; onChanged(); return getSubjectConditionSetFieldBuilder().getBuilder(); } @@ -1268,7 +1147,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder get * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { if (subjectConditionSetBuilder_ != null) { @@ -1283,7 +1162,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder ge * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> @@ -1302,9 +1181,9 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder ge private java.util.List actions_ = java.util.Collections.emptyList(); private void ensureActionsIsMutable() { - if (!((bitField0_ & 0x00000010) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { actions_ = new java.util.ArrayList(actions_); - bitField0_ |= 0x00000010; + bitField0_ |= 0x00000008; } } @@ -1316,7 +1195,7 @@ private void ensureActionsIsMutable() { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public java.util.List getActionsList() { if (actionsBuilder_ == null) { @@ -1330,7 +1209,7 @@ public java.util.List getActionsList() * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public int getActionsCount() { if (actionsBuilder_ == null) { @@ -1344,7 +1223,7 @@ public int getActionsCount() { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public io.opentdf.platform.authorization.Action getActions(int index) { if (actionsBuilder_ == null) { @@ -1358,7 +1237,7 @@ public io.opentdf.platform.authorization.Action getActions(int index) { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public Builder setActions( int index, io.opentdf.platform.authorization.Action value) { @@ -1379,7 +1258,7 @@ public Builder setActions( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public Builder setActions( int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { @@ -1397,7 +1276,7 @@ public Builder setActions( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public Builder addActions(io.opentdf.platform.authorization.Action value) { if (actionsBuilder_ == null) { @@ -1417,7 +1296,7 @@ public Builder addActions(io.opentdf.platform.authorization.Action value) { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public Builder addActions( int index, io.opentdf.platform.authorization.Action value) { @@ -1438,7 +1317,7 @@ public Builder addActions( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public Builder addActions( io.opentdf.platform.authorization.Action.Builder builderForValue) { @@ -1456,7 +1335,7 @@ public Builder addActions( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public Builder addActions( int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { @@ -1474,7 +1353,7 @@ public Builder addActions( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public Builder addAllActions( java.lang.Iterable values) { @@ -1493,12 +1372,12 @@ public Builder addAllActions( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public Builder clearActions() { if (actionsBuilder_ == null) { actions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { actionsBuilder_.clear(); @@ -1510,7 +1389,7 @@ public Builder clearActions() { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public Builder removeActions(int index) { if (actionsBuilder_ == null) { @@ -1527,7 +1406,7 @@ public Builder removeActions(int index) { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public io.opentdf.platform.authorization.Action.Builder getActionsBuilder( int index) { @@ -1538,7 +1417,7 @@ public io.opentdf.platform.authorization.Action.Builder getActionsBuilder( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( int index) { @@ -1552,7 +1431,7 @@ public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public java.util.List getActionsOrBuilderList() { @@ -1567,7 +1446,7 @@ public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder() { return getActionsFieldBuilder().addBuilder( @@ -1578,7 +1457,7 @@ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder() { * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( int index) { @@ -1590,7 +1469,7 @@ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ public java.util.List getActionsBuilderList() { @@ -1603,13 +1482,134 @@ public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( actions_, - ((bitField0_ & 0x00000010) != 0), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); actions_ = null; } return actionsBuilder_; } + + 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 = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000010) != 0); + } + /** + * .common.Metadata metadata = 100 [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 = 100 [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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [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_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.Metadata value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000010) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.Metadata.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000010; + onChanged(); + } + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000010); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.Metadata.Builder getMetadataBuilder() { + bitField0_ |= 0x00000010; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + * .common.Metadata metadata = 100 [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 = 100 [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_; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { 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 a0d1420380..5207a5528d 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 @@ -20,27 +20,12 @@ public interface SubjectMappingOrBuilder extends 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 Attribute Value mapped to; aka: "The Entity Entitlement Attribute"
        * 
    * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; * @return Whether the attributeValue field is set. */ boolean hasAttributeValue(); @@ -49,7 +34,7 @@ public interface SubjectMappingOrBuilder extends * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; * @return The attributeValue. */ io.opentdf.platform.policy.attributes.Value getAttributeValue(); @@ -58,7 +43,7 @@ public interface SubjectMappingOrBuilder extends * the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" * * - * .policy.attributes.Value attribute_value = 3 [json_name = "attributeValue"]; + * .policy.attributes.Value attribute_value = 2 [json_name = "attributeValue"]; */ io.opentdf.platform.policy.attributes.ValueOrBuilder getAttributeValueOrBuilder(); @@ -67,7 +52,7 @@ public interface SubjectMappingOrBuilder extends * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; * @return Whether the subjectConditionSet field is set. */ boolean hasSubjectConditionSet(); @@ -76,7 +61,7 @@ public interface SubjectMappingOrBuilder extends * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; * @return The subjectConditionSet. */ io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); @@ -85,7 +70,7 @@ public interface SubjectMappingOrBuilder extends * the reusable SubjectConditionSet mapped to the given Attribute Value * * - * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 4 [json_name = "subjectConditionSet"]; + * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 3 [json_name = "subjectConditionSet"]; */ io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); @@ -94,7 +79,7 @@ public interface SubjectMappingOrBuilder extends * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ java.util.List getActionsList(); @@ -103,7 +88,7 @@ public interface SubjectMappingOrBuilder extends * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ io.opentdf.platform.authorization.Action getActions(int index); /** @@ -111,7 +96,7 @@ public interface SubjectMappingOrBuilder extends * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ int getActionsCount(); /** @@ -119,7 +104,7 @@ public interface SubjectMappingOrBuilder extends * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ java.util.List getActionsOrBuilderList(); @@ -128,8 +113,23 @@ public interface SubjectMappingOrBuilder extends * The actions permitted by subjects in this mapping * * - * repeated .authorization.Action actions = 5 [json_name = "actions"]; + * repeated .authorization.Action actions = 4 [json_name = "actions"]; */ io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( int index); + + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + * .common.Metadata metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.Metadata getMetadata(); + /** + * .common.Metadata metadata = 100 [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 9469715196..2c9556ddef 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 @@ -188,156 +188,158 @@ public static void registerAllExtensions( "\202\001\002\020\001\310\001\001R\017booleanOperator\"h\n\nSubjectSet\022" + "Z\n\020condition_groups\030\001 \003(\0132%.policy.subje" + "ctmapping.ConditionGroupB\010\272H\005\222\001\002\010\001R\017cond" + - "itionGroups\"\267\001\n\023SubjectConditionSet\022\016\n\002i" + - "d\030\001 \001(\tR\002id\022\022\n\004name\030\002 \001(\tR\004name\022,\n\010metad" + - "ata\030\003 \001(\0132\020.common.MetadataR\010metadata\022N\n" + - "\014subject_sets\030\004 \003(\0132!.policy.subjectmapp" + - "ing.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\242\002" + - "\n\016SubjectMapping\022\016\n\002id\030\001 \001(\tR\002id\022,\n\010meta" + - "data\030\002 \001(\0132\020.common.MetadataR\010metadata\022A" + - "\n\017attribute_value\030\003 \001(\0132\030.policy.attribu" + - "tes.ValueR\016attributeValue\022^\n\025subject_con" + - "dition_set\030\004 \001(\0132*.policy.subjectmapping" + - ".SubjectConditionSetR\023subjectConditionSe" + - "t\022/\n\007actions\030\005 \003(\0132\025.authorization.Actio" + - "nR\007actions\"B\n\007Subject\0227\n\nattributes\030\001 \001(" + - "\0132\027.google.protobuf.StructR\nattributes\"W" + - "\n\033MatchSubjectMappingsRequest\0228\n\007subject" + - "\030\001 \001(\0132\036.policy.subjectmapping.SubjectR\007" + - "subject\"p\n\034MatchSubjectMappingsResponse\022" + - "P\n\020subject_mappings\030\001 \003(\0132%.policy.subje" + - "ctmapping.SubjectMappingR\017subjectMapping" + - "s\"2\n\030GetSubjectMappingRequest\022\026\n\002id\030\001 \001(" + - "\tB\006\272H\003\310\001\001R\002id\"k\n\031GetSubjectMappingRespon" + - "se\022N\n\017subject_mapping\030\001 \001(\0132%.policy.sub" + - "jectmapping.SubjectMappingR\016subjectMappi" + - "ng\"\034\n\032ListSubjectMappingsRequest\"o\n\033List" + - "SubjectMappingsResponse\022P\n\020subject_mappi" + - "ngs\030\001 \003(\0132%.policy.subjectmapping.Subjec" + - "tMappingR\017subjectMappings\"\372\002\n\033CreateSubj" + - "ectMappingRequest\0223\n\010metadata\030\001 \001(\0132\027.co" + - "mmon.MetadataMutableR\010metadata\0224\n\022attrib" + - "ute_value_id\030\002 \001(\tB\006\272H\003\310\001\001R\020attributeVal" + - "ueId\022H\n!existing_subject_condition_set_i" + - "d\030\003 \001(\tR\035existingSubjectConditionSetId\022k" + - "\n\031new_subject_condition_set\030\004 \001(\01320.poli" + - "cy.subjectmapping.SubjectConditionSetCre" + - "ateR\026newSubjectConditionSet\0229\n\007actions\030\005" + - " \003(\0132\025.authorization.ActionB\010\272H\005\222\001\002\010\001R\007a" + - "ctions\"n\n\034CreateSubjectMappingResponse\022N" + + "itionGroups\"\243\001\n\023SubjectConditionSet\022\016\n\002i" + + "d\030\001 \001(\tR\002id\022N\n\014subject_sets\030\003 \003(\0132!.poli" + + "cy.subjectmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013" + + "subjectSets\022,\n\010metadata\030d \001(\0132\020.common.M" + + "etadataR\010metadata\"\242\002\n\016SubjectMapping\022\016\n\002" + + "id\030\001 \001(\tR\002id\022A\n\017attribute_value\030\002 \001(\0132\030." + + "policy.attributes.ValueR\016attributeValue\022" + + "^\n\025subject_condition_set\030\003 \001(\0132*.policy." + + "subjectmapping.SubjectConditionSetR\023subj" + + "ectConditionSet\022/\n\007actions\030\004 \003(\0132\025.autho" + + "rization.ActionR\007actions\022,\n\010metadata\030d \001" + + "(\0132\020.common.MetadataR\010metadata\"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\"2\n\030GetSubjectMappi" + + "ngRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"k\n\031Get" + + "SubjectMappingResponse\022N\n\017subject_mappin" + + "g\030\001 \001(\0132%.policy.subjectmapping.SubjectM" + + "appingR\016subjectMapping\"\034\n\032ListSubjectMap" + + "pingsRequest\"o\n\033ListSubjectMappingsRespo" + + "nse\022P\n\020subject_mappings\030\001 \003(\0132%.policy.s" + + "ubjectmapping.SubjectMappingR\017subjectMap" + + "pings\"\372\002\n\033CreateSubjectMappingRequest\0224\n" + + "\022attribute_value_id\030\001 \001(\tB\006\272H\003\310\001\001R\020attri" + + "buteValueId\0229\n\007actions\030\002 \003(\0132\025.authoriza" + + "tion.ActionB\010\272H\005\222\001\002\010\001R\007actions\022H\n!existi" + + "ng_subject_condition_set_id\030\003 \001(\tR\035exist" + + "ingSubjectConditionSetId\022k\n\031new_subject_" + + "condition_set\030\004 \001(\01320.policy.subjectmapp" + + "ing.SubjectConditionSetCreateR\026newSubjec" + + "tConditionSet\0223\n\010metadata\030d \001(\0132\027.common" + + ".MetadataMutableR\010metadata\"n\n\034CreateSubj" + + "ectMappingResponse\022N\n\017subject_mapping\030\001 " + + "\001(\0132%.policy.subjectmapping.SubjectMappi" + + "ngR\016subjectMapping\"\252\002\n\033UpdateSubjectMapp" + + "ingRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\0227\n\030su" + + "bject_condition_set_id\030\002 \001(\tR\025subjectCon" + + "ditionSetId\022/\n\007actions\030\003 \003(\0132\025.authoriza" + + "tion.ActionR\007actions\0223\n\010metadata\030d \001(\0132\027" + + ".common.MetadataMutableR\010metadata\022T\n\030met" + + "adata_update_behavior\030e \001(\0162\032.common.Met" + + "adataUpdateEnumR\026metadataUpdateBehavior\"" + + "n\n\034UpdateSubjectMappingResponse\022N\n\017subje" + + "ct_mapping\030\001 \001(\0132%.policy.subjectmapping" + + ".SubjectMappingR\016subjectMapping\"5\n\033Delet" + + "eSubjectMappingRequest\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.subject" + - "mapping.SubjectMappingR\016subjectMapping\"\373" + - "\001\n\033UpdateSubjectMappingRequest\022\026\n\002id\030\001 \001" + - "(\tB\006\272H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132" + - "\027.common.MetadataMutableR\016updateMetadata" + - "\022D\n\037update_subject_condition_set_id\030\003 \001(" + - "\tR\033updateSubjectConditionSetId\022<\n\016update" + - "_actions\030\005 \003(\0132\025.authorization.ActionR\ru" + - "pdateActions\"n\n\034UpdateSubjectMappingResp" + - "onse\022N\n\017subject_mapping\030\001 \001(\0132%.policy.s" + - "ubjectmapping.SubjectMappingR\016subjectMap" + - "ping\"5\n\033DeleteSubjectMappingRequest\022\026\n\002i" + - "d\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"n\n\034DeleteSubjectMapp" + - "ingResponse\022N\n\017subject_mapping\030\001 \001(\0132%.p" + - "olicy.subjectmapping.SubjectMappingR\016sub" + - "jectMapping\"7\n\035GetSubjectConditionSetReq" + - "uest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetSubj" + - "ectConditionSetResponse\022^\n\025subject_condi" + - "tion_set\030\001 \001(\0132*.policy.subjectmapping.S" + - "ubjectConditionSetR\023subjectConditionSet\022" + - "e\n\033associated_subject_mappings\030\002 \003(\0132%.p" + - "olicy.subjectmapping.SubjectMappingR\031ass" + - "ociatedSubjectMappings\"!\n\037ListSubjectCon" + - "ditionSetsRequest\"\204\001\n ListSubjectConditi" + - "onSetsResponse\022`\n\026subject_condition_sets" + - "\030\001 \003(\0132*.policy.subjectmapping.SubjectCo" + - "nditionSetR\024subjectConditionSets\"\240\001\n\031Sub" + - "jectConditionSetCreate\0223\n\010metadata\030\001 \001(\013" + - "2\027.common.MetadataMutableR\010metadata\022N\n\014s" + - "ubject_sets\030\002 \003(\0132!.policy.subjectmappin" + - "g.SubjectSetB\010\272H\005\222\001\002\010\001R\013subjectSets\"\210\001\n " + - "CreateSubjectConditionSetRequest\022d\n\025subj" + - "ect_condition_set\030\001 \001(\01320.policy.subject" + - "mapping.SubjectConditionSetCreateR\023subje" + - "ctConditionSet\"\203\001\n!CreateSubjectConditio" + - "nSetResponse\022^\n\025subject_condition_set\030\001 " + - "\001(\0132*.policy.subjectmapping.SubjectCondi" + - "tionSetR\023subjectConditionSet\"\317\001\n UpdateS" + - "ubjectConditionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272" + - "H\003\310\001\001R\002id\022@\n\017update_metadata\030\002 \001(\0132\027.com" + - "mon.MetadataMutableR\016updateMetadata\022Q\n\023u" + - "pdate_subject_sets\030\003 \003(\0132!.policy.subjec" + - "tmapping.SubjectSetR\021updateSubjectSets\"\203" + - "\001\n!UpdateSubjectConditionSetResponse\022^\n\025" + - "subject_condition_set\030\001 \001(\0132*.policy.sub" + - "jectmapping.SubjectConditionSetR\023subject" + - "ConditionSet\":\n DeleteSubjectConditionSe" + - "tRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"\203\001\n!Del" + - "eteSubjectConditionSetResponse\022^\n\025subjec" + - "t_condition_set\030\001 \001(\0132*.policy.subjectma" + - "pping.SubjectConditionSetR\023subjectCondit" + - "ionSet*\233\001\n\032SubjectMappingOperatorEnum\022-\n" + - ")SUBJECT_MAPPING_OPERATOR_ENUM_UNSPECIFI" + - "ED\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\'CON" + - "DITION_BOOLEAN_TYPE_ENUM_UNSPECIFIED\020\000\022#" + - "\n\037CONDITION_BOOLEAN_TYPE_ENUM_AND\020\001\022\"\n\036C" + - "ONDITION_BOOLEAN_TYPE_ENUM_OR\020\0022\340\016\n\025Subj" + - "ectMappingService\022\251\001\n\024MatchSubjectMappin" + - "gs\0222.policy.subjectmapping.MatchSubjectM" + - "appingsRequest\0323.policy.subjectmapping.M" + - "atchSubjectMappingsResponse\"(\202\323\344\223\002\"\"\027/su" + - "bject-mappings/match:\007subject\022\227\001\n\023ListSu" + - "bjectMappings\0221.policy.subjectmapping.Li" + - "stSubjectMappingsRequest\0322.policy.subjec" + - "tmapping.ListSubjectMappingsResponse\"\031\202\323" + - "\344\223\002\023\022\021/subject-mappings\022\226\001\n\021GetSubjectMa" + - "pping\022/.policy.subjectmapping.GetSubject" + - "MappingRequest\0320.policy.subjectmapping.G" + - "etSubjectMappingResponse\"\036\202\323\344\223\002\030\022\026/subje" + - "ct-mappings/{id}\022\235\001\n\024CreateSubjectMappin" + - "g\0222.policy.subjectmapping.CreateSubjectM" + - "appingRequest\0323.policy.subjectmapping.Cr" + - "eateSubjectMappingResponse\"\034\202\323\344\223\002\026\"\021/sub" + - "ject-mappings:\001*\022\242\001\n\024UpdateSubjectMappin" + - "g\0222.policy.subjectmapping.UpdateSubjectM" + - "appingRequest\0323.policy.subjectmapping.Up" + - "dateSubjectMappingResponse\"!\202\323\344\223\002\0332\026/sub" + - "ject-mappings/{id}:\001*\022\237\001\n\024DeleteSubjectM" + - "apping\0222.policy.subjectmapping.DeleteSub" + - "jectMappingRequest\0323.policy.subjectmappi" + - "ng.DeleteSubjectMappingResponse\"\036\202\323\344\223\002\030*" + - "\026/subject-mappings/{id}\022\254\001\n\030ListSubjectC" + - "onditionSets\0226.policy.subjectmapping.Lis" + - "tSubjectConditionSetsRequest\0327.policy.su" + - "bjectmapping.ListSubjectConditionSetsRes" + - "ponse\"\037\202\323\344\223\002\031\022\027/subject-condition-sets\022\253" + - "\001\n\026GetSubjectConditionSet\0224.policy.subje" + - "ctmapping.GetSubjectConditionSetRequest\032" + - "5.policy.subjectmapping.GetSubjectCondit" + - "ionSetResponse\"$\202\323\344\223\002\036\022\034/subject-conditi" + - "on-sets/{id}\022\262\001\n\031CreateSubjectConditionS" + - "et\0227.policy.subjectmapping.CreateSubject" + - "ConditionSetRequest\0328.policy.subjectmapp" + - "ing.CreateSubjectConditionSetResponse\"\"\202" + - "\323\344\223\002\034\"\027/subject-condition-sets:\001*\022\267\001\n\031Up" + - "dateSubjectConditionSet\0227.policy.subject" + - "mapping.UpdateSubjectConditionSetRequest" + - "\0328.policy.subjectmapping.UpdateSubjectCo" + - "nditionSetResponse\"\'\202\323\344\223\002!2\034/subject-con" + - "dition-sets/{id}:\001*\022\264\001\n\031DeleteSubjectCon" + - "ditionSet\0227.policy.subjectmapping.Delete" + - "SubjectConditionSetRequest\0328.policy.subj" + - "ectmapping.DeleteSubjectConditionSetResp" + - "onse\"$\202\323\344\223\002\036*\034/subject-condition-sets/{i" + - "d}B\364\001\n)io.opentdf.platform.policy.subjec" + - "tmappingB\023SubjectMappingProtoP\001Z=github." + - "com/opentdf/platform/protocol/go/policy/" + - "subjectmapping\242\002\003PSX\252\002\025Policy.Subjectmap" + - "ping\312\002\025Policy\\Subjectmapping\342\002!Policy\\Su" + - "bjectmapping\\GPBMetadata\352\002\026Policy::Subje" + - "ctmappingb\006proto3" + "mapping.SubjectMappingR\016subjectMapping\"7" + + "\n\035GetSubjectConditionSetRequest\022\026\n\002id\030\001 " + + "\001(\tB\006\272H\003\310\001\001R\002id\"\347\001\n\036GetSubjectConditionS" + + "etResponse\022^\n\025subject_condition_set\030\001 \001(" + + "\0132*.policy.subjectmapping.SubjectConditi" + + "onSetR\023subjectConditionSet\022e\n\033associated" + + "_subject_mappings\030\002 \003(\0132%.policy.subject" + + "mapping.SubjectMappingR\031associatedSubjec" + + "tMappings\"!\n\037ListSubjectConditionSetsReq" + + "uest\"\204\001\n ListSubjectConditionSetsRespons" + + "e\022`\n\026subject_condition_sets\030\001 \003(\0132*.poli" + + "cy.subjectmapping.SubjectConditionSetR\024s" + + "ubjectConditionSets\"\240\001\n\031SubjectCondition" + + "SetCreate\022N\n\014subject_sets\030\001 \003(\0132!.policy" + + ".subjectmapping.SubjectSetB\010\272H\005\222\001\002\010\001R\013su" + + "bjectSets\0223\n\010metadata\030d \001(\0132\027.common.Met" + + "adataMutableR\010metadata\"\210\001\n CreateSubject" + + "ConditionSetRequest\022d\n\025subject_condition" + + "_set\030\001 \001(\01320.policy.subjectmapping.Subje" + + "ctConditionSetCreateR\023subjectConditionSe" + + "t\"\203\001\n!CreateSubjectConditionSetResponse\022" + + "^\n\025subject_condition_set\030\001 \001(\0132*.policy." + + "subjectmapping.SubjectConditionSetR\023subj" + + "ectConditionSet\"\230\002\n UpdateSubjectConditi" + + "onSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022Q\n\023" + + "update_subject_sets\030\002 \003(\0132!.policy.subje" + + "ctmapping.SubjectSetR\021updateSubjectSets\022" + + "3\n\010metadata\030d \001(\0132\027.common.MetadataMutab" + + "leR\010metadata\022T\n\030metadata_update_behavior" + + "\030e \001(\0162\032.common.MetadataUpdateEnumR\026meta" + + "dataUpdateBehavior\"\203\001\n!UpdateSubjectCond" + + "itionSetResponse\022^\n\025subject_condition_se" + + "t\030\001 \001(\0132*.policy.subjectmapping.SubjectC" + + "onditionSetR\023subjectConditionSet\":\n Dele" + + "teSubjectConditionSetRequest\022\026\n\002id\030\001 \001(\t" + + "B\006\272H\003\310\001\001R\002id\"\203\001\n!DeleteSubjectConditionS" + + "etResponse\022^\n\025subject_condition_set\030\001 \001(" + + "\0132*.policy.subjectmapping.SubjectConditi" + + "onSetR\023subjectConditionSet*\233\001\n\032SubjectMa" + + "ppingOperatorEnum\022-\n)SUBJECT_MAPPING_OPE" + + "RATOR_ENUM_UNSPECIFIED\020\000\022$\n SUBJECT_MAPP" + + "ING_OPERATOR_ENUM_IN\020\001\022(\n$SUBJECT_MAPPIN" + + "G_OPERATOR_ENUM_NOT_IN\020\002*\220\001\n\030ConditionBo" + + "oleanTypeEnum\022+\n\'CONDITION_BOOLEAN_TYPE_" + + "ENUM_UNSPECIFIED\020\000\022#\n\037CONDITION_BOOLEAN_" + + "TYPE_ENUM_AND\020\001\022\"\n\036CONDITION_BOOLEAN_TYP" + + "E_ENUM_OR\020\0022\340\016\n\025SubjectMappingService\022\251\001" + + "\n\024MatchSubjectMappings\0222.policy.subjectm" + + "apping.MatchSubjectMappingsRequest\0323.pol" + + "icy.subjectmapping.MatchSubjectMappingsR" + + "esponse\"(\202\323\344\223\002\"\"\027/subject-mappings/match" + + ":\007subject\022\227\001\n\023ListSubjectMappings\0221.poli" + + "cy.subjectmapping.ListSubjectMappingsReq" + + "uest\0322.policy.subjectmapping.ListSubject" + + "MappingsResponse\"\031\202\323\344\223\002\023\022\021/subject-mappi" + + "ngs\022\226\001\n\021GetSubjectMapping\022/.policy.subje" + + "ctmapping.GetSubjectMappingRequest\0320.pol" + + "icy.subjectmapping.GetSubjectMappingResp" + + "onse\"\036\202\323\344\223\002\030\022\026/subject-mappings/{id}\022\235\001\n" + + "\024CreateSubjectMapping\0222.policy.subjectma" + + "pping.CreateSubjectMappingRequest\0323.poli" + + "cy.subjectmapping.CreateSubjectMappingRe" + + "sponse\"\034\202\323\344\223\002\026\"\021/subject-mappings:\001*\022\242\001\n" + + "\024UpdateSubjectMapping\0222.policy.subjectma" + + "pping.UpdateSubjectMappingRequest\0323.poli" + + "cy.subjectmapping.UpdateSubjectMappingRe" + + "sponse\"!\202\323\344\223\002\0332\026/subject-mappings/{id}:\001" + + "*\022\237\001\n\024DeleteSubjectMapping\0222.policy.subj" + + "ectmapping.DeleteSubjectMappingRequest\0323" + + ".policy.subjectmapping.DeleteSubjectMapp" + + "ingResponse\"\036\202\323\344\223\002\030*\026/subject-mappings/{" + + "id}\022\254\001\n\030ListSubjectConditionSets\0226.polic" + + "y.subjectmapping.ListSubjectConditionSet" + + "sRequest\0327.policy.subjectmapping.ListSub" + + "jectConditionSetsResponse\"\037\202\323\344\223\002\031\022\027/subj" + + "ect-condition-sets\022\253\001\n\026GetSubjectConditi" + + "onSet\0224.policy.subjectmapping.GetSubject" + + "ConditionSetRequest\0325.policy.subjectmapp" + + "ing.GetSubjectConditionSetResponse\"$\202\323\344\223" + + "\002\036\022\034/subject-condition-sets/{id}\022\262\001\n\031Cre" + + "ateSubjectConditionSet\0227.policy.subjectm" + + "apping.CreateSubjectConditionSetRequest\032" + + "8.policy.subjectmapping.CreateSubjectCon" + + "ditionSetResponse\"\"\202\323\344\223\002\034\"\027/subject-cond" + + "ition-sets:\001*\022\267\001\n\031UpdateSubjectCondition" + + "Set\0227.policy.subjectmapping.UpdateSubjec" + + "tConditionSetRequest\0328.policy.subjectmap" + + "ping.UpdateSubjectConditionSetResponse\"\'" + + "\202\323\344\223\002!2\034/subject-condition-sets/{id}:\001*\022" + + "\264\001\n\031DeleteSubjectConditionSet\0227.policy.s" + + "ubjectmapping.DeleteSubjectConditionSetR" + + "equest\0328.policy.subjectmapping.DeleteSub" + + "jectConditionSetResponse\"$\202\323\344\223\002\036*\034/subje" + + "ct-condition-sets/{id}B\364\001\n)io.opentdf.pl" + + "atform.policy.subjectmappingB\023SubjectMap" + + "pingProtoP\001Z=github.com/opentdf/platform" + + "/protocol/go/policy/subjectmapping\242\002\003PSX" + + "\252\002\025Policy.Subjectmapping\312\002\025Policy\\Subjec" + + "tmapping\342\002!Policy\\Subjectmapping\\GPBMeta" + + "data\352\002\026Policy::Subjectmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -372,13 +374,13 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_SubjectConditionSet_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectConditionSet_descriptor, - new java.lang.String[] { "Id", "Name", "Metadata", "SubjectSets", }); + new java.lang.String[] { "Id", "SubjectSets", "Metadata", }); internal_static_policy_subjectmapping_SubjectMapping_descriptor = getDescriptor().getMessageTypes().get(4); 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", "SubjectConditionSet", "Actions", }); + new java.lang.String[] { "Id", "AttributeValue", "SubjectConditionSet", "Actions", "Metadata", }); internal_static_policy_subjectmapping_Subject_descriptor = getDescriptor().getMessageTypes().get(5); internal_static_policy_subjectmapping_Subject_fieldAccessorTable = new @@ -426,7 +428,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_CreateSubjectMappingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_CreateSubjectMappingRequest_descriptor, - new java.lang.String[] { "Metadata", "AttributeValueId", "ExistingSubjectConditionSetId", "NewSubjectConditionSet", "Actions", }); + new java.lang.String[] { "AttributeValueId", "Actions", "ExistingSubjectConditionSetId", "NewSubjectConditionSet", "Metadata", }); internal_static_policy_subjectmapping_CreateSubjectMappingResponse_descriptor = getDescriptor().getMessageTypes().get(13); internal_static_policy_subjectmapping_CreateSubjectMappingResponse_fieldAccessorTable = new @@ -438,7 +440,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectMappingRequest_descriptor, - new java.lang.String[] { "Id", "UpdateMetadata", "UpdateSubjectConditionSetId", "UpdateActions", }); + new java.lang.String[] { "Id", "SubjectConditionSetId", "Actions", "Metadata", "MetadataUpdateBehavior", }); internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_descriptor = getDescriptor().getMessageTypes().get(15); internal_static_policy_subjectmapping_UpdateSubjectMappingResponse_fieldAccessorTable = new @@ -486,7 +488,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_SubjectConditionSetCreate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_SubjectConditionSetCreate_descriptor, - new java.lang.String[] { "Metadata", "SubjectSets", }); + new java.lang.String[] { "SubjectSets", "Metadata", }); internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_descriptor = getDescriptor().getMessageTypes().get(23); internal_static_policy_subjectmapping_CreateSubjectConditionSetRequest_fieldAccessorTable = new @@ -504,7 +506,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor, - new java.lang.String[] { "Id", "UpdateMetadata", "UpdateSubjectSets", }); + new java.lang.String[] { "Id", "UpdateSubjectSets", "Metadata", "MetadataUpdateBehavior", }); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java index 3b16b059ab..c42e040caa 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java @@ -19,6 +19,7 @@ private UpdateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3. private UpdateSubjectConditionSetRequest() { id_ = ""; updateSubjectSets_ = java.util.Collections.emptyList(); + metadataUpdateBehavior_ = 0; } @java.lang.Override @@ -46,6 +47,10 @@ protected java.lang.Object newInstance( @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** + *
    +   * Required
    +   * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The id. */ @@ -63,6 +68,10 @@ public java.lang.String getId() { } } /** + *
    +   * Required
    +   * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The bytes for id. */ @@ -81,41 +90,16 @@ public java.lang.String getId() { } } - public static final int UPDATE_METADATA_FIELD_NUMBER = 2; - private io.opentdf.platform.common.MetadataMutable updateMetadata_; - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return Whether the updateMetadata field is set. - */ - @java.lang.Override - public boolean hasUpdateMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return The updateMetadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { - return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { - return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } - - public static final int UPDATE_SUBJECT_SETS_FIELD_NUMBER = 3; + public static final int UPDATE_SUBJECT_SETS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List updateSubjectSets_; /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ @java.lang.Override public java.util.List getUpdateSubjectSetsList() { @@ -123,10 +107,11 @@ public java.util.List getU } /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ @java.lang.Override public java.util.List @@ -135,10 +120,11 @@ public java.util.List getU } /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ @java.lang.Override public int getUpdateSubjectSetsCount() { @@ -146,10 +132,11 @@ public int getUpdateSubjectSetsCount() { } /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index) { @@ -157,10 +144,11 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets } /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ @java.lang.Override public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( @@ -168,6 +156,62 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSu return updateSubjectSets_.get(index); } + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [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 metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [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 METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { @@ -185,11 +229,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } + for (int i = 0; i < updateSubjectSets_.size(); i++) { + output.writeMessage(2, updateSubjectSets_.get(i)); + } if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getUpdateMetadata()); + output.writeMessage(100, getMetadata()); } - for (int i = 0; i < updateSubjectSets_.size(); i++) { - output.writeMessage(3, updateSubjectSets_.get(i)); + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(101, metadataUpdateBehavior_); } getUnknownFields().writeTo(output); } @@ -203,13 +250,17 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } + for (int i = 0; i < updateSubjectSets_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, updateSubjectSets_.get(i)); + } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMetadata()); + .computeMessageSize(100, getMetadata()); } - for (int i = 0; i < updateSubjectSets_.size(); i++) { + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, updateSubjectSets_.get(i)); + .computeEnumSize(101, metadataUpdateBehavior_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -228,13 +279,14 @@ public boolean equals(final java.lang.Object obj) { if (!getId() .equals(other.getId())) return false; - if (hasUpdateMetadata() != other.hasUpdateMetadata()) return false; - if (hasUpdateMetadata()) { - if (!getUpdateMetadata() - .equals(other.getUpdateMetadata())) return false; - } if (!getUpdateSubjectSetsList() .equals(other.getUpdateSubjectSetsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -248,14 +300,16 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); - if (hasUpdateMetadata()) { - hash = (37 * hash) + UPDATE_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMetadata().hashCode(); - } if (getUpdateSubjectSetsCount() > 0) { hash = (37 * hash) + UPDATE_SUBJECT_SETS_FIELD_NUMBER; hash = (53 * hash) + getUpdateSubjectSetsList().hashCode(); } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + metadataUpdateBehavior_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -386,8 +440,8 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getUpdateMetadataFieldBuilder(); getUpdateSubjectSetsFieldBuilder(); + getMetadataFieldBuilder(); } } @java.lang.Override @@ -395,18 +449,19 @@ public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; - updateMetadata_ = null; - if (updateMetadataBuilder_ != null) { - updateMetadataBuilder_.dispose(); - updateMetadataBuilder_ = null; - } if (updateSubjectSetsBuilder_ == null) { updateSubjectSets_ = java.util.Collections.emptyList(); } else { updateSubjectSets_ = null; updateSubjectSetsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + metadataUpdateBehavior_ = 0; return this; } @@ -441,9 +496,9 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetReques private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { if (updateSubjectSetsBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { updateSubjectSets_ = java.util.Collections.unmodifiableList(updateSubjectSets_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); } result.updateSubjectSets_ = updateSubjectSets_; } else { @@ -457,12 +512,15 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubje result.id_ = id_; } int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000002) != 0)) { - result.updateMetadata_ = updateMetadataBuilder_ == null - ? updateMetadata_ - : updateMetadataBuilder_.build(); + if (((from_bitField0_ & 0x00000004) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); to_bitField0_ |= 0x00000001; } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadataUpdateBehavior_ = metadataUpdateBehavior_; + } result.bitField0_ |= to_bitField0_; } @@ -515,14 +573,11 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject bitField0_ |= 0x00000001; onChanged(); } - if (other.hasUpdateMetadata()) { - mergeUpdateMetadata(other.getUpdateMetadata()); - } if (updateSubjectSetsBuilder_ == null) { if (!other.updateSubjectSets_.isEmpty()) { if (updateSubjectSets_.isEmpty()) { updateSubjectSets_ = other.updateSubjectSets_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureUpdateSubjectSetsIsMutable(); updateSubjectSets_.addAll(other.updateSubjectSets_); @@ -535,7 +590,7 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject updateSubjectSetsBuilder_.dispose(); updateSubjectSetsBuilder_ = null; updateSubjectSets_ = other.updateSubjectSets_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); updateSubjectSetsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getUpdateSubjectSetsFieldBuilder() : null; @@ -544,6 +599,12 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject } } } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.metadataUpdateBehavior_ != 0) { + setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -576,13 +637,6 @@ public Builder mergeFrom( break; } // case 10 case 18: { - input.readMessage( - getUpdateMetadataFieldBuilder().getBuilder(), - extensionRegistry); - bitField0_ |= 0x00000002; - break; - } // case 18 - case 26: { io.opentdf.platform.policy.subjectmapping.SubjectSet m = input.readMessage( io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), @@ -594,7 +648,19 @@ public Builder mergeFrom( updateSubjectSetsBuilder_.addMessage(m); } break; - } // case 26 + } // case 18 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000004; + break; + } // case 802 + case 808: { + metadataUpdateBehavior_ = input.readEnum(); + bitField0_ |= 0x00000008; + break; + } // case 808 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -614,6 +680,10 @@ public Builder mergeFrom( private java.lang.Object id_ = ""; /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The id. */ @@ -630,6 +700,10 @@ public java.lang.String getId() { } } /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The bytes for id. */ @@ -647,6 +721,10 @@ public java.lang.String getId() { } } /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @param value The id to set. * @return This builder for chaining. @@ -660,6 +738,10 @@ public Builder setId( return this; } /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return This builder for chaining. */ @@ -670,6 +752,10 @@ public Builder clearId() { return this; } /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @param value The bytes for id to set. * @return This builder for chaining. @@ -684,133 +770,12 @@ public Builder setIdBytes( return this; } - private io.opentdf.platform.common.MetadataMutable updateMetadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updateMetadataBuilder_; - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return Whether the updateMetadata field is set. - */ - public boolean hasUpdateMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return The updateMetadata. - */ - public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { - if (updateMetadataBuilder_ == null) { - return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } else { - return updateMetadataBuilder_.getMessage(); - } - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder setUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updateMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMetadata_ = value; - } else { - updateMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder setUpdateMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (updateMetadataBuilder_ == null) { - updateMetadata_ = builderForValue.build(); - } else { - updateMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder mergeUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updateMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - updateMetadata_ != null && - updateMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getUpdateMetadataBuilder().mergeFrom(value); - } else { - updateMetadata_ = value; - } - } else { - updateMetadataBuilder_.mergeFrom(value); - } - if (updateMetadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder clearUpdateMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - updateMetadata_ = null; - if (updateMetadataBuilder_ != null) { - updateMetadataBuilder_.dispose(); - updateMetadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getUpdateMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getUpdateMetadataFieldBuilder().getBuilder(); - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { - if (updateMetadataBuilder_ != null) { - return updateMetadataBuilder_.getMessageOrBuilder(); - } else { - return updateMetadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getUpdateMetadataFieldBuilder() { - if (updateMetadataBuilder_ == null) { - updateMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getUpdateMetadata(), - getParentForChildren(), - isClean()); - updateMetadata_ = null; - } - return updateMetadataBuilder_; - } - private java.util.List updateSubjectSets_ = java.util.Collections.emptyList(); private void ensureUpdateSubjectSetsIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { updateSubjectSets_ = new java.util.ArrayList(updateSubjectSets_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000002; } } @@ -819,10 +784,11 @@ private void ensureUpdateSubjectSetsIsMutable() { /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public java.util.List getUpdateSubjectSetsList() { if (updateSubjectSetsBuilder_ == null) { @@ -833,10 +799,11 @@ public java.util.List getU } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public int getUpdateSubjectSetsCount() { if (updateSubjectSetsBuilder_ == null) { @@ -847,10 +814,11 @@ public int getUpdateSubjectSetsCount() { } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index) { if (updateSubjectSetsBuilder_ == null) { @@ -861,10 +829,11 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public Builder setUpdateSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -882,10 +851,11 @@ public Builder setUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public Builder setUpdateSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -900,10 +870,11 @@ public Builder setUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public Builder addUpdateSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { if (updateSubjectSetsBuilder_ == null) { @@ -920,10 +891,11 @@ public Builder addUpdateSubjectSets(io.opentdf.platform.policy.subjectmapping.Su } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public Builder addUpdateSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { @@ -941,10 +913,11 @@ public Builder addUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public Builder addUpdateSubjectSets( io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -959,10 +932,11 @@ public Builder addUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public Builder addUpdateSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { @@ -977,10 +951,11 @@ public Builder addUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public Builder addAllUpdateSubjectSets( java.lang.Iterable values) { @@ -996,15 +971,16 @@ public Builder addAllUpdateSubjectSets( } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public Builder clearUpdateSubjectSets() { if (updateSubjectSetsBuilder_ == null) { updateSubjectSets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { updateSubjectSetsBuilder_.clear(); @@ -1013,10 +989,11 @@ public Builder clearUpdateSubjectSets() { } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public Builder removeUpdateSubjectSets(int index) { if (updateSubjectSetsBuilder_ == null) { @@ -1030,10 +1007,11 @@ public Builder removeUpdateSubjectSets(int index) { } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getUpdateSubjectSetsBuilder( int index) { @@ -1041,10 +1019,11 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getUpdateSub } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( int index) { @@ -1055,10 +1034,11 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSu } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public java.util.List getUpdateSubjectSetsOrBuilderList() { @@ -1070,10 +1050,11 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSu } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSubjectSetsBuilder() { return getUpdateSubjectSetsFieldBuilder().addBuilder( @@ -1081,10 +1062,11 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSub } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSubjectSetsBuilder( int index) { @@ -1093,10 +1075,11 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSub } /** *
    -     * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +     * Optional
    +     * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ public java.util.List getUpdateSubjectSetsBuilderList() { @@ -1109,13 +1092,223 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSub updateSubjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder>( updateSubjectSets_, - ((bitField0_ & 0x00000004) != 0), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); updateSubjectSets_ = null; } return updateSubjectSetsBuilder_; } + + 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 metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000004) != 0); + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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 metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_ |= 0x00000004; + onChanged(); + return this; + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000004; + onChanged(); + } + return this; + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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 metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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 int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehaviorValue(int value) { + metadataUpdateBehavior_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + metadataUpdateBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return This builder for chaining. + */ + public Builder clearMetadataUpdateBehavior() { + bitField0_ = (bitField0_ & ~0x00000008); + metadataUpdateBehavior_ = 0; + onChanged(); + return this; + } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java index 82db9ac7fd..06d71c36fd 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java @@ -9,73 +9,109 @@ public interface UpdateSubjectConditionSetRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** + *
    +   * Required
    +   * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The id. */ java.lang.String getId(); /** + *
    +   * Required
    +   * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return Whether the updateMetadata field is set. - */ - boolean hasUpdateMetadata(); - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return The updateMetadata. - */ - io.opentdf.platform.common.MetadataMutable getUpdateMetadata(); - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder(); - /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ java.util.List getUpdateSubjectSetsList(); /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index); /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ int getUpdateSubjectSetsCount(); /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ java.util.List getUpdateSubjectSetsOrBuilderList(); /** *
    -   * if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
    +   * Optional
    +   * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 3 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; */ io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( int index); + + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + int getMetadataUpdateBehaviorValue(); + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); } diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java index 1ebe5fecd1..b82801dddd 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequest.java @@ -18,8 +18,9 @@ private UpdateSubjectMappingRequest(com.google.protobuf.GeneratedMessageV3.Build } private UpdateSubjectMappingRequest() { id_ = ""; - updateSubjectConditionSetId_ = ""; - updateActions_ = java.util.Collections.emptyList(); + subjectConditionSetId_ = ""; + actions_ = java.util.Collections.emptyList(); + metadataUpdateBehavior_ = 0; } @java.lang.Override @@ -47,6 +48,10 @@ protected java.lang.Object newInstance( @SuppressWarnings("serial") private volatile java.lang.Object id_ = ""; /** + *
    +   * Required
    +   * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The id. */ @@ -64,6 +69,10 @@ public java.lang.String getId() { } } /** + *
    +   * Required
    +   * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The bytes for id. */ @@ -82,138 +91,170 @@ public java.lang.String getId() { } } - public static final int UPDATE_METADATA_FIELD_NUMBER = 2; - private io.opentdf.platform.common.MetadataMutable updateMetadata_; - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return Whether the updateMetadata field is set. - */ - @java.lang.Override - public boolean hasUpdateMetadata() { - return ((bitField0_ & 0x00000001) != 0); - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return The updateMetadata. - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { - return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - @java.lang.Override - public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { - return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } - - public static final int UPDATE_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 3; + public static final int SUBJECT_CONDITION_SET_ID_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private volatile java.lang.Object updateSubjectConditionSetId_ = ""; + private volatile java.lang.Object subjectConditionSetId_ = ""; /** *
    +   * Optional
        * Replaces the existing SubjectConditionSet id with a new one
        * 
    * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The updateSubjectConditionSetId. + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The subjectConditionSetId. */ @java.lang.Override - public java.lang.String getUpdateSubjectConditionSetId() { - java.lang.Object ref = updateSubjectConditionSetId_; + public java.lang.String getSubjectConditionSetId() { + java.lang.Object ref = subjectConditionSetId_; 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(); - updateSubjectConditionSetId_ = s; + subjectConditionSetId_ = s; return s; } } /** *
    +   * Optional
        * Replaces the existing SubjectConditionSet id with a new one
        * 
    * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The bytes for updateSubjectConditionSetId. + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The bytes for subjectConditionSetId. */ @java.lang.Override public com.google.protobuf.ByteString - getUpdateSubjectConditionSetIdBytes() { - java.lang.Object ref = updateSubjectConditionSetId_; + getSubjectConditionSetIdBytes() { + java.lang.Object ref = subjectConditionSetId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - updateSubjectConditionSetId_ = b; + subjectConditionSetId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } - public static final int UPDATE_ACTIONS_FIELD_NUMBER = 5; + public static final int ACTIONS_FIELD_NUMBER = 3; @SuppressWarnings("serial") - private java.util.List updateActions_; + private java.util.List actions_; /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ @java.lang.Override - public java.util.List getUpdateActionsList() { - return updateActions_; + public java.util.List getActionsList() { + return actions_; } /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ @java.lang.Override public java.util.List - getUpdateActionsOrBuilderList() { - return updateActions_; + getActionsOrBuilderList() { + return actions_; } /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ @java.lang.Override - public int getUpdateActionsCount() { - return updateActions_.size(); + public int getActionsCount() { + return actions_.size(); } /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ @java.lang.Override - public io.opentdf.platform.authorization.Action getUpdateActions(int index) { - return updateActions_.get(index); + public io.opentdf.platform.authorization.Action getActions(int index) { + return actions_.get(index); } /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ @java.lang.Override - public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( + public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( int index) { - return updateActions_.get(index); + return actions_.get(index); + } + + public static final int METADATA_FIELD_NUMBER = 100; + private io.opentdf.platform.common.MetadataMutable metadata_; + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + @java.lang.Override + public boolean hasMetadata() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [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 metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [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 METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER = 101; + private int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; @@ -233,14 +274,17 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } - if (((bitField0_ & 0x00000001) != 0)) { - output.writeMessage(2, getUpdateMetadata()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectConditionSetId_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, subjectConditionSetId_); + } + for (int i = 0; i < actions_.size(); i++) { + output.writeMessage(3, actions_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateSubjectConditionSetId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, updateSubjectConditionSetId_); + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(100, getMetadata()); } - for (int i = 0; i < updateActions_.size(); i++) { - output.writeMessage(5, updateActions_.get(i)); + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { + output.writeEnum(101, metadataUpdateBehavior_); } getUnknownFields().writeTo(output); } @@ -254,16 +298,20 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } - if (((bitField0_ & 0x00000001) != 0)) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subjectConditionSetId_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, subjectConditionSetId_); + } + for (int i = 0; i < actions_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getUpdateMetadata()); + .computeMessageSize(3, actions_.get(i)); } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(updateSubjectConditionSetId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, updateSubjectConditionSetId_); + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(100, getMetadata()); } - for (int i = 0; i < updateActions_.size(); i++) { + if (metadataUpdateBehavior_ != io.opentdf.platform.common.MetadataUpdateEnum.METADATA_UPDATE_ENUM_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, updateActions_.get(i)); + .computeEnumSize(101, metadataUpdateBehavior_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -282,15 +330,16 @@ public boolean equals(final java.lang.Object obj) { if (!getId() .equals(other.getId())) return false; - if (hasUpdateMetadata() != other.hasUpdateMetadata()) return false; - if (hasUpdateMetadata()) { - if (!getUpdateMetadata() - .equals(other.getUpdateMetadata())) return false; - } - if (!getUpdateSubjectConditionSetId() - .equals(other.getUpdateSubjectConditionSetId())) return false; - if (!getUpdateActionsList() - .equals(other.getUpdateActionsList())) return false; + if (!getSubjectConditionSetId() + .equals(other.getSubjectConditionSetId())) return false; + if (!getActionsList() + .equals(other.getActionsList())) return false; + if (hasMetadata() != other.hasMetadata()) return false; + if (hasMetadata()) { + if (!getMetadata() + .equals(other.getMetadata())) return false; + } + if (metadataUpdateBehavior_ != other.metadataUpdateBehavior_) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -304,16 +353,18 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); - if (hasUpdateMetadata()) { - hash = (37 * hash) + UPDATE_METADATA_FIELD_NUMBER; - hash = (53 * hash) + getUpdateMetadata().hashCode(); - } - hash = (37 * hash) + UPDATE_SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; - hash = (53 * hash) + getUpdateSubjectConditionSetId().hashCode(); - if (getUpdateActionsCount() > 0) { - hash = (37 * hash) + UPDATE_ACTIONS_FIELD_NUMBER; - hash = (53 * hash) + getUpdateActionsList().hashCode(); - } + hash = (37 * hash) + SUBJECT_CONDITION_SET_ID_FIELD_NUMBER; + hash = (53 * hash) + getSubjectConditionSetId().hashCode(); + if (getActionsCount() > 0) { + hash = (37 * hash) + ACTIONS_FIELD_NUMBER; + hash = (53 * hash) + getActionsList().hashCode(); + } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } + hash = (37 * hash) + METADATA_UPDATE_BEHAVIOR_FIELD_NUMBER; + hash = (53 * hash) + metadataUpdateBehavior_; hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; @@ -444,8 +495,8 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getUpdateMetadataFieldBuilder(); - getUpdateActionsFieldBuilder(); + getActionsFieldBuilder(); + getMetadataFieldBuilder(); } } @java.lang.Override @@ -453,19 +504,20 @@ public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; - updateMetadata_ = null; - if (updateMetadataBuilder_ != null) { - updateMetadataBuilder_.dispose(); - updateMetadataBuilder_ = null; - } - updateSubjectConditionSetId_ = ""; - if (updateActionsBuilder_ == null) { - updateActions_ = java.util.Collections.emptyList(); + subjectConditionSetId_ = ""; + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); } else { - updateActions_ = null; - updateActionsBuilder_.clear(); + actions_ = null; + actionsBuilder_.clear(); } - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000004); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + metadataUpdateBehavior_ = 0; return this; } @@ -499,14 +551,14 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest bui } private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectMappingRequest result) { - if (updateActionsBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { - updateActions_ = java.util.Collections.unmodifiableList(updateActions_); - bitField0_ = (bitField0_ & ~0x00000008); + if (actionsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + actions_ = java.util.Collections.unmodifiableList(actions_); + bitField0_ = (bitField0_ & ~0x00000004); } - result.updateActions_ = updateActions_; + result.actions_ = actions_; } else { - result.updateActions_ = updateActionsBuilder_.build(); + result.actions_ = actionsBuilder_.build(); } } @@ -515,15 +567,18 @@ private void buildPartial0(io.opentdf.platform.policy.subjectmapping.UpdateSubje if (((from_bitField0_ & 0x00000001) != 0)) { result.id_ = id_; } - int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000002) != 0)) { - result.updateMetadata_ = updateMetadataBuilder_ == null - ? updateMetadata_ - : updateMetadataBuilder_.build(); + result.subjectConditionSetId_ = subjectConditionSetId_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000008) != 0)) { + result.metadata_ = metadataBuilder_ == null + ? metadata_ + : metadataBuilder_.build(); to_bitField0_ |= 0x00000001; } - if (((from_bitField0_ & 0x00000004) != 0)) { - result.updateSubjectConditionSetId_ = updateSubjectConditionSetId_; + if (((from_bitField0_ & 0x00000010) != 0)) { + result.metadataUpdateBehavior_ = metadataUpdateBehavior_; } result.bitField0_ |= to_bitField0_; } @@ -577,40 +632,43 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject bitField0_ |= 0x00000001; onChanged(); } - if (other.hasUpdateMetadata()) { - mergeUpdateMetadata(other.getUpdateMetadata()); - } - if (!other.getUpdateSubjectConditionSetId().isEmpty()) { - updateSubjectConditionSetId_ = other.updateSubjectConditionSetId_; - bitField0_ |= 0x00000004; + if (!other.getSubjectConditionSetId().isEmpty()) { + subjectConditionSetId_ = other.subjectConditionSetId_; + bitField0_ |= 0x00000002; onChanged(); } - if (updateActionsBuilder_ == null) { - if (!other.updateActions_.isEmpty()) { - if (updateActions_.isEmpty()) { - updateActions_ = other.updateActions_; - bitField0_ = (bitField0_ & ~0x00000008); + if (actionsBuilder_ == null) { + if (!other.actions_.isEmpty()) { + if (actions_.isEmpty()) { + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000004); } else { - ensureUpdateActionsIsMutable(); - updateActions_.addAll(other.updateActions_); + ensureActionsIsMutable(); + actions_.addAll(other.actions_); } onChanged(); } } else { - if (!other.updateActions_.isEmpty()) { - if (updateActionsBuilder_.isEmpty()) { - updateActionsBuilder_.dispose(); - updateActionsBuilder_ = null; - updateActions_ = other.updateActions_; - bitField0_ = (bitField0_ & ~0x00000008); - updateActionsBuilder_ = + if (!other.actions_.isEmpty()) { + if (actionsBuilder_.isEmpty()) { + actionsBuilder_.dispose(); + actionsBuilder_ = null; + actions_ = other.actions_; + bitField0_ = (bitField0_ & ~0x00000004); + actionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getUpdateActionsFieldBuilder() : null; + getActionsFieldBuilder() : null; } else { - updateActionsBuilder_.addAllMessages(other.updateActions_); + actionsBuilder_.addAllMessages(other.actions_); } } } + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } + if (other.metadataUpdateBehavior_ != 0) { + setMetadataUpdateBehaviorValue(other.getMetadataUpdateBehaviorValue()); + } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; @@ -643,30 +701,35 @@ public Builder mergeFrom( break; } // case 10 case 18: { - input.readMessage( - getUpdateMetadataFieldBuilder().getBuilder(), - extensionRegistry); + subjectConditionSetId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { - updateSubjectConditionSetId_ = input.readStringRequireUtf8(); - bitField0_ |= 0x00000004; - break; - } // case 26 - case 42: { io.opentdf.platform.authorization.Action m = input.readMessage( io.opentdf.platform.authorization.Action.parser(), extensionRegistry); - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.add(m); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(m); } else { - updateActionsBuilder_.addMessage(m); + actionsBuilder_.addMessage(m); } break; - } // case 42 + } // case 26 + case 802: { + input.readMessage( + getMetadataFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000008; + break; + } // case 802 + case 808: { + metadataUpdateBehavior_ = input.readEnum(); + bitField0_ |= 0x00000010; + break; + } // case 808 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag @@ -686,6 +749,10 @@ public Builder mergeFrom( private java.lang.Object id_ = ""; /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The id. */ @@ -702,6 +769,10 @@ public java.lang.String getId() { } } /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The bytes for id. */ @@ -719,6 +790,10 @@ public java.lang.String getId() { } } /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @param value The id to set. * @return This builder for chaining. @@ -732,6 +807,10 @@ public Builder setId( return this; } /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return This builder for chaining. */ @@ -742,6 +821,10 @@ public Builder clearId() { return this; } /** + *
    +     * Required
    +     * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @param value The bytes for id to set. * @return This builder for chaining. @@ -756,143 +839,23 @@ public Builder setIdBytes( return this; } - private io.opentdf.platform.common.MetadataMutable updateMetadata_; - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> updateMetadataBuilder_; - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return Whether the updateMetadata field is set. - */ - public boolean hasUpdateMetadata() { - return ((bitField0_ & 0x00000002) != 0); - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return The updateMetadata. - */ - public io.opentdf.platform.common.MetadataMutable getUpdateMetadata() { - if (updateMetadataBuilder_ == null) { - return updateMetadata_ == null ? io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } else { - return updateMetadataBuilder_.getMessage(); - } - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder setUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updateMetadataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateMetadata_ = value; - } else { - updateMetadataBuilder_.setMessage(value); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder setUpdateMetadata( - io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { - if (updateMetadataBuilder_ == null) { - updateMetadata_ = builderForValue.build(); - } else { - updateMetadataBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; - onChanged(); - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder mergeUpdateMetadata(io.opentdf.platform.common.MetadataMutable value) { - if (updateMetadataBuilder_ == null) { - if (((bitField0_ & 0x00000002) != 0) && - updateMetadata_ != null && - updateMetadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { - getUpdateMetadataBuilder().mergeFrom(value); - } else { - updateMetadata_ = value; - } - } else { - updateMetadataBuilder_.mergeFrom(value); - } - if (updateMetadata_ != null) { - bitField0_ |= 0x00000002; - onChanged(); - } - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public Builder clearUpdateMetadata() { - bitField0_ = (bitField0_ & ~0x00000002); - updateMetadata_ = null; - if (updateMetadataBuilder_ != null) { - updateMetadataBuilder_.dispose(); - updateMetadataBuilder_ = null; - } - onChanged(); - return this; - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public io.opentdf.platform.common.MetadataMutable.Builder getUpdateMetadataBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getUpdateMetadataFieldBuilder().getBuilder(); - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - public io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder() { - if (updateMetadataBuilder_ != null) { - return updateMetadataBuilder_.getMessageOrBuilder(); - } else { - return updateMetadata_ == null ? - io.opentdf.platform.common.MetadataMutable.getDefaultInstance() : updateMetadata_; - } - } - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder> - getUpdateMetadataFieldBuilder() { - if (updateMetadataBuilder_ == null) { - updateMetadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - io.opentdf.platform.common.MetadataMutable, io.opentdf.platform.common.MetadataMutable.Builder, io.opentdf.platform.common.MetadataMutableOrBuilder>( - getUpdateMetadata(), - getParentForChildren(), - isClean()); - updateMetadata_ = null; - } - return updateMetadataBuilder_; - } - - private java.lang.Object updateSubjectConditionSetId_ = ""; + private java.lang.Object subjectConditionSetId_ = ""; /** *
    +     * Optional
          * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The updateSubjectConditionSetId. + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The subjectConditionSetId. */ - public java.lang.String getUpdateSubjectConditionSetId() { - java.lang.Object ref = updateSubjectConditionSetId_; + public java.lang.String getSubjectConditionSetId() { + java.lang.Object ref = subjectConditionSetId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - updateSubjectConditionSetId_ = s; + subjectConditionSetId_ = s; return s; } else { return (java.lang.String) ref; @@ -900,20 +863,21 @@ public java.lang.String getUpdateSubjectConditionSetId() { } /** *
    +     * Optional
          * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The bytes for updateSubjectConditionSetId. + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The bytes for subjectConditionSetId. */ public com.google.protobuf.ByteString - getUpdateSubjectConditionSetIdBytes() { - java.lang.Object ref = updateSubjectConditionSetId_; + getSubjectConditionSetIdBytes() { + java.lang.Object ref = subjectConditionSetId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); - updateSubjectConditionSetId_ = b; + subjectConditionSetId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; @@ -921,78 +885,81 @@ public java.lang.String getUpdateSubjectConditionSetId() { } /** *
    +     * Optional
          * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @param value The updateSubjectConditionSetId to set. + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @param value The subjectConditionSetId to set. * @return This builder for chaining. */ - public Builder setUpdateSubjectConditionSetId( + public Builder setSubjectConditionSetId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } - updateSubjectConditionSetId_ = value; - bitField0_ |= 0x00000004; + subjectConditionSetId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } /** *
    +     * Optional
          * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; * @return This builder for chaining. */ - public Builder clearUpdateSubjectConditionSetId() { - updateSubjectConditionSetId_ = getDefaultInstance().getUpdateSubjectConditionSetId(); - bitField0_ = (bitField0_ & ~0x00000004); + public Builder clearSubjectConditionSetId() { + subjectConditionSetId_ = getDefaultInstance().getSubjectConditionSetId(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
    +     * Optional
          * Replaces the existing SubjectConditionSet id with a new one
          * 
    * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @param value The bytes for updateSubjectConditionSetId to set. + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @param value The bytes for subjectConditionSetId to set. * @return This builder for chaining. */ - public Builder setUpdateSubjectConditionSetIdBytes( + public Builder setSubjectConditionSetIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); - updateSubjectConditionSetId_ = value; - bitField0_ |= 0x00000004; + subjectConditionSetId_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } - private java.util.List updateActions_ = + private java.util.List actions_ = java.util.Collections.emptyList(); - private void ensureUpdateActionsIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { - updateActions_ = new java.util.ArrayList(updateActions_); - bitField0_ |= 0x00000008; + private void ensureActionsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + actions_ = new java.util.ArrayList(actions_); + bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> updateActionsBuilder_; + io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> actionsBuilder_; /** *
          * Replaces entire list of actions permitted by subjects
          * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public java.util.List getUpdateActionsList() { - if (updateActionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(updateActions_); + public java.util.List getActionsList() { + if (actionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(actions_); } else { - return updateActionsBuilder_.getMessageList(); + return actionsBuilder_.getMessageList(); } } /** @@ -1000,13 +967,13 @@ public java.util.List getUpdateActions * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public int getUpdateActionsCount() { - if (updateActionsBuilder_ == null) { - return updateActions_.size(); + public int getActionsCount() { + if (actionsBuilder_ == null) { + return actions_.size(); } else { - return updateActionsBuilder_.getCount(); + return actionsBuilder_.getCount(); } } /** @@ -1014,13 +981,13 @@ public int getUpdateActionsCount() { * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public io.opentdf.platform.authorization.Action getUpdateActions(int index) { - if (updateActionsBuilder_ == null) { - return updateActions_.get(index); + public io.opentdf.platform.authorization.Action getActions(int index) { + if (actionsBuilder_ == null) { + return actions_.get(index); } else { - return updateActionsBuilder_.getMessage(index); + return actionsBuilder_.getMessage(index); } } /** @@ -1028,19 +995,19 @@ public io.opentdf.platform.authorization.Action getUpdateActions(int index) { * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public Builder setUpdateActions( + public Builder setActions( int index, io.opentdf.platform.authorization.Action value) { - if (updateActionsBuilder_ == null) { + if (actionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUpdateActionsIsMutable(); - updateActions_.set(index, value); + ensureActionsIsMutable(); + actions_.set(index, value); onChanged(); } else { - updateActionsBuilder_.setMessage(index, value); + actionsBuilder_.setMessage(index, value); } return this; } @@ -1049,16 +1016,16 @@ public Builder setUpdateActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public Builder setUpdateActions( + public Builder setActions( int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.set(index, builderForValue.build()); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.set(index, builderForValue.build()); onChanged(); } else { - updateActionsBuilder_.setMessage(index, builderForValue.build()); + actionsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -1067,18 +1034,18 @@ public Builder setUpdateActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public Builder addUpdateActions(io.opentdf.platform.authorization.Action value) { - if (updateActionsBuilder_ == null) { + public Builder addActions(io.opentdf.platform.authorization.Action value) { + if (actionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUpdateActionsIsMutable(); - updateActions_.add(value); + ensureActionsIsMutable(); + actions_.add(value); onChanged(); } else { - updateActionsBuilder_.addMessage(value); + actionsBuilder_.addMessage(value); } return this; } @@ -1087,19 +1054,19 @@ public Builder addUpdateActions(io.opentdf.platform.authorization.Action value) * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public Builder addUpdateActions( + public Builder addActions( int index, io.opentdf.platform.authorization.Action value) { - if (updateActionsBuilder_ == null) { + if (actionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUpdateActionsIsMutable(); - updateActions_.add(index, value); + ensureActionsIsMutable(); + actions_.add(index, value); onChanged(); } else { - updateActionsBuilder_.addMessage(index, value); + actionsBuilder_.addMessage(index, value); } return this; } @@ -1108,16 +1075,16 @@ public Builder addUpdateActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public Builder addUpdateActions( + public Builder addActions( io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.add(builderForValue.build()); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(builderForValue.build()); onChanged(); } else { - updateActionsBuilder_.addMessage(builderForValue.build()); + actionsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -1126,16 +1093,16 @@ public Builder addUpdateActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public Builder addUpdateActions( + public Builder addActions( int index, io.opentdf.platform.authorization.Action.Builder builderForValue) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.add(index, builderForValue.build()); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.add(index, builderForValue.build()); onChanged(); } else { - updateActionsBuilder_.addMessage(index, builderForValue.build()); + actionsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -1144,17 +1111,17 @@ public Builder addUpdateActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public Builder addAllUpdateActions( + public Builder addAllActions( java.lang.Iterable values) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, updateActions_); + values, actions_); onChanged(); } else { - updateActionsBuilder_.addAllMessages(values); + actionsBuilder_.addAllMessages(values); } return this; } @@ -1163,15 +1130,15 @@ public Builder addAllUpdateActions( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public Builder clearUpdateActions() { - if (updateActionsBuilder_ == null) { - updateActions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + public Builder clearActions() { + if (actionsBuilder_ == null) { + actions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { - updateActionsBuilder_.clear(); + actionsBuilder_.clear(); } return this; } @@ -1180,15 +1147,15 @@ public Builder clearUpdateActions() { * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public Builder removeUpdateActions(int index) { - if (updateActionsBuilder_ == null) { - ensureUpdateActionsIsMutable(); - updateActions_.remove(index); + public Builder removeActions(int index) { + if (actionsBuilder_ == null) { + ensureActionsIsMutable(); + actions_.remove(index); onChanged(); } else { - updateActionsBuilder_.remove(index); + actionsBuilder_.remove(index); } return this; } @@ -1197,24 +1164,24 @@ public Builder removeUpdateActions(int index) { * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public io.opentdf.platform.authorization.Action.Builder getUpdateActionsBuilder( + public io.opentdf.platform.authorization.Action.Builder getActionsBuilder( int index) { - return getUpdateActionsFieldBuilder().getBuilder(index); + return getActionsFieldBuilder().getBuilder(index); } /** *
          * Replaces entire list of actions permitted by subjects
          * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( + public io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( int index) { - if (updateActionsBuilder_ == null) { - return updateActions_.get(index); } else { - return updateActionsBuilder_.getMessageOrBuilder(index); + if (actionsBuilder_ == null) { + return actions_.get(index); } else { + return actionsBuilder_.getMessageOrBuilder(index); } } /** @@ -1222,14 +1189,14 @@ public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuild * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ public java.util.List - getUpdateActionsOrBuilderList() { - if (updateActionsBuilder_ != null) { - return updateActionsBuilder_.getMessageOrBuilderList(); + getActionsOrBuilderList() { + if (actionsBuilder_ != null) { + return actionsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(updateActions_); + return java.util.Collections.unmodifiableList(actions_); } } /** @@ -1237,10 +1204,10 @@ public io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuild * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder() { - return getUpdateActionsFieldBuilder().addBuilder( + public io.opentdf.platform.authorization.Action.Builder addActionsBuilder() { + return getActionsFieldBuilder().addBuilder( io.opentdf.platform.authorization.Action.getDefaultInstance()); } /** @@ -1248,11 +1215,11 @@ public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder( + public io.opentdf.platform.authorization.Action.Builder addActionsBuilder( int index) { - return getUpdateActionsFieldBuilder().addBuilder( + return getActionsFieldBuilder().addBuilder( index, io.opentdf.platform.authorization.Action.getDefaultInstance()); } /** @@ -1260,25 +1227,235 @@ public io.opentdf.platform.authorization.Action.Builder addUpdateActionsBuilder( * Replaces entire list of actions permitted by subjects * * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ public java.util.List - getUpdateActionsBuilderList() { - return getUpdateActionsFieldBuilder().getBuilderList(); + getActionsBuilderList() { + return getActionsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder> - getUpdateActionsFieldBuilder() { - if (updateActionsBuilder_ == null) { - updateActionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + getActionsFieldBuilder() { + if (actionsBuilder_ == null) { + actionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< io.opentdf.platform.authorization.Action, io.opentdf.platform.authorization.Action.Builder, io.opentdf.platform.authorization.ActionOrBuilder>( - updateActions_, - ((bitField0_ & 0x00000008) != 0), + actions_, + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); - updateActions_ = null; + actions_ = null; + } + return actionsBuilder_; + } + + 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 metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + public boolean hasMetadata() { + return ((bitField0_ & 0x00000008) != 0); + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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 metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder setMetadata( + io.opentdf.platform.common.MetadataMutable.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); } - return updateActionsBuilder_; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder mergeMetadata(io.opentdf.platform.common.MetadataMutable value) { + if (metadataBuilder_ == null) { + if (((bitField0_ & 0x00000008) != 0) && + metadata_ != null && + metadata_ != io.opentdf.platform.common.MetadataMutable.getDefaultInstance()) { + getMetadataBuilder().mergeFrom(value); + } else { + metadata_ = value; + } + } else { + metadataBuilder_.mergeFrom(value); + } + if (metadata_ != null) { + bitField0_ |= 0x00000008; + onChanged(); + } + return this; + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public Builder clearMetadata() { + bitField0_ = (bitField0_ & ~0x00000008); + metadata_ = null; + if (metadataBuilder_ != null) { + metadataBuilder_.dispose(); + metadataBuilder_ = null; + } + onChanged(); + return this; + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + public io.opentdf.platform.common.MetadataMutable.Builder getMetadataBuilder() { + bitField0_ |= 0x00000008; + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
    +     * Common metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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 metadata
    +     * 
    + * + * .common.MetadataMutable metadata = 100 [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 int metadataUpdateBehavior_ = 0; + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + @java.lang.Override public int getMetadataUpdateBehaviorValue() { + return metadataUpdateBehavior_; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The enum numeric value on the wire for metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehaviorValue(int value) { + metadataUpdateBehavior_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + @java.lang.Override + public io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior() { + io.opentdf.platform.common.MetadataUpdateEnum result = io.opentdf.platform.common.MetadataUpdateEnum.forNumber(metadataUpdateBehavior_); + return result == null ? io.opentdf.platform.common.MetadataUpdateEnum.UNRECOGNIZED : result; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @param value The metadataUpdateBehavior to set. + * @return This builder for chaining. + */ + public Builder setMetadataUpdateBehavior(io.opentdf.platform.common.MetadataUpdateEnum value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + metadataUpdateBehavior_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return This builder for chaining. + */ + public Builder clearMetadataUpdateBehavior() { + bitField0_ = (bitField0_ & ~0x00000010); + metadataUpdateBehavior_ = 0; + onChanged(); + return this; } @java.lang.Override public final Builder setUnknownFields( diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java index ae0faefcb1..70c12c065a 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectMappingRequestOrBuilder.java @@ -9,93 +9,126 @@ public interface UpdateSubjectMappingRequestOrBuilder extends com.google.protobuf.MessageOrBuilder { /** + *
    +   * Required
    +   * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The id. */ java.lang.String getId(); /** + *
    +   * Required
    +   * 
    + * * string id = 1 [json_name = "id", (.buf.validate.field) = { ... } * @return The bytes for id. */ com.google.protobuf.ByteString getIdBytes(); - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return Whether the updateMetadata field is set. - */ - boolean hasUpdateMetadata(); - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - * @return The updateMetadata. - */ - io.opentdf.platform.common.MetadataMutable getUpdateMetadata(); - /** - * .common.MetadataMutable update_metadata = 2 [json_name = "updateMetadata"]; - */ - io.opentdf.platform.common.MetadataMutableOrBuilder getUpdateMetadataOrBuilder(); - /** *
    +   * Optional
        * Replaces the existing SubjectConditionSet id with a new one
        * 
    * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The updateSubjectConditionSetId. + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The subjectConditionSetId. */ - java.lang.String getUpdateSubjectConditionSetId(); + java.lang.String getSubjectConditionSetId(); /** *
    +   * Optional
        * Replaces the existing SubjectConditionSet id with a new one
        * 
    * - * string update_subject_condition_set_id = 3 [json_name = "updateSubjectConditionSetId"]; - * @return The bytes for updateSubjectConditionSetId. + * string subject_condition_set_id = 2 [json_name = "subjectConditionSetId"]; + * @return The bytes for subjectConditionSetId. */ com.google.protobuf.ByteString - getUpdateSubjectConditionSetIdBytes(); + getSubjectConditionSetIdBytes(); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ java.util.List - getUpdateActionsList(); + getActionsList(); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - io.opentdf.platform.authorization.Action getUpdateActions(int index); + io.opentdf.platform.authorization.Action getActions(int index); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - int getUpdateActionsCount(); + int getActionsCount(); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ java.util.List - getUpdateActionsOrBuilderList(); + getActionsOrBuilderList(); /** *
        * Replaces entire list of actions permitted by subjects
        * 
    * - * repeated .authorization.Action update_actions = 5 [json_name = "updateActions"]; + * repeated .authorization.Action actions = 3 [json_name = "actions"]; */ - io.opentdf.platform.authorization.ActionOrBuilder getUpdateActionsOrBuilder( + io.opentdf.platform.authorization.ActionOrBuilder getActionsOrBuilder( int index); + + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return Whether the metadata field is set. + */ + boolean hasMetadata(); + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + * @return The metadata. + */ + io.opentdf.platform.common.MetadataMutable getMetadata(); + /** + *
    +   * Common metadata
    +   * 
    + * + * .common.MetadataMutable metadata = 100 [json_name = "metadata"]; + */ + io.opentdf.platform.common.MetadataMutableOrBuilder getMetadataOrBuilder(); + + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The enum numeric value on the wire for metadataUpdateBehavior. + */ + int getMetadataUpdateBehaviorValue(); + /** + * .common.MetadataUpdateEnum metadata_update_behavior = 101 [json_name = "metadataUpdateBehavior"]; + * @return The metadataUpdateBehavior. + */ + io.opentdf.platform.common.MetadataUpdateEnum getMetadataUpdateBehavior(); } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 157d7de981..5f0334094e 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -10,74 +10,7 @@ import "google/protobuf/struct.proto"; import "policy/attributes/attributes.proto"; /* - # Subject Mapping (aka Access Control Subject Encoding aka ACSE): Structures supporting the mapping of Subjects and Attributes (e.g. Entitlement) - - ## Examples - - ### Where: - - - attribute_value_id represents the following attribute - - FQN: "http://demo.com/attr/example/value/foobar" - - UUID: "12345678-1234-1234-1234-123456789012" - - - ## 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 - - ```bash - grpcurl -plaintext -d '{ - "subject_mapping": { - "metadata": { - "labels": { - "name": "sample-subject-mappings" - } - }, - "attribute_value_id": "12345678-1234-1234-1234-123456789012", - # optional to eitherprovide existing SubjectConditionSet (which takes precedence) - "existing_subject_condition_set_id": "0000-1111-2222", - # or to create new SubjectConditionSet - "new_subject_condition_set": { - "name": "sample-subject-condition-set", - "subject_sets": [ - { - "condition_groups": [ - { - "conditions": [ - { - "subject_external_field": "division", - "operator": "IN", - "subject_external_values": ["Sales", "Marketing"] - } - ], - "boolean_operator": "AND" - } - ] - } - ] - }, - "actions": [ - { - "standard": "STANDARD_ACTION_TRANSMIT" - }, - { - "standard": "STANDARD_ACTION_DECRYPT" - } - ] - } - }' localhost:8080 policy.subjectmapping.SubjectMappingService.CreateSubjectMapping - ``` - - ## Find matching subject mappings for Subject alice: - - ```bash - grpcurl -plaintext -d '{ - "subject": { - "attributes": { - "division": "Sales", - "preferredUsername": "alice@example.org" - } - } - }' localhost:8080 SubjectMappingService.MatchSubjectMappings + Subject Mapping (aka Access Control Subject Encoding aka ACSE): Structures supporting the mapping of Subjects and Attributes (e.g. Entitlement) */ // buflint ENUM_VALUE_PREFIX: to make sure that C++ scoping rules aren't violated when users add new enum values to an enum in a given package @@ -97,17 +30,17 @@ enum ConditionBooleanTypeEnum { /** A Condition defines a rule of - Example: Match Subjects with field "division" and a value of "Accounting" or "Marketing": + Example: Subjects with field "division" and a value of "Accounting" or "Marketing": { "subject_external_field": "division", - "operator": "IN", + "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_IN", "subject_external_values" : ["Accounting", "Marketing"] } - Example: Match a subject by ensuring they are not part of the Fantastic Four: + Example: Subjects that are not part of the Fantastic Four: { "subject_external_field": "superhero_name", - "operator": "NOT_IN", + "operator": "SUBJECT_MAPPING_OPERATOR_ENUM_NOT_IN", "subject_external_values" : ["mister_fantastic", "the_thing", "human_torch", "invisible_woman"] } */ @@ -148,13 +81,9 @@ message SubjectSet { message SubjectConditionSet { string id = 1; - // an optional name for ease of reference - string name = 2; - - common.Metadata metadata = 3; + repeated SubjectSet subject_sets = 3 [(buf.validate.field).repeated.min_items = 1]; - // multiple Subject Sets are evaluated with AND logic - repeated SubjectSet subject_sets = 4 [(buf.validate.field).repeated.min_items = 1]; + common.Metadata metadata = 100; } /* @@ -172,18 +101,22 @@ message SubjectConditionSet { message SubjectMapping { string id = 1; - common.Metadata metadata = 2; - // the Attribute Value mapped to; aka: "The Entity Entitlement Attribute" - policy.attributes.Value attribute_value = 3; + policy.attributes.Value attribute_value = 2; // the reusable SubjectConditionSet mapped to the given Attribute Value - SubjectConditionSet subject_condition_set = 4; + SubjectConditionSet subject_condition_set = 3; // The actions permitted by subjects in this mapping - repeated authorization.Action actions = 5; + repeated authorization.Action actions = 4; + + common.Metadata metadata = 100; } +/* + Match Subject Mappings +*/ + // 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 { @@ -191,6 +124,7 @@ message Subject { } message MatchSubjectMappingsRequest { + // Required Subject subject = 1; } @@ -215,19 +149,20 @@ message ListSubjectMappingsResponse { } message CreateSubjectMappingRequest{ - common.MetadataMutable metadata = 1; - + // Required // Attribute Value to be mapped to - string attribute_value_id = 2 [(buf.validate.field).required = true]; + string attribute_value_id = 1 [(buf.validate.field).required = true]; + // The actions permitted by subjects in this mapping + repeated authorization.Action actions = 2 [(buf.validate.field).repeated.min_items = 1]; + // Either of the following: // Reuse existing SubjectConditionSet (NOTE: prioritized over new_subject_condition_set) string existing_subject_condition_set_id = 3; - // Create new SubjectConditionSet (NOTE: ignored if existing_subject_condition_set_id is provided) SubjectConditionSetCreate new_subject_condition_set = 4; - // The actions permitted by subjects in this mapping - repeated authorization.Action actions = 5 [(buf.validate.field).repeated.min_items = 1]; + // Optional + common.MetadataMutable metadata = 100; } message CreateSubjectMappingResponse { // Only ID of the updated Subject Mapping provided @@ -235,15 +170,18 @@ message CreateSubjectMappingResponse { } message UpdateSubjectMappingRequest { + // Required string id = 1 [(buf.validate.field).required = true]; - common.MetadataMutable update_metadata = 2; - + // Optional // Replaces the existing SubjectConditionSet id with a new one - string update_subject_condition_set_id = 3; - + string subject_condition_set_id = 2; // Replaces entire list of actions permitted by subjects - repeated authorization.Action update_actions = 5; + repeated authorization.Action actions = 3; + + // Common metadata + common.MetadataMutable metadata = 100; + common.MetadataUpdateEnum metadata_update_behavior = 101; } message UpdateSubjectMappingResponse { // Only ID of the updated Subject Mapping provided @@ -277,10 +215,12 @@ message ListSubjectConditionSetsResponse { } message SubjectConditionSetCreate { - common.MetadataMutable metadata = 1; + // Required + repeated SubjectSet subject_sets = 1 [(buf.validate.field).repeated.min_items = 1]; - // multiple Subject Sets are evaluated with AND logic - repeated SubjectSet subject_sets = 2 [(buf.validate.field).repeated.min_items = 1]; + // Optional + // Common metadata + common.MetadataMutable metadata = 100; } message CreateSubjectConditionSetRequest { SubjectConditionSetCreate subject_condition_set = 1; @@ -291,12 +231,16 @@ message CreateSubjectConditionSetResponse { } message UpdateSubjectConditionSetRequest { + // Required string id = 1 [(buf.validate.field).required = true]; - common.MetadataMutable update_metadata = 2; + // Optional + // If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions + repeated SubjectSet update_subject_sets = 2; - // if provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions - repeated SubjectSet update_subject_sets = 3; + // Common metadata + common.MetadataMutable metadata = 100; + common.MetadataUpdateEnum metadata_update_behavior = 101; } message UpdateSubjectConditionSetResponse { // Only ID of created Subject Condition Set provided From 025e11320df4fa2d363c3186d7a2a3c8fa272923 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 10:26:06 -0400 Subject: [PATCH 33/39] return all values on create, id on update/delete, unify comments and metadata behavior decisions --- docs/grpc/index.html | 10 +- .../subject_mapping.swagger.json | 12 +- internal/db/errors.go | 6 +- .../subjectmapping/subject_mapping.pb.go | 373 +++++++++--------- .../CreateSubjectConditionSetResponse.java | 48 --- ...eSubjectConditionSetResponseOrBuilder.java | 12 - .../CreateSubjectMappingResponse.java | 48 --- ...CreateSubjectMappingResponseOrBuilder.java | 12 - .../DeleteSubjectConditionSetResponse.java | 24 +- ...eSubjectConditionSetResponseOrBuilder.java | 6 +- .../subjectmapping/SubjectMappingProto.java | 156 ++++---- .../UpdateSubjectConditionSetRequest.java | 308 +++++++-------- ...teSubjectConditionSetRequestOrBuilder.java | 20 +- .../UpdateSubjectConditionSetResponse.java | 24 +- ...eSubjectConditionSetResponseOrBuilder.java | 6 +- services/policy/db/namespaces.go | 5 +- services/policy/db/subject_mappings.go | 175 ++++---- .../subjectmapping/subject_mapping.proto | 8 +- 18 files changed, 582 insertions(+), 671 deletions(-) diff --git a/docs/grpc/index.html b/docs/grpc/index.html index 7f63277f99..0633240ff8 100644 --- a/docs/grpc/index.html +++ b/docs/grpc/index.html @@ -4947,7 +4947,7 @@

    CreateSubjectCo subject_condition_set SubjectConditionSet -

    Only ID of created Subject Condition Set provided

    +

    @@ -5025,7 +5025,7 @@

    CreateSubjectMapping subject_mapping SubjectMapping -

    Only ID of the updated Subject Mapping provided

    +

    @@ -5073,7 +5073,7 @@

    DeleteSubjectCo subject_condition_set SubjectConditionSet -

    Only ID of created Subject Condition Set provided

    +

    Only ID of deleted Subject Condition Set provided

    @@ -5532,7 +5532,7 @@

    UpdateSubjectCon - update_subject_sets + subject_sets SubjectSet repeated

    Optional @@ -5574,7 +5574,7 @@

    UpdateSubjectCo subject_condition_set SubjectConditionSet -

    Only ID of created Subject Condition Set provided

    +

    Only ID of updated Subject Condition Set provided

    diff --git a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json index 169a96cdb6..87a464b2af 100644 --- a/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json +++ b/docs/openapi/policy/subjectmapping/subject_mapping.swagger.json @@ -156,7 +156,7 @@ "schema": { "type": "object", "properties": { - "updateSubjectSets": { + "subjectSets": { "type": "array", "items": { "type": "object", @@ -703,8 +703,7 @@ "type": "object", "properties": { "subjectConditionSet": { - "$ref": "#/definitions/subjectmappingSubjectConditionSet", - "title": "Only ID of created Subject Condition Set provided" + "$ref": "#/definitions/subjectmappingSubjectConditionSet" } } }, @@ -741,8 +740,7 @@ "type": "object", "properties": { "subjectMapping": { - "$ref": "#/definitions/subjectmappingSubjectMapping", - "title": "Only ID of the updated Subject Mapping provided" + "$ref": "#/definitions/subjectmappingSubjectMapping" } } }, @@ -751,7 +749,7 @@ "properties": { "subjectConditionSet": { "$ref": "#/definitions/subjectmappingSubjectConditionSet", - "title": "Only ID of created Subject Condition Set provided" + "title": "Only ID of deleted Subject Condition Set provided" } } }, @@ -927,7 +925,7 @@ "properties": { "subjectConditionSet": { "$ref": "#/definitions/subjectmappingSubjectConditionSet", - "title": "Only ID of created Subject Condition Set provided" + "title": "Only ID of updated Subject Condition Set provided" } } }, diff --git a/internal/db/errors.go b/internal/db/errors.go index 7320c79e5f..9dfe74b074 100644 --- a/internal/db/errors.go +++ b/internal/db/errors.go @@ -78,7 +78,11 @@ func isPgError(err error) *pgconn.PgError { } func IsQueryBuilderSetClauseError(err error) bool { - return err != nil && strings.Contains(err.Error(), "at least one Set clause") + if err != nil && strings.Contains(err.Error(), "at least one Set clause") { + slog.Error("update SET clause error: no columns updated", slog.String("error", err.Error())) + return true + } + return false } func NewUniqueAlreadyExistsError(value string) error { diff --git a/protocol/go/policy/subjectmapping/subject_mapping.pb.go b/protocol/go/policy/subjectmapping/subject_mapping.pb.go index d6bc3b0b0c..3d8cbca900 100644 --- a/protocol/go/policy/subjectmapping/subject_mapping.pb.go +++ b/protocol/go/policy/subjectmapping/subject_mapping.pb.go @@ -886,7 +886,6 @@ type CreateSubjectMappingResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Only ID of the updated Subject Mapping provided SubjectMapping *SubjectMapping `protobuf:"bytes,1,opt,name=subject_mapping,json=subjectMapping,proto3" json:"subject_mapping,omitempty"` } @@ -1454,7 +1453,6 @@ type CreateSubjectConditionSetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Only ID of created Subject Condition Set provided SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` } @@ -1506,7 +1504,7 @@ type UpdateSubjectConditionSetRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Optional // If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions - UpdateSubjectSets []*SubjectSet `protobuf:"bytes,2,rep,name=update_subject_sets,json=updateSubjectSets,proto3" json:"update_subject_sets,omitempty"` + SubjectSets []*SubjectSet `protobuf:"bytes,2,rep,name=subject_sets,json=subjectSets,proto3" json:"subject_sets,omitempty"` // Common metadata Metadata *common.MetadataMutable `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"` MetadataUpdateBehavior common.MetadataUpdateEnum `protobuf:"varint,101,opt,name=metadata_update_behavior,json=metadataUpdateBehavior,proto3,enum=common.MetadataUpdateEnum" json:"metadata_update_behavior,omitempty"` @@ -1551,9 +1549,9 @@ func (x *UpdateSubjectConditionSetRequest) GetId() string { return "" } -func (x *UpdateSubjectConditionSetRequest) GetUpdateSubjectSets() []*SubjectSet { +func (x *UpdateSubjectConditionSetRequest) GetSubjectSets() []*SubjectSet { if x != nil { - return x.UpdateSubjectSets + return x.SubjectSets } return nil } @@ -1577,7 +1575,7 @@ type UpdateSubjectConditionSetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Only ID of created Subject Condition Set provided + // Only ID of updated Subject Condition Set provided SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` } @@ -1672,7 +1670,7 @@ type DeleteSubjectConditionSetResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Only ID of created Subject Condition Set provided + // Only ID of deleted Subject Condition Set provided SubjectConditionSet *SubjectConditionSet `protobuf:"bytes,1,opt,name=subject_condition_set,json=subjectConditionSet,proto3" json:"subject_condition_set,omitempty"` } @@ -1954,198 +1952,197 @@ var file_policy_subjectmapping_subject_mapping_proto_rawDesc = []byte{ 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, - 0x98, 0x02, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x8b, 0x02, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x51, 0x0a, 0x13, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, - 0x65, 0x74, 0x73, 0x18, 0x02, 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, 0x11, 0x75, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x53, 0x65, 0x74, 0x73, 0x12, - 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, 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, 0x54, 0x0a, 0x18, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, - 0x18, 0x65, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6e, - 0x75, 0x6d, 0x52, 0x16, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x22, 0x83, 0x01, 0x0a, 0x21, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x2a, 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, 0x43, - 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, 0x75, 0x62, + 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x44, 0x0a, 0x0c, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x02, 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, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x64, + 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, 0x54, 0x0a, 0x18, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, + 0x69, 0x6f, 0x72, 0x18, 0x65, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x16, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x22, 0x83, 0x01, + 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x22, 0x3a, 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x83, 0x01, 0x0a, - 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x63, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x13, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 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, 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, 0xe0, 0x0e, 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, + 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, + 0x83, 0x01, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x52, 0x13, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 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, 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, 0xe0, 0x0e, 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, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, - 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d, 0x01, 0x0a, - 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x1c, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xa2, 0x01, 0x0a, - 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x4d, 0x61, - 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x21, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, - 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, - 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, - 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x34, 0x2e, + 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, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, - 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, - 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, 0x17, 0x2f, 0x73, - 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x70, + 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, + 0x9d, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x1c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x16, 0x3a, 0x01, 0x2a, 0x22, 0x11, 0x2f, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, + 0xa2, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, - 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, - 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, - 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 0x2e, + 0x63, 0x74, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x21, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x32, 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, 0x12, 0xac, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x73, 0x12, 0x36, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 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, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xab, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x12, 0x34, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, - 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, - 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, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, + 0x69, 0x64, 0x7d, 0x12, 0xb2, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01, 0x2a, 0x22, + 0x17, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x12, 0xb7, 0x01, 0x0a, 0x19, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x38, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x21, 0x3a, 0x01, 0x2a, 0x32, 0x1c, 0x2f, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x69, + 0x64, 0x7d, 0x12, 0xb4, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, + 0x12, 0x37, 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, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, + 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 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, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x2a, 0x1c, 0x2f, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2d, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2d, + 0x73, 0x65, 0x74, 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 ( @@ -2233,7 +2230,7 @@ var file_policy_subjectmapping_subject_mapping_proto_depIdxs = []int32{ 35, // 28: policy.subjectmapping.SubjectConditionSetCreate.metadata:type_name -> common.MetadataMutable 24, // 29: policy.subjectmapping.CreateSubjectConditionSetRequest.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSetCreate 5, // 30: policy.subjectmapping.CreateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet - 4, // 31: policy.subjectmapping.UpdateSubjectConditionSetRequest.update_subject_sets:type_name -> policy.subjectmapping.SubjectSet + 4, // 31: policy.subjectmapping.UpdateSubjectConditionSetRequest.subject_sets:type_name -> policy.subjectmapping.SubjectSet 35, // 32: policy.subjectmapping.UpdateSubjectConditionSetRequest.metadata:type_name -> common.MetadataMutable 36, // 33: policy.subjectmapping.UpdateSubjectConditionSetRequest.metadata_update_behavior:type_name -> common.MetadataUpdateEnum 5, // 34: policy.subjectmapping.UpdateSubjectConditionSetResponse.subject_condition_set:type_name -> policy.subjectmapping.SubjectConditionSet diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java index 8496952ed9..7919585aa5 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponse.java @@ -43,10 +43,6 @@ protected java.lang.Object newInstance( public static final int SUBJECT_CONDITION_SET_FIELD_NUMBER = 1; private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; /** - *
    -   * Only ID of created Subject Condition Set provided
    -   * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; * @return Whether the subjectConditionSet field is set. */ @@ -55,10 +51,6 @@ public boolean hasSubjectConditionSet() { return ((bitField0_ & 0x00000001) != 0); } /** - *
    -   * Only ID of created Subject Condition Set provided
    -   * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; * @return The subjectConditionSet. */ @@ -67,10 +59,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectC return subjectConditionSet_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.getDefaultInstance() : subjectConditionSet_; } /** - *
    -   * Only ID of created Subject Condition Set provided
    -   * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ @java.lang.Override @@ -429,10 +417,6 @@ public Builder mergeFrom( private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; /** - *
    -     * Only ID of created Subject Condition Set provided
    -     * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; * @return Whether the subjectConditionSet field is set. */ @@ -440,10 +424,6 @@ public boolean hasSubjectConditionSet() { return ((bitField0_ & 0x00000001) != 0); } /** - *
    -     * Only ID of created Subject Condition Set provided
    -     * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; * @return The subjectConditionSet. */ @@ -455,10 +435,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectC } } /** - *
    -     * Only ID of created Subject Condition Set provided
    -     * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { @@ -475,10 +451,6 @@ public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping. return this; } /** - *
    -     * Only ID of created Subject Condition Set provided
    -     * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ public Builder setSubjectConditionSet( @@ -493,10 +465,6 @@ public Builder setSubjectConditionSet( return this; } /** - *
    -     * Only ID of created Subject Condition Set provided
    -     * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmapping.SubjectConditionSet value) { @@ -518,10 +486,6 @@ public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmappin return this; } /** - *
    -     * Only ID of created Subject Condition Set provided
    -     * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ public Builder clearSubjectConditionSet() { @@ -535,10 +499,6 @@ public Builder clearSubjectConditionSet() { return this; } /** - *
    -     * Only ID of created Subject Condition Set provided
    -     * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder getSubjectConditionSetBuilder() { @@ -547,10 +507,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder get return getSubjectConditionSetFieldBuilder().getBuilder(); } /** - *
    -     * Only ID of created Subject Condition Set provided
    -     * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder() { @@ -562,10 +518,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder ge } } /** - *
    -     * Only ID of created Subject Condition Set provided
    -     * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java index 644321b993..9e0619c5ba 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectConditionSetResponseOrBuilder.java @@ -9,28 +9,16 @@ public interface CreateSubjectConditionSetResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - *
    -   * Only ID of created Subject Condition Set provided
    -   * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; * @return Whether the subjectConditionSet field is set. */ boolean hasSubjectConditionSet(); /** - *
    -   * Only ID of created Subject Condition Set provided
    -   * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; * @return The subjectConditionSet. */ io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); /** - *
    -   * Only ID of created Subject Condition Set provided
    -   * 
    - * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; */ io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder getSubjectConditionSetOrBuilder(); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java index 824b7afa4c..a7802ad596 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponse.java @@ -43,10 +43,6 @@ protected java.lang.Object newInstance( public static final int SUBJECT_MAPPING_FIELD_NUMBER = 1; private io.opentdf.platform.policy.subjectmapping.SubjectMapping subjectMapping_; /** - *
    -   * Only ID of the updated Subject Mapping provided
    -   * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; * @return Whether the subjectMapping field is set. */ @@ -55,10 +51,6 @@ public boolean hasSubjectMapping() { return ((bitField0_ & 0x00000001) != 0); } /** - *
    -   * Only ID of the updated Subject Mapping provided
    -   * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; * @return The subjectMapping. */ @@ -67,10 +59,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMappin return subjectMapping_ == null ? io.opentdf.platform.policy.subjectmapping.SubjectMapping.getDefaultInstance() : subjectMapping_; } /** - *
    -   * Only ID of the updated Subject Mapping provided
    -   * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ @java.lang.Override @@ -429,10 +417,6 @@ public Builder mergeFrom( private com.google.protobuf.SingleFieldBuilderV3< io.opentdf.platform.policy.subjectmapping.SubjectMapping, io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder, io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder> subjectMappingBuilder_; /** - *
    -     * Only ID of the updated Subject Mapping provided
    -     * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; * @return Whether the subjectMapping field is set. */ @@ -440,10 +424,6 @@ public boolean hasSubjectMapping() { return ((bitField0_ & 0x00000001) != 0); } /** - *
    -     * Only ID of the updated Subject Mapping provided
    -     * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; * @return The subjectMapping. */ @@ -455,10 +435,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMappin } } /** - *
    -     * Only ID of the updated Subject Mapping provided
    -     * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { @@ -475,10 +451,6 @@ public Builder setSubjectMapping(io.opentdf.platform.policy.subjectmapping.Subje return this; } /** - *
    -     * Only ID of the updated Subject Mapping provided
    -     * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ public Builder setSubjectMapping( @@ -493,10 +465,6 @@ public Builder setSubjectMapping( return this; } /** - *
    -     * Only ID of the updated Subject Mapping provided
    -     * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.SubjectMapping value) { @@ -518,10 +486,6 @@ public Builder mergeSubjectMapping(io.opentdf.platform.policy.subjectmapping.Sub return this; } /** - *
    -     * Only ID of the updated Subject Mapping provided
    -     * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ public Builder clearSubjectMapping() { @@ -535,10 +499,6 @@ public Builder clearSubjectMapping() { return this; } /** - *
    -     * Only ID of the updated Subject Mapping provided
    -     * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder getSubjectMappingBuilder() { @@ -547,10 +507,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMapping.Builder getSubje return getSubjectMappingFieldBuilder().getBuilder(); } /** - *
    -     * Only ID of the updated Subject Mapping provided
    -     * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder() { @@ -562,10 +518,6 @@ public io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubj } } /** - *
    -     * Only ID of the updated Subject Mapping provided
    -     * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ private com.google.protobuf.SingleFieldBuilderV3< diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java index f925819d32..aa16282297 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/CreateSubjectMappingResponseOrBuilder.java @@ -9,28 +9,16 @@ public interface CreateSubjectMappingResponseOrBuilder extends com.google.protobuf.MessageOrBuilder { /** - *
    -   * Only ID of the updated Subject Mapping provided
    -   * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; * @return Whether the subjectMapping field is set. */ boolean hasSubjectMapping(); /** - *
    -   * Only ID of the updated Subject Mapping provided
    -   * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; * @return The subjectMapping. */ io.opentdf.platform.policy.subjectmapping.SubjectMapping getSubjectMapping(); /** - *
    -   * Only ID of the updated Subject Mapping provided
    -   * 
    - * * .policy.subjectmapping.SubjectMapping subject_mapping = 1 [json_name = "subjectMapping"]; */ io.opentdf.platform.policy.subjectmapping.SubjectMappingOrBuilder getSubjectMappingOrBuilder(); diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java index 6bffddd83d..f970d8b253 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponse.java @@ -44,7 +44,7 @@ protected java.lang.Object newInstance( private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of deleted Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -56,7 +56,7 @@ public boolean hasSubjectConditionSet() { } /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of deleted Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -68,7 +68,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectC } /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of deleted Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -430,7 +430,7 @@ public Builder mergeFrom( io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of deleted Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -441,7 +441,7 @@ public boolean hasSubjectConditionSet() { } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of deleted Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -456,7 +456,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectC } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of deleted Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -476,7 +476,7 @@ public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping. } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of deleted Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -494,7 +494,7 @@ public Builder setSubjectConditionSet( } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of deleted Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -519,7 +519,7 @@ public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmappin } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of deleted Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -536,7 +536,7 @@ public Builder clearSubjectConditionSet() { } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of deleted Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -548,7 +548,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder get } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of deleted Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -563,7 +563,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder ge } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of deleted Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java index 1a2a6cc237..555c2e07f5 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/DeleteSubjectConditionSetResponseOrBuilder.java @@ -10,7 +10,7 @@ public interface DeleteSubjectConditionSetResponseOrBuilder extends /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of deleted Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -19,7 +19,7 @@ public interface DeleteSubjectConditionSetResponseOrBuilder extends boolean hasSubjectConditionSet(); /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of deleted Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -28,7 +28,7 @@ public interface DeleteSubjectConditionSetResponseOrBuilder extends io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of deleted Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; 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 2c9556ddef..91e0a5301b 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 @@ -263,83 +263,83 @@ public static void registerAllExtensions( "t\"\203\001\n!CreateSubjectConditionSetResponse\022" + "^\n\025subject_condition_set\030\001 \001(\0132*.policy." + "subjectmapping.SubjectConditionSetR\023subj" + - "ectConditionSet\"\230\002\n UpdateSubjectConditi" + - "onSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022Q\n\023" + - "update_subject_sets\030\002 \003(\0132!.policy.subje" + - "ctmapping.SubjectSetR\021updateSubjectSets\022" + - "3\n\010metadata\030d \001(\0132\027.common.MetadataMutab" + - "leR\010metadata\022T\n\030metadata_update_behavior" + - "\030e \001(\0162\032.common.MetadataUpdateEnumR\026meta" + - "dataUpdateBehavior\"\203\001\n!UpdateSubjectCond" + - "itionSetResponse\022^\n\025subject_condition_se" + - "t\030\001 \001(\0132*.policy.subjectmapping.SubjectC" + - "onditionSetR\023subjectConditionSet\":\n Dele" + - "teSubjectConditionSetRequest\022\026\n\002id\030\001 \001(\t" + - "B\006\272H\003\310\001\001R\002id\"\203\001\n!DeleteSubjectConditionS" + - "etResponse\022^\n\025subject_condition_set\030\001 \001(" + - "\0132*.policy.subjectmapping.SubjectConditi" + - "onSetR\023subjectConditionSet*\233\001\n\032SubjectMa" + - "ppingOperatorEnum\022-\n)SUBJECT_MAPPING_OPE" + - "RATOR_ENUM_UNSPECIFIED\020\000\022$\n SUBJECT_MAPP" + - "ING_OPERATOR_ENUM_IN\020\001\022(\n$SUBJECT_MAPPIN" + - "G_OPERATOR_ENUM_NOT_IN\020\002*\220\001\n\030ConditionBo" + - "oleanTypeEnum\022+\n\'CONDITION_BOOLEAN_TYPE_" + - "ENUM_UNSPECIFIED\020\000\022#\n\037CONDITION_BOOLEAN_" + - "TYPE_ENUM_AND\020\001\022\"\n\036CONDITION_BOOLEAN_TYP" + - "E_ENUM_OR\020\0022\340\016\n\025SubjectMappingService\022\251\001" + - "\n\024MatchSubjectMappings\0222.policy.subjectm" + - "apping.MatchSubjectMappingsRequest\0323.pol" + - "icy.subjectmapping.MatchSubjectMappingsR" + - "esponse\"(\202\323\344\223\002\"\"\027/subject-mappings/match" + - ":\007subject\022\227\001\n\023ListSubjectMappings\0221.poli" + - "cy.subjectmapping.ListSubjectMappingsReq" + - "uest\0322.policy.subjectmapping.ListSubject" + - "MappingsResponse\"\031\202\323\344\223\002\023\022\021/subject-mappi" + - "ngs\022\226\001\n\021GetSubjectMapping\022/.policy.subje" + - "ctmapping.GetSubjectMappingRequest\0320.pol" + - "icy.subjectmapping.GetSubjectMappingResp" + - "onse\"\036\202\323\344\223\002\030\022\026/subject-mappings/{id}\022\235\001\n" + - "\024CreateSubjectMapping\0222.policy.subjectma" + - "pping.CreateSubjectMappingRequest\0323.poli" + - "cy.subjectmapping.CreateSubjectMappingRe" + - "sponse\"\034\202\323\344\223\002\026\"\021/subject-mappings:\001*\022\242\001\n" + - "\024UpdateSubjectMapping\0222.policy.subjectma" + - "pping.UpdateSubjectMappingRequest\0323.poli" + - "cy.subjectmapping.UpdateSubjectMappingRe" + - "sponse\"!\202\323\344\223\002\0332\026/subject-mappings/{id}:\001" + - "*\022\237\001\n\024DeleteSubjectMapping\0222.policy.subj" + - "ectmapping.DeleteSubjectMappingRequest\0323" + - ".policy.subjectmapping.DeleteSubjectMapp" + - "ingResponse\"\036\202\323\344\223\002\030*\026/subject-mappings/{" + - "id}\022\254\001\n\030ListSubjectConditionSets\0226.polic" + - "y.subjectmapping.ListSubjectConditionSet" + - "sRequest\0327.policy.subjectmapping.ListSub" + - "jectConditionSetsResponse\"\037\202\323\344\223\002\031\022\027/subj" + - "ect-condition-sets\022\253\001\n\026GetSubjectConditi" + - "onSet\0224.policy.subjectmapping.GetSubject" + - "ConditionSetRequest\0325.policy.subjectmapp" + - "ing.GetSubjectConditionSetResponse\"$\202\323\344\223" + - "\002\036\022\034/subject-condition-sets/{id}\022\262\001\n\031Cre" + - "ateSubjectConditionSet\0227.policy.subjectm" + - "apping.CreateSubjectConditionSetRequest\032" + - "8.policy.subjectmapping.CreateSubjectCon" + - "ditionSetResponse\"\"\202\323\344\223\002\034\"\027/subject-cond" + - "ition-sets:\001*\022\267\001\n\031UpdateSubjectCondition" + - "Set\0227.policy.subjectmapping.UpdateSubjec" + - "tConditionSetRequest\0328.policy.subjectmap" + - "ping.UpdateSubjectConditionSetResponse\"\'" + - "\202\323\344\223\002!2\034/subject-condition-sets/{id}:\001*\022" + - "\264\001\n\031DeleteSubjectConditionSet\0227.policy.s" + - "ubjectmapping.DeleteSubjectConditionSetR" + - "equest\0328.policy.subjectmapping.DeleteSub" + - "jectConditionSetResponse\"$\202\323\344\223\002\036*\034/subje" + - "ct-condition-sets/{id}B\364\001\n)io.opentdf.pl" + - "atform.policy.subjectmappingB\023SubjectMap" + - "pingProtoP\001Z=github.com/opentdf/platform" + - "/protocol/go/policy/subjectmapping\242\002\003PSX" + - "\252\002\025Policy.Subjectmapping\312\002\025Policy\\Subjec" + - "tmapping\342\002!Policy\\Subjectmapping\\GPBMeta" + - "data\352\002\026Policy::Subjectmappingb\006proto3" + "ectConditionSet\"\213\002\n UpdateSubjectConditi" + + "onSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\022D\n\014" + + "subject_sets\030\002 \003(\0132!.policy.subjectmappi" + + "ng.SubjectSetR\013subjectSets\0223\n\010metadata\030d" + + " \001(\0132\027.common.MetadataMutableR\010metadata\022" + + "T\n\030metadata_update_behavior\030e \001(\0162\032.comm" + + "on.MetadataUpdateEnumR\026metadataUpdateBeh" + + "avior\"\203\001\n!UpdateSubjectConditionSetRespo" + + "nse\022^\n\025subject_condition_set\030\001 \001(\0132*.pol" + + "icy.subjectmapping.SubjectConditionSetR\023" + + "subjectConditionSet\":\n DeleteSubjectCond" + + "itionSetRequest\022\026\n\002id\030\001 \001(\tB\006\272H\003\310\001\001R\002id\"" + + "\203\001\n!DeleteSubjectConditionSetResponse\022^\n" + + "\025subject_condition_set\030\001 \001(\0132*.policy.su" + + "bjectmapping.SubjectConditionSetR\023subjec" + + "tConditionSet*\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\340" + + "\016\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\235\001\n\024CreateSubjec" + + "tMapping\0222.policy.subjectmapping.CreateS" + + "ubjectMappingRequest\0323.policy.subjectmap" + + "ping.CreateSubjectMappingResponse\"\034\202\323\344\223\002" + + "\026\"\021/subject-mappings:\001*\022\242\001\n\024UpdateSubjec" + + "tMapping\0222.policy.subjectmapping.UpdateS" + + "ubjectMappingRequest\0323.policy.subjectmap" + + "ping.UpdateSubjectMappingResponse\"!\202\323\344\223\002" + + "\0332\026/subject-mappings/{id}:\001*\022\237\001\n\024DeleteS" + + "ubjectMapping\0222.policy.subjectmapping.De" + + "leteSubjectMappingRequest\0323.policy.subje" + + "ctmapping.DeleteSubjectMappingResponse\"\036" + + "\202\323\344\223\002\030*\026/subject-mappings/{id}\022\254\001\n\030ListS" + + "ubjectConditionSets\0226.policy.subjectmapp" + + "ing.ListSubjectConditionSetsRequest\0327.po" + + "licy.subjectmapping.ListSubjectCondition" + + "SetsResponse\"\037\202\323\344\223\002\031\022\027/subject-condition" + + "-sets\022\253\001\n\026GetSubjectConditionSet\0224.polic" + + "y.subjectmapping.GetSubjectConditionSetR" + + "equest\0325.policy.subjectmapping.GetSubjec" + + "tConditionSetResponse\"$\202\323\344\223\002\036\022\034/subject-" + + "condition-sets/{id}\022\262\001\n\031CreateSubjectCon" + + "ditionSet\0227.policy.subjectmapping.Create" + + "SubjectConditionSetRequest\0328.policy.subj" + + "ectmapping.CreateSubjectConditionSetResp" + + "onse\"\"\202\323\344\223\002\034\"\027/subject-condition-sets:\001*" + + "\022\267\001\n\031UpdateSubjectConditionSet\0227.policy." + + "subjectmapping.UpdateSubjectConditionSet" + + "Request\0328.policy.subjectmapping.UpdateSu" + + "bjectConditionSetResponse\"\'\202\323\344\223\002!2\034/subj" + + "ect-condition-sets/{id}:\001*\022\264\001\n\031DeleteSub" + + "jectConditionSet\0227.policy.subjectmapping" + + ".DeleteSubjectConditionSetRequest\0328.poli" + + "cy.subjectmapping.DeleteSubjectCondition" + + "SetResponse\"$\202\323\344\223\002\036*\034/subject-condition-" + + "sets/{id}B\364\001\n)io.opentdf.platform.policy" + + ".subjectmappingB\023SubjectMappingProtoP\001Z=" + + "github.com/opentdf/platform/protocol/go/" + + "policy/subjectmapping\242\002\003PSX\252\002\025Policy.Sub" + + "jectmapping\312\002\025Policy\\Subjectmapping\342\002!Po" + + "licy\\Subjectmapping\\GPBMetadata\352\002\026Policy" + + "::Subjectmappingb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -506,7 +506,7 @@ public static void registerAllExtensions( internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_policy_subjectmapping_UpdateSubjectConditionSetRequest_descriptor, - new java.lang.String[] { "Id", "UpdateSubjectSets", "Metadata", "MetadataUpdateBehavior", }); + new java.lang.String[] { "Id", "SubjectSets", "Metadata", "MetadataUpdateBehavior", }); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_descriptor = getDescriptor().getMessageTypes().get(26); internal_static_policy_subjectmapping_UpdateSubjectConditionSetResponse_fieldAccessorTable = new diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java index c42e040caa..48b747fc99 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequest.java @@ -18,7 +18,7 @@ private UpdateSubjectConditionSetRequest(com.google.protobuf.GeneratedMessageV3. } private UpdateSubjectConditionSetRequest() { id_ = ""; - updateSubjectSets_ = java.util.Collections.emptyList(); + subjectSets_ = java.util.Collections.emptyList(); metadataUpdateBehavior_ = 0; } @@ -90,20 +90,20 @@ public java.lang.String getId() { } } - public static final int UPDATE_SUBJECT_SETS_FIELD_NUMBER = 2; + public static final int SUBJECT_SETS_FIELD_NUMBER = 2; @SuppressWarnings("serial") - private java.util.List updateSubjectSets_; + private java.util.List subjectSets_; /** *
        * Optional
        * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ @java.lang.Override - public java.util.List getUpdateSubjectSetsList() { - return updateSubjectSets_; + public java.util.List getSubjectSetsList() { + return subjectSets_; } /** *
    @@ -111,12 +111,12 @@ public java.util.List getU
        * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ @java.lang.Override public java.util.List - getUpdateSubjectSetsOrBuilderList() { - return updateSubjectSets_; + getSubjectSetsOrBuilderList() { + return subjectSets_; } /** *
    @@ -124,11 +124,11 @@ public java.util.List getU
        * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ @java.lang.Override - public int getUpdateSubjectSetsCount() { - return updateSubjectSets_.size(); + public int getSubjectSetsCount() { + return subjectSets_.size(); } /** *
    @@ -136,11 +136,11 @@ public int getUpdateSubjectSetsCount() {
        * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index) { - return updateSubjectSets_.get(index); + public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { + return subjectSets_.get(index); } /** *
    @@ -148,12 +148,12 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets
        * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ @java.lang.Override - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( + public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index) { - return updateSubjectSets_.get(index); + return subjectSets_.get(index); } public static final int METADATA_FIELD_NUMBER = 100; @@ -229,8 +229,8 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } - for (int i = 0; i < updateSubjectSets_.size(); i++) { - output.writeMessage(2, updateSubjectSets_.get(i)); + for (int i = 0; i < subjectSets_.size(); i++) { + output.writeMessage(2, subjectSets_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(100, getMetadata()); @@ -250,9 +250,9 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } - for (int i = 0; i < updateSubjectSets_.size(); i++) { + for (int i = 0; i < subjectSets_.size(); i++) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, updateSubjectSets_.get(i)); + .computeMessageSize(2, subjectSets_.get(i)); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream @@ -279,8 +279,8 @@ public boolean equals(final java.lang.Object obj) { if (!getId() .equals(other.getId())) return false; - if (!getUpdateSubjectSetsList() - .equals(other.getUpdateSubjectSetsList())) return false; + if (!getSubjectSetsList() + .equals(other.getSubjectSetsList())) return false; if (hasMetadata() != other.hasMetadata()) return false; if (hasMetadata()) { if (!getMetadata() @@ -300,9 +300,9 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); - if (getUpdateSubjectSetsCount() > 0) { - hash = (37 * hash) + UPDATE_SUBJECT_SETS_FIELD_NUMBER; - hash = (53 * hash) + getUpdateSubjectSetsList().hashCode(); + if (getSubjectSetsCount() > 0) { + hash = (37 * hash) + SUBJECT_SETS_FIELD_NUMBER; + hash = (53 * hash) + getSubjectSetsList().hashCode(); } if (hasMetadata()) { hash = (37 * hash) + METADATA_FIELD_NUMBER; @@ -440,7 +440,7 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { - getUpdateSubjectSetsFieldBuilder(); + getSubjectSetsFieldBuilder(); getMetadataFieldBuilder(); } } @@ -449,11 +449,11 @@ public Builder clear() { super.clear(); bitField0_ = 0; id_ = ""; - if (updateSubjectSetsBuilder_ == null) { - updateSubjectSets_ = java.util.Collections.emptyList(); + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); } else { - updateSubjectSets_ = null; - updateSubjectSetsBuilder_.clear(); + subjectSets_ = null; + subjectSetsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); metadata_ = null; @@ -495,14 +495,14 @@ public io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetReques } private void buildPartialRepeatedFields(io.opentdf.platform.policy.subjectmapping.UpdateSubjectConditionSetRequest result) { - if (updateSubjectSetsBuilder_ == null) { + if (subjectSetsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { - updateSubjectSets_ = java.util.Collections.unmodifiableList(updateSubjectSets_); + subjectSets_ = java.util.Collections.unmodifiableList(subjectSets_); bitField0_ = (bitField0_ & ~0x00000002); } - result.updateSubjectSets_ = updateSubjectSets_; + result.subjectSets_ = subjectSets_; } else { - result.updateSubjectSets_ = updateSubjectSetsBuilder_.build(); + result.subjectSets_ = subjectSetsBuilder_.build(); } } @@ -573,29 +573,29 @@ public Builder mergeFrom(io.opentdf.platform.policy.subjectmapping.UpdateSubject bitField0_ |= 0x00000001; onChanged(); } - if (updateSubjectSetsBuilder_ == null) { - if (!other.updateSubjectSets_.isEmpty()) { - if (updateSubjectSets_.isEmpty()) { - updateSubjectSets_ = other.updateSubjectSets_; + if (subjectSetsBuilder_ == null) { + if (!other.subjectSets_.isEmpty()) { + if (subjectSets_.isEmpty()) { + subjectSets_ = other.subjectSets_; bitField0_ = (bitField0_ & ~0x00000002); } else { - ensureUpdateSubjectSetsIsMutable(); - updateSubjectSets_.addAll(other.updateSubjectSets_); + ensureSubjectSetsIsMutable(); + subjectSets_.addAll(other.subjectSets_); } onChanged(); } } else { - if (!other.updateSubjectSets_.isEmpty()) { - if (updateSubjectSetsBuilder_.isEmpty()) { - updateSubjectSetsBuilder_.dispose(); - updateSubjectSetsBuilder_ = null; - updateSubjectSets_ = other.updateSubjectSets_; + if (!other.subjectSets_.isEmpty()) { + if (subjectSetsBuilder_.isEmpty()) { + subjectSetsBuilder_.dispose(); + subjectSetsBuilder_ = null; + subjectSets_ = other.subjectSets_; bitField0_ = (bitField0_ & ~0x00000002); - updateSubjectSetsBuilder_ = + subjectSetsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getUpdateSubjectSetsFieldBuilder() : null; + getSubjectSetsFieldBuilder() : null; } else { - updateSubjectSetsBuilder_.addAllMessages(other.updateSubjectSets_); + subjectSetsBuilder_.addAllMessages(other.subjectSets_); } } } @@ -641,11 +641,11 @@ public Builder mergeFrom( input.readMessage( io.opentdf.platform.policy.subjectmapping.SubjectSet.parser(), extensionRegistry); - if (updateSubjectSetsBuilder_ == null) { - ensureUpdateSubjectSetsIsMutable(); - updateSubjectSets_.add(m); + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(m); } else { - updateSubjectSetsBuilder_.addMessage(m); + subjectSetsBuilder_.addMessage(m); } break; } // case 18 @@ -770,17 +770,17 @@ public Builder setIdBytes( return this; } - private java.util.List updateSubjectSets_ = + private java.util.List subjectSets_ = java.util.Collections.emptyList(); - private void ensureUpdateSubjectSetsIsMutable() { + private void ensureSubjectSetsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { - updateSubjectSets_ = new java.util.ArrayList(updateSubjectSets_); + subjectSets_ = new java.util.ArrayList(subjectSets_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< - io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> updateSubjectSetsBuilder_; + io.opentdf.platform.policy.subjectmapping.SubjectSet, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder> subjectSetsBuilder_; /** *
    @@ -788,13 +788,13 @@ private void ensureUpdateSubjectSetsIsMutable() {
          * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public java.util.List getUpdateSubjectSetsList() { - if (updateSubjectSetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(updateSubjectSets_); + public java.util.List getSubjectSetsList() { + if (subjectSetsBuilder_ == null) { + return java.util.Collections.unmodifiableList(subjectSets_); } else { - return updateSubjectSetsBuilder_.getMessageList(); + return subjectSetsBuilder_.getMessageList(); } } /** @@ -803,13 +803,13 @@ public java.util.List getU * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public int getUpdateSubjectSetsCount() { - if (updateSubjectSetsBuilder_ == null) { - return updateSubjectSets_.size(); + public int getSubjectSetsCount() { + if (subjectSetsBuilder_ == null) { + return subjectSets_.size(); } else { - return updateSubjectSetsBuilder_.getCount(); + return subjectSetsBuilder_.getCount(); } } /** @@ -818,13 +818,13 @@ public int getUpdateSubjectSetsCount() { * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index) { - if (updateSubjectSetsBuilder_ == null) { - return updateSubjectSets_.get(index); + public io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); } else { - return updateSubjectSetsBuilder_.getMessage(index); + return subjectSetsBuilder_.getMessage(index); } } /** @@ -833,19 +833,19 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public Builder setUpdateSubjectSets( + public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (updateSubjectSetsBuilder_ == null) { + if (subjectSetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUpdateSubjectSetsIsMutable(); - updateSubjectSets_.set(index, value); + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, value); onChanged(); } else { - updateSubjectSetsBuilder_.setMessage(index, value); + subjectSetsBuilder_.setMessage(index, value); } return this; } @@ -855,16 +855,16 @@ public Builder setUpdateSubjectSets( * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public Builder setUpdateSubjectSets( + public Builder setSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (updateSubjectSetsBuilder_ == null) { - ensureUpdateSubjectSetsIsMutable(); - updateSubjectSets_.set(index, builderForValue.build()); + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.set(index, builderForValue.build()); onChanged(); } else { - updateSubjectSetsBuilder_.setMessage(index, builderForValue.build()); + subjectSetsBuilder_.setMessage(index, builderForValue.build()); } return this; } @@ -874,18 +874,18 @@ public Builder setUpdateSubjectSets( * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public Builder addUpdateSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (updateSubjectSetsBuilder_ == null) { + public Builder addSubjectSets(io.opentdf.platform.policy.subjectmapping.SubjectSet value) { + if (subjectSetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUpdateSubjectSetsIsMutable(); - updateSubjectSets_.add(value); + ensureSubjectSetsIsMutable(); + subjectSets_.add(value); onChanged(); } else { - updateSubjectSetsBuilder_.addMessage(value); + subjectSetsBuilder_.addMessage(value); } return this; } @@ -895,19 +895,19 @@ public Builder addUpdateSubjectSets(io.opentdf.platform.policy.subjectmapping.Su * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public Builder addUpdateSubjectSets( + public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet value) { - if (updateSubjectSetsBuilder_ == null) { + if (subjectSetsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } - ensureUpdateSubjectSetsIsMutable(); - updateSubjectSets_.add(index, value); + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, value); onChanged(); } else { - updateSubjectSetsBuilder_.addMessage(index, value); + subjectSetsBuilder_.addMessage(index, value); } return this; } @@ -917,16 +917,16 @@ public Builder addUpdateSubjectSets( * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public Builder addUpdateSubjectSets( + public Builder addSubjectSets( io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (updateSubjectSetsBuilder_ == null) { - ensureUpdateSubjectSetsIsMutable(); - updateSubjectSets_.add(builderForValue.build()); + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(builderForValue.build()); onChanged(); } else { - updateSubjectSetsBuilder_.addMessage(builderForValue.build()); + subjectSetsBuilder_.addMessage(builderForValue.build()); } return this; } @@ -936,16 +936,16 @@ public Builder addUpdateSubjectSets( * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public Builder addUpdateSubjectSets( + public Builder addSubjectSets( int index, io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder builderForValue) { - if (updateSubjectSetsBuilder_ == null) { - ensureUpdateSubjectSetsIsMutable(); - updateSubjectSets_.add(index, builderForValue.build()); + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.add(index, builderForValue.build()); onChanged(); } else { - updateSubjectSetsBuilder_.addMessage(index, builderForValue.build()); + subjectSetsBuilder_.addMessage(index, builderForValue.build()); } return this; } @@ -955,17 +955,17 @@ public Builder addUpdateSubjectSets( * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public Builder addAllUpdateSubjectSets( + public Builder addAllSubjectSets( java.lang.Iterable values) { - if (updateSubjectSetsBuilder_ == null) { - ensureUpdateSubjectSetsIsMutable(); + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, updateSubjectSets_); + values, subjectSets_); onChanged(); } else { - updateSubjectSetsBuilder_.addAllMessages(values); + subjectSetsBuilder_.addAllMessages(values); } return this; } @@ -975,15 +975,15 @@ public Builder addAllUpdateSubjectSets( * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public Builder clearUpdateSubjectSets() { - if (updateSubjectSetsBuilder_ == null) { - updateSubjectSets_ = java.util.Collections.emptyList(); + public Builder clearSubjectSets() { + if (subjectSetsBuilder_ == null) { + subjectSets_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { - updateSubjectSetsBuilder_.clear(); + subjectSetsBuilder_.clear(); } return this; } @@ -993,15 +993,15 @@ public Builder clearUpdateSubjectSets() { * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public Builder removeUpdateSubjectSets(int index) { - if (updateSubjectSetsBuilder_ == null) { - ensureUpdateSubjectSetsIsMutable(); - updateSubjectSets_.remove(index); + public Builder removeSubjectSets(int index) { + if (subjectSetsBuilder_ == null) { + ensureSubjectSetsIsMutable(); + subjectSets_.remove(index); onChanged(); } else { - updateSubjectSetsBuilder_.remove(index); + subjectSetsBuilder_.remove(index); } return this; } @@ -1011,11 +1011,11 @@ public Builder removeUpdateSubjectSets(int index) { * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getUpdateSubjectSetsBuilder( + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getSubjectSetsBuilder( int index) { - return getUpdateSubjectSetsFieldBuilder().getBuilder(index); + return getSubjectSetsFieldBuilder().getBuilder(index); } /** *
    @@ -1023,13 +1023,13 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder getUpdateSub
          * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
          * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( + public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index) { - if (updateSubjectSetsBuilder_ == null) { - return updateSubjectSets_.get(index); } else { - return updateSubjectSetsBuilder_.getMessageOrBuilder(index); + if (subjectSetsBuilder_ == null) { + return subjectSets_.get(index); } else { + return subjectSetsBuilder_.getMessageOrBuilder(index); } } /** @@ -1038,14 +1038,14 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSu * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ public java.util.List - getUpdateSubjectSetsOrBuilderList() { - if (updateSubjectSetsBuilder_ != null) { - return updateSubjectSetsBuilder_.getMessageOrBuilderList(); + getSubjectSetsOrBuilderList() { + if (subjectSetsBuilder_ != null) { + return subjectSetsBuilder_.getMessageOrBuilderList(); } else { - return java.util.Collections.unmodifiableList(updateSubjectSets_); + return java.util.Collections.unmodifiableList(subjectSets_); } } /** @@ -1054,10 +1054,10 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSu * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSubjectSetsBuilder() { - return getUpdateSubjectSetsFieldBuilder().addBuilder( + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder() { + return getSubjectSetsFieldBuilder().addBuilder( io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); } /** @@ -1066,11 +1066,11 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSub * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSubjectSetsBuilder( + public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addSubjectSetsBuilder( int index) { - return getUpdateSubjectSetsFieldBuilder().addBuilder( + return getSubjectSetsFieldBuilder().addBuilder( index, io.opentdf.platform.policy.subjectmapping.SubjectSet.getDefaultInstance()); } /** @@ -1079,25 +1079,25 @@ public io.opentdf.platform.policy.subjectmapping.SubjectSet.Builder addUpdateSub * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ public java.util.List - getUpdateSubjectSetsBuilderList() { - return getUpdateSubjectSetsFieldBuilder().getBuilderList(); + 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> - getUpdateSubjectSetsFieldBuilder() { - if (updateSubjectSetsBuilder_ == null) { - updateSubjectSetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + 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>( - updateSubjectSets_, + subjectSets_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); - updateSubjectSets_ = null; + subjectSets_ = null; } - return updateSubjectSetsBuilder_; + return subjectSetsBuilder_; } private io.opentdf.platform.common.MetadataMutable metadata_; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java index 06d71c36fd..3240d2d1f8 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetRequestOrBuilder.java @@ -34,47 +34,47 @@ public interface UpdateSubjectConditionSetRequestOrBuilder extends * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions * * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ java.util.List - getUpdateSubjectSetsList(); + getSubjectSetsList(); /** *
        * Optional
        * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectSet getUpdateSubjectSets(int index); + io.opentdf.platform.policy.subjectmapping.SubjectSet getSubjectSets(int index); /** *
        * Optional
        * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - int getUpdateSubjectSetsCount(); + int getSubjectSetsCount(); /** *
        * Optional
        * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ java.util.List - getUpdateSubjectSetsOrBuilderList(); + getSubjectSetsOrBuilderList(); /** *
        * Optional
        * If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions
        * 
    * - * repeated .policy.subjectmapping.SubjectSet update_subject_sets = 2 [json_name = "updateSubjectSets"]; + * repeated .policy.subjectmapping.SubjectSet subject_sets = 2 [json_name = "subjectSets"]; */ - io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getUpdateSubjectSetsOrBuilder( + io.opentdf.platform.policy.subjectmapping.SubjectSetOrBuilder getSubjectSetsOrBuilder( int index); /** diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java index e122e14c56..13b59fe721 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponse.java @@ -44,7 +44,7 @@ protected java.lang.Object newInstance( private io.opentdf.platform.policy.subjectmapping.SubjectConditionSet subjectConditionSet_; /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of updated Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -56,7 +56,7 @@ public boolean hasSubjectConditionSet() { } /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of updated Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -68,7 +68,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectC } /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of updated Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -430,7 +430,7 @@ public Builder mergeFrom( io.opentdf.platform.policy.subjectmapping.SubjectConditionSet, io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder, io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder> subjectConditionSetBuilder_; /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of updated Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -441,7 +441,7 @@ public boolean hasSubjectConditionSet() { } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of updated Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -456,7 +456,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectC } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of updated Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -476,7 +476,7 @@ public Builder setSubjectConditionSet(io.opentdf.platform.policy.subjectmapping. } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of updated Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -494,7 +494,7 @@ public Builder setSubjectConditionSet( } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of updated Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -519,7 +519,7 @@ public Builder mergeSubjectConditionSet(io.opentdf.platform.policy.subjectmappin } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of updated Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -536,7 +536,7 @@ public Builder clearSubjectConditionSet() { } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of updated Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -548,7 +548,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSet.Builder get } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of updated Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -563,7 +563,7 @@ public io.opentdf.platform.policy.subjectmapping.SubjectConditionSetOrBuilder ge } /** *
    -     * Only ID of created Subject Condition Set provided
    +     * Only ID of updated Subject Condition Set provided
          * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; diff --git a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java index f4e8fea99c..4acededf36 100644 --- a/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java +++ b/sdkjava/src/main/java/io/opentdf/platform/policy/subjectmapping/UpdateSubjectConditionSetResponseOrBuilder.java @@ -10,7 +10,7 @@ public interface UpdateSubjectConditionSetResponseOrBuilder extends /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of updated Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -19,7 +19,7 @@ public interface UpdateSubjectConditionSetResponseOrBuilder extends boolean hasSubjectConditionSet(); /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of updated Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; @@ -28,7 +28,7 @@ public interface UpdateSubjectConditionSetResponseOrBuilder extends io.opentdf.platform.policy.subjectmapping.SubjectConditionSet getSubjectConditionSet(); /** *
    -   * Only ID of created Subject Condition Set provided
    +   * Only ID of updated Subject Condition Set provided
        * 
    * * .policy.subjectmapping.SubjectConditionSet subject_condition_set = 1 [json_name = "subjectConditionSet"]; diff --git a/services/policy/db/namespaces.go b/services/policy/db/namespaces.go index 8e5213da5b..d35aff43d2 100644 --- a/services/policy/db/namespaces.go +++ b/services/policy/db/namespaces.go @@ -183,7 +183,7 @@ func createNamespaceSql(name string, metadata []byte) (string, []interface{}, er } func (c PolicyDbClient) CreateNamespace(ctx context.Context, r *namespaces.CreateNamespaceRequest) (*namespaces.Namespace, error) { - metadataJson, _, err := db.MarshalCreateMetadata(r.Metadata) + metadataJson, m, err := db.MarshalCreateMetadata(r.Metadata) if err != nil { return nil, err } @@ -202,6 +202,9 @@ func (c PolicyDbClient) CreateNamespace(ctx context.Context, r *namespaces.Creat return &namespaces.Namespace{ Id: id, + Name: r.Name, + Active: &wrapperspb.BoolValue{Value: true}, + Metadata: m, }, nil } diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 64c3b82537..92e7a98788 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -36,12 +36,14 @@ func unmarshalSubjectSetsProto(conditionJSON []byte) ([]*subjectmapping.SubjectS ss []*subjectmapping.SubjectSet ) if err := json.Unmarshal(conditionJSON, &raw); err != nil { + slog.Error("failed to unmarshal subject sets", slog.String("error", err.Error()), slog.String("condition JSON", string(conditionJSON))) return nil, err } for _, r := range raw { s := subjectmapping.SubjectSet{} if err := protojson.Unmarshal(r, &s); err != nil { + slog.Error("failed to unmarshal subject set", slog.String("error", err.Error()), slog.String("subject set JSON", string(r))) return nil, err } ss = append(ss, &s) @@ -69,12 +71,14 @@ func unmarshalActionsProto(actionsJSON []byte) ([]*authorization.Action, error) actions []*authorization.Action ) if err := json.Unmarshal(actionsJSON, &raw); err != nil { + slog.Error("failed to unmarshal actions", slog.String("error", err.Error()), slog.String("actions JSON", string(actionsJSON))) return nil, err } for _, r := range raw { a := authorization.Action{} if err := protojson.Unmarshal(r, &a); err != nil { + slog.Error("failed to unmarshal action", slog.String("error", err.Error()), slog.String("action JSON", string(r))) return nil, err } actions = append(actions, &a) @@ -110,6 +114,7 @@ func subjectConditionSetHydrateItem(row pgx.Row) (*subjectmapping.SubjectConditi m := &common.Metadata{} if metadata != nil { if err := protojson.Unmarshal(metadata, m); err != nil { + slog.Error("failed to unmarshal metadata", slog.String("error", err.Error()), slog.String("metadata JSON", string(metadata))) return nil, err } } @@ -189,7 +194,7 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err m := &common.Metadata{} if metadataJSON != nil { if err := protojson.Unmarshal(metadataJSON, m); err != nil { - slog.Error("could not unmarshal metadata", slog.String("error", err.Error())) + slog.Error("failed to unmarshal metadata", slog.String("error", err.Error()), slog.String("metadata JSON", string(metadataJSON))) return nil, err } } @@ -197,7 +202,7 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err av := attributes.Value{} if attributeValueJSON != nil { if err := protojson.Unmarshal(attributeValueJSON, &av); err != nil { - slog.Error("could not unmarshal attribute value", slog.String("error", err.Error())) + slog.Error("failed to unmarshal attribute value", slog.String("error", err.Error()), slog.String("attribute value JSON", string(attributeValueJSON))) return nil, err } } @@ -205,7 +210,7 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err a := []*authorization.Action{} if actionsJSON != nil { if a, err = unmarshalActionsProto(actionsJSON); err != nil { - slog.Error("could not unmarshal actions", slog.String("error", err.Error())) + slog.Error("could not unmarshal actions", slog.String("error", err.Error()), slog.String("actions JSON", string(actionsJSON))) return nil, err } } @@ -213,7 +218,7 @@ func subjectMappingHydrateItem(row pgx.Row) (*subjectmapping.SubjectMapping, err scs := subjectmapping.SubjectConditionSet{} if scsJSON != nil { if err := protojson.Unmarshal(scsJSON, &scs); err != nil { - slog.Error("could not unmarshal subject condition set", slog.String("error", err.Error())) + slog.Error("could not unmarshal subject condition set", slog.String("error", err.Error()), slog.String("subject condition set JSON", string(scsJSON))) return nil, err } } @@ -243,6 +248,7 @@ func createSubjectConditionSetSql(subjectSets []*subjectmapping.SubjectSet, meta t := Tables.SubjectConditionSet conditionJSON, err := marshalSubjectSetsProto(subjectSets) if err != nil { + slog.Error("could not marshal subject sets", slog.String("error", err.Error())) return "", nil, err } @@ -257,27 +263,30 @@ func createSubjectConditionSetSql(subjectSets []*subjectmapping.SubjectSet, meta } // Creates a new subject condition set and returns the id of the created -func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjectmapping.SubjectConditionSetCreate) (string, error) { - // TODO: remove roundtrip [https://github.com/opentdf/platform/pull/314] - metadataJSON, _, err := db.MarshalCreateMetadata(s.Metadata) +func (c PolicyDbClient) CreateSubjectConditionSet(ctx context.Context, s *subjectmapping.SubjectConditionSetCreate) (*subjectmapping.SubjectConditionSet, error) { + metadataJSON, m, err := db.MarshalCreateMetadata(s.Metadata) if err != nil { - return "", err + return nil, err } sql, args, err := createSubjectConditionSetSql(s.SubjectSets, metadataJSON) if err != nil { - return "", err + return nil, err } var id string r, err := c.QueryRow(ctx, sql, args, err) if err != nil { - return "", err + return nil, err } if err = r.Scan(&id); err != nil { - return "", db.WrapIfKnownInvalidQueryErr(err) + return nil, db.WrapIfKnownInvalidQueryErr(err) } - return id, nil + return &subjectmapping.SubjectConditionSet{ + Id: id, + SubjectSets: s.SubjectSets, + Metadata: m, + }, nil } func getSubjectConditionSetSql(id string) (string, []interface{}, error) { @@ -341,42 +350,51 @@ func updateSubjectConditionSetSql(id string, metadata []byte, condition []byte) } // Mutates provided fields and returns id of the updated subject condition set -func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, s *subjectmapping.UpdateSubjectConditionSetRequest) (string, error) { +func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, r *subjectmapping.UpdateSubjectConditionSetRequest) (*subjectmapping.SubjectConditionSet, error) { var ( subjectSets []*subjectmapping.SubjectSet condition []byte ) - // TODO: remove roundtrip and handle metadata mutation with selector [https://github.com/opentdf/platform/pull/314] - prev, err := c.GetSubjectConditionSet(ctx, s.Id) - if err != nil { - return "", err - } - - metadataJSON, _, err := db.MarshalUpdateMetadata(prev.Metadata, s.UpdateMetadata) + // if extend we need to merge the metadata + metadataJSON, _, err := db.MarshalUpdateMetadata(r.Metadata, r.MetadataUpdateBehavior, func() (*common.Metadata, error) { + scs, err := c.GetSubjectConditionSet(ctx, r.Id) + if err != nil { + return nil, err + } + return scs.Metadata, nil + }) if err != nil { - return "", err + return nil, err } - if s.UpdateSubjectSets != nil { - subjectSets = s.UpdateSubjectSets + if r.SubjectSets != nil { + subjectSets = r.SubjectSets condition, err = marshalSubjectSetsProto(subjectSets) if err != nil { - return "", err + slog.Error("failed to marshal subject sets", slog.String("error", err.Error())) + return nil, err } } sql, args, err := updateSubjectConditionSetSql( - s.Id, + r.Id, metadataJSON, condition, ) + if db.IsQueryBuilderSetClauseError(err) { + return &subjectmapping.SubjectConditionSet{ + Id: r.Id, + }, nil + } - if err := c.Exec(ctx, sql, args, err); err != nil { - return "", err + if err := c.Exec(ctx, sql, args); err != nil { + return nil, err } - return s.Id, nil + return &subjectmapping.SubjectConditionSet{ + Id: r.Id, + }, nil } func deleteSubjectConditionSetSql(id string) (string, []interface{}, error) { @@ -389,17 +407,19 @@ func deleteSubjectConditionSetSql(id string) (string, []interface{}, error) { } // Deletes specified subject condition set and returns the id of the deleted -func (c PolicyDbClient) DeleteSubjectConditionSet(ctx context.Context, id string) (string, error) { +func (c PolicyDbClient) DeleteSubjectConditionSet(ctx context.Context, id string) (*subjectmapping.SubjectConditionSet, error) { sql, args, err := deleteSubjectConditionSetSql(id) if err != nil { - return "", err + return nil, err } - if _, err := c.QueryCount(ctx, sql, args); err != nil { - return "", db.WrapIfKnownInvalidQueryErr(err) + if err := c.Exec(ctx, sql, args); err != nil { + return nil, err } - return id, nil + return &subjectmapping.SubjectConditionSet{ + Id: id, + }, nil } func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata []byte, subject_condition_set_id string) (string, []interface{}, error) { @@ -428,36 +448,38 @@ func createSubjectMappingSql(attribute_value_id string, actions []byte, metadata // Creates a new subject mapping and returns the id of the created. If an existing subject condition set id is provided, it will be used. // If a new subject condition set is provided, it will be created. The existing subject condition set id takes precedence. -func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.CreateSubjectMappingRequest) (string, error) { +func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapping.CreateSubjectMappingRequest) (*subjectmapping.SubjectMapping, error) { var ( - scsId string - err error + scs *subjectmapping.SubjectConditionSet + err error ) // Prefer existing id over new creation per documented proto behavior. if s.ExistingSubjectConditionSetId != "" { - scsId = s.ExistingSubjectConditionSetId + scs, err = c.GetSubjectConditionSet(ctx, s.ExistingSubjectConditionSetId) + if err != nil { + return nil, err + } } else if s.NewSubjectConditionSet != nil { - // create the new subject condition sets - scsId, err = c.CreateSubjectConditionSet(ctx, s.NewSubjectConditionSet) + // create the new subject condition set + scs, err = c.CreateSubjectConditionSet(ctx, s.NewSubjectConditionSet) if err != nil { - return "", err + return nil, err } } else { - return "", errors.Join(db.ErrMissingValue, errors.New("either an existing Subject Condition Set ID or a new one is required when creating a subject mapping")) + return nil, errors.Join(db.ErrMissingValue, errors.New("either an existing Subject Condition Set ID or a new Subject Condition Set is required when creating a subject mapping")) } - // TODO: remove roundtrip and handle metadata mutation with selector [https://github.com/opentdf/platform/pull/314] - metadataJSON, _, err := db.MarshalCreateMetadata(s.Metadata) + metadataJSON, m, err := db.MarshalCreateMetadata(s.Metadata) if err != nil { - return "", err + return nil, err } if s.Actions == nil { - return "", errors.Join(db.ErrMissingValue, errors.New("actions are required when creating a subject mapping")) + return nil, errors.Join(db.ErrMissingValue, errors.New("actions are required when creating a subject mapping")) } actionsJSON, err := marshalActionsProto(s.Actions) if err != nil { - return "", err + return nil, err } // Create the subject mapping @@ -465,17 +487,25 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp s.AttributeValueId, actionsJSON, metadataJSON, - scsId, + scs.Id, ) var id string if r, err := c.QueryRow(ctx, sql, args, err); err != nil { - return "", err + return nil, err } else if err := r.Scan(&id); err != nil { - return "", db.WrapIfKnownInvalidQueryErr(err) + return nil, db.WrapIfKnownInvalidQueryErr(err) } - return id, nil + return &subjectmapping.SubjectMapping{ + Id: id, + AttributeValue: &attributes.Value{ + Id: s.AttributeValueId, + }, + SubjectConditionSet: scs, + Actions: s.Actions, + Metadata: m, + }, nil } func getSubjectMappingSql(id string) (string, []interface{}, error) { @@ -547,49 +577,48 @@ func updateSubjectMappingSql(id string, metadataJSON []byte, subject_condition_s } // Mutates provided fields and returns id of the updated subject mapping -func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapping.UpdateSubjectMappingRequest) (string, error) { +func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapping.UpdateSubjectMappingRequest) (*subjectmapping.SubjectMapping, error) { // if extend we need to merge the metadata - metadataJson, _, err := db.MarshalUpdateMetadata(s.Metadata, common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_EXTEND, func() (*common.Metadata, error) { - a, err := c.GetSubjectMapping(ctx, id) + metadataJson, _, err := db.MarshalUpdateMetadata(r.Metadata, common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_EXTEND, func() (*common.Metadata, error) { + a, err := c.GetSubjectMapping(ctx, r.Id) if err != nil { return nil, err } return a.Metadata, nil }) if err != nil { - return "", err + return nil, err } var actionsJSON []byte - if r.UpdateActions != nil { - actionsJSON, err = marshalActionsProto(r.UpdateActions) + if r.Actions != nil { + actionsJSON, err = marshalActionsProto(r.Actions) if err != nil { - return "", err + return nil, err } - prev.Actions = r.UpdateActions } - if r.UpdateSubjectConditionSetId != "" { - new, err := c.GetSubjectConditionSet(ctx, r.UpdateSubjectConditionSetId) - if err != nil { - return "", err - } - prev.SubjectConditionSet = new - } + // TODO: integration test for this failure + // if r.SubjectConditionSetId != "" { + // new, err := c.GetSubjectConditionSet(ctx, r.SubjectConditionSetId) + // if err != nil { + // return nil, err + // } + // } sql, args, err := updateSubjectMappingSql( r.Id, metadataJson, - r.UpdateSubjectConditionSetId, + r.SubjectConditionSetId, actionsJSON, ) if db.IsQueryBuilderSetClauseError(err) { return &subjectmapping.SubjectMapping{ - Id: id, + Id: r.Id, }, nil } if err != nil { - return "", err + return nil, err } if err := c.Exec(ctx, sql, args); err != nil { @@ -597,7 +626,7 @@ func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapp } return &subjectmapping.SubjectMapping{ - Id: id, + Id: r.Id, }, nil } @@ -611,15 +640,17 @@ func deleteSubjectMappingSql(id string) (string, []interface{}, error) { } // Deletes specified subject mapping and returns the id of the deleted -func (c PolicyDbClient) DeleteSubjectMapping(ctx context.Context, id string) (string, error) { +func (c PolicyDbClient) DeleteSubjectMapping(ctx context.Context, id string) (*subjectmapping.SubjectMapping, error) { sql, args, err := deleteSubjectMappingSql(id) if err != nil { - return "", err + return nil, err } if err := c.Exec(ctx, sql, args); err != nil { return nil, err } - return id, nil + return &subjectmapping.SubjectMapping{ + Id: id, + }, nil } diff --git a/services/policy/subjectmapping/subject_mapping.proto b/services/policy/subjectmapping/subject_mapping.proto index 5f0334094e..f22c6c676f 100644 --- a/services/policy/subjectmapping/subject_mapping.proto +++ b/services/policy/subjectmapping/subject_mapping.proto @@ -165,7 +165,6 @@ message CreateSubjectMappingRequest{ common.MetadataMutable metadata = 100; } message CreateSubjectMappingResponse { - // Only ID of the updated Subject Mapping provided SubjectMapping subject_mapping = 1; } @@ -226,7 +225,6 @@ message CreateSubjectConditionSetRequest { SubjectConditionSetCreate subject_condition_set = 1; } message CreateSubjectConditionSetResponse { - // Only ID of created Subject Condition Set provided SubjectConditionSet subject_condition_set = 1; } @@ -236,14 +234,14 @@ message UpdateSubjectConditionSetRequest { // Optional // If provided, replaces entire existing structure of Subject Sets, Condition Groups, & Conditions - repeated SubjectSet update_subject_sets = 2; + repeated SubjectSet subject_sets = 2; // Common metadata common.MetadataMutable metadata = 100; common.MetadataUpdateEnum metadata_update_behavior = 101; } message UpdateSubjectConditionSetResponse { - // Only ID of created Subject Condition Set provided + // Only ID of updated Subject Condition Set provided SubjectConditionSet subject_condition_set = 1; } @@ -251,7 +249,7 @@ message DeleteSubjectConditionSetRequest { string id = 1 [(buf.validate.field).required = true]; } message DeleteSubjectConditionSetResponse { - // Only ID of created Subject Condition Set provided + // Only ID of deleted Subject Condition Set provided SubjectConditionSet subject_condition_set = 1; } From 592ab92a5180395f43a60edbdccffb9d38e2bd45 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 11:48:43 -0400 Subject: [PATCH 34/39] update tests and fix potential nil pointer exception where the metadata update behavior is to extend but no metadata labels were actually previously available --- integration/attribute_values_test.go | 10 +- integration/subject_mappings_test.go | 257 +++++++++++++++-------- internal/db/marshalHelpers.go | 2 +- services/policy/attributes/attributes.go | 2 +- services/policy/db/attribute_values.go | 12 +- services/policy/db/attributes.go | 4 +- services/policy/db/subject_mappings.go | 13 +- 7 files changed, 197 insertions(+), 103 deletions(-) diff --git a/integration/attribute_values_test.go b/integration/attribute_values_test.go index c3a6d4b9e9..c6eef71d08 100644 --- a/integration/attribute_values_test.go +++ b/integration/attribute_values_test.go @@ -209,17 +209,20 @@ func (s *AttributeValuesSuite) Test_UpdateAttributeValue() { assert.NotNil(s.T(), created) // update with no changes - updatedWithoutChange, err := s.db.PolicyClient.UpdateAttributeValue(s.ctx, created.Id, &attributes.UpdateAttributeValueRequest{}) + updatedWithoutChange, err := s.db.PolicyClient.UpdateAttributeValue(s.ctx, &attributes.UpdateAttributeValueRequest{ + Id: created.Id, + }) assert.Nil(s.T(), err) assert.NotNil(s.T(), updatedWithoutChange) assert.Equal(s.T(), created.Id, updatedWithoutChange.Id) // update with changes - updatedWithChange, err := s.db.PolicyClient.UpdateAttributeValue(s.ctx, created.Id, &attributes.UpdateAttributeValueRequest{ + updatedWithChange, err := s.db.PolicyClient.UpdateAttributeValue(s.ctx, &attributes.UpdateAttributeValueRequest{ Metadata: &common.MetadataMutable{ Labels: updateLabels, }, MetadataUpdateBehavior: common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_EXTEND, + Id: created.Id, }) assert.Nil(s.T(), err) assert.NotNil(s.T(), updatedWithChange) @@ -234,7 +237,7 @@ func (s *AttributeValuesSuite) Test_UpdateAttributeValue() { } func (s *AttributeValuesSuite) Test_UpdateAttributeValue_WithInvalidId_Fails() { - updated, err := s.db.PolicyClient.UpdateAttributeValue(s.ctx, nonExistentAttributeValueUuid, &attributes.UpdateAttributeValueRequest{ + updated, err := s.db.PolicyClient.UpdateAttributeValue(s.ctx, &attributes.UpdateAttributeValueRequest{ // some data is required to ensure the request reaches the db Metadata: &common.MetadataMutable{ Labels: map[string]string{ @@ -242,6 +245,7 @@ func (s *AttributeValuesSuite) Test_UpdateAttributeValue_WithInvalidId_Fails() { }, }, MetadataUpdateBehavior: common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_EXTEND, + Id: nonExistentAttributeValueUuid, }) assert.NotNil(s.T(), err) assert.Nil(s.T(), updated) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index 24789ef232..a998825191 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -86,12 +86,12 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_ExistingSubjectCondition Actions: []*authorization.Action{aDecrypt, aTransmit}, } - smId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), smId) + assert.NotNil(s.T(), created) // verify the subject mapping was created - sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, smId) + sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, created.Id) assert.Nil(s.T(), err) assert.Equal(s.T(), new.AttributeValueId, sm.AttributeValue.Id) assert.Equal(s.T(), new.ExistingSubjectConditionSetId, sm.SubjectConditionSet.Id) @@ -128,12 +128,12 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NewSubjectConditionSet() NewSubjectConditionSet: scs, } - smId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), smId) + assert.NotNil(s.T(), created) // verify the new subject condition set created was returned properly - sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, smId) + sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, created.Id) assert.Nil(s.T(), err) assert.NotNil(s.T(), sm.SubjectConditionSet) assert.Equal(s.T(), len(scs.SubjectSets), len(sm.SubjectConditionSet.SubjectSets)) @@ -158,9 +158,9 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NoActions_Fails() { ExistingSubjectConditionSetId: fixtureScs.Id, } - createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.NotNil(s.T(), err) - assert.Zero(s.T(), createdId) + assert.Nil(s.T(), created) assert.ErrorIs(s.T(), err, db.ErrMissingValue) } @@ -173,9 +173,9 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NonExistentAttributeValu AttributeValueId: nonExistentAttributeValueUuid, } - createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.NotNil(s.T(), err) - assert.Zero(s.T(), createdId) + assert.Nil(s.T(), created) assert.ErrorIs(s.T(), err, db.ErrForeignKeyViolation) } @@ -188,10 +188,10 @@ func (s *SubjectMappingsSuite) TestCreateSubjectMapping_NonExistentSubjectCondit ExistingSubjectConditionSetId: nonExistentSubjectSetId, } - createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.NotNil(s.T(), err) - assert.Zero(s.T(), createdId) - assert.ErrorIs(s.T(), err, db.ErrForeignKeyViolation) + assert.Nil(s.T(), created) + assert.ErrorIs(s.T(), err, db.ErrNotFound) } func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_Actions() { @@ -207,23 +207,24 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_Actions() { ExistingSubjectConditionSetId: fixtureScs.Id, } - createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotNil(s.T(), created) // update the subject mapping newActions := []*authorization.Action{aTransmit} update := &subjectmapping.UpdateSubjectMappingRequest{ - Id: createdId, - UpdateActions: newActions, + Id: created.Id, + Actions: newActions, } - updatedId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + updated, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, updatedId) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), created.Id, updated.Id) // verify the actions were updated but nothing else - got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, created.Id) assert.Nil(s.T(), err) assert.NotNil(s.T(), got) assert.Equal(s.T(), len(newActions), len(got.Actions)) @@ -244,23 +245,24 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_SubjectConditionSetId() ExistingSubjectConditionSetId: fixtureScs.Id, } - createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotNil(s.T(), created) // update the subject mapping newScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") update := &subjectmapping.UpdateSubjectMappingRequest{ - Id: createdId, - UpdateSubjectConditionSetId: newScs.Id, + Id: created.Id, + SubjectConditionSetId: newScs.Id, } - updatedId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + updated, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, updatedId) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), created.Id, updated.Id) // verify the subject condition set was updated but nothing else - got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, created.Id) assert.Nil(s.T(), err) assert.NotNil(s.T(), got) assert.Equal(s.T(), new.AttributeValueId, got.AttributeValue.Id) @@ -281,9 +283,9 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_UpdateAllAllowedFields() ExistingSubjectConditionSetId: fixtureScs.Id, } - createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotNil(s.T(), created) // update the subject mapping newScs := s.f.GetSubjectConditionSetKey("subject_condition_set2") @@ -292,21 +294,23 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_UpdateAllAllowedFields() Labels: map[string]string{"key": "value"}, } update := &subjectmapping.UpdateSubjectMappingRequest{ - Id: createdId, - UpdateActions: newActions, - UpdateSubjectConditionSetId: newScs.Id, - UpdateMetadata: metadata, + Id: created.Id, + SubjectConditionSetId: newScs.Id, + Actions: newActions, + Metadata: metadata, + MetadataUpdateBehavior: common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_EXTEND, } - updatedId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + updated, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, updatedId) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), created.Id, updated.Id) // verify the subject mapping was updated - got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, created.Id) assert.Nil(s.T(), err) assert.NotNil(s.T(), got) - assert.Equal(s.T(), createdId, got.Id) + assert.Equal(s.T(), created.Id, got.Id) assert.Equal(s.T(), new.AttributeValueId, got.AttributeValue.Id) assert.Equal(s.T(), newScs.Id, got.SubjectConditionSet.Id) assert.Equal(s.T(), len(newActions), len(got.Actions)) @@ -317,24 +321,28 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_UpdateAllAllowedFields() func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_NonExistentId_Fails() { update := &subjectmapping.UpdateSubjectMappingRequest{ Id: nonExistentSubjectMappingId, + Metadata: &common.MetadataMutable{ + Labels: map[string]string{"key": "value"}, + }, + MetadataUpdateBehavior: common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_REPLACE, } - smId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + sm, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.NotNil(s.T(), err) - assert.Zero(s.T(), smId) + assert.Nil(s.T(), sm) assert.ErrorIs(s.T(), err, db.ErrNotFound) } func (s *SubjectMappingsSuite) TestUpdateSubjectMapping_NonExistentSubjectConditionSetId_Fails() { update := &subjectmapping.UpdateSubjectMappingRequest{ - Id: s.f.GetSubjectMappingKey("subject_mapping_subject_attribute3").Id, - UpdateSubjectConditionSetId: nonExistentSubjectSetId, + Id: s.f.GetSubjectMappingKey("subject_mapping_subject_attribute3").Id, + SubjectConditionSetId: nonExistentSubjectSetId, } - smId, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) + sm, err := s.db.PolicyClient.UpdateSubjectMapping(s.ctx, update) assert.NotNil(s.T(), err) - assert.Zero(s.T(), smId) - assert.ErrorIs(s.T(), err, db.ErrNotFound) + assert.Nil(s.T(), sm) + assert.ErrorIs(s.T(), err, db.ErrForeignKeyViolation) } func (s *SubjectMappingsSuite) TestGetSubjectMapping() { @@ -418,24 +426,24 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping() { ExistingSubjectConditionSetId: fixtureScs.Id, } - createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotNil(s.T(), created) - deletedId, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, createdId) + deleted, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, created.Id) assert.Nil(s.T(), err) - assert.NotNil(s.T(), createdId, deletedId) + assert.NotNil(s.T(), deleted) - got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, created.Id) assert.NotNil(s.T(), err) assert.Nil(s.T(), got) assert.ErrorIs(s.T(), err, db.ErrNotFound) } func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_WithNonExistentId_Fails() { - deletedId, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, nonExistentSubjectMappingId) + deleted, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, nonExistentSubjectMappingId) assert.NotNil(s.T(), err) - assert.Zero(s.T(), deletedId) + assert.Nil(s.T(), deleted) assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -468,15 +476,17 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectMapping_DoesNotDeleteSubjectCond NewSubjectConditionSet: newScs, } - createdId, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectMapping(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotNil(s.T(), created) - sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, createdId) + sm, err := s.db.PolicyClient.GetSubjectMapping(s.ctx, created.Id) assert.Nil(s.T(), err) - deletedId, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, sm.Id) + assert.NotNil(s.T(), sm) + deleted, err := s.db.PolicyClient.DeleteSubjectMapping(s.ctx, sm.Id) assert.Nil(s.T(), err) - assert.NotZero(s.T(), deletedId) + assert.NotNil(s.T(), deleted) + assert.NotZero(s.T(), deleted.Id) scs, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, sm.SubjectConditionSet.Id) assert.Nil(s.T(), err) @@ -574,24 +584,25 @@ func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet() { SubjectSets: []*subjectmapping.SubjectSet{}, } - createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotNil(s.T(), created) - deletedId, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, createdId) + deleted, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, created.Id) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, deletedId) + assert.NotNil(s.T(), deleted) + assert.Equal(s.T(), created.Id, deleted.Id) - got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, created.Id) assert.NotNil(s.T(), err) assert.Nil(s.T(), got) assert.ErrorIs(s.T(), err, db.ErrNotFound) } func (s *SubjectMappingsSuite) TestDeleteSubjectConditionSet_WithNonExistentId_Fails() { - deletedId, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, nonExistentSubjectSetId) + deleted, err := s.db.PolicyClient.DeleteSubjectConditionSet(s.ctx, nonExistentSubjectSetId) assert.NotNil(s.T(), err) - assert.Zero(s.T(), deletedId) + assert.Nil(s.T(), deleted) assert.ErrorIs(s.T(), err, db.ErrNotFound) } @@ -603,9 +614,9 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { }, } - createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotNil(s.T(), created) // update the subject condition set ss := []*subjectmapping.SubjectSet{ @@ -626,18 +637,21 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NewSubjectSets() { } update := &subjectmapping.UpdateSubjectConditionSetRequest{ - UpdateSubjectSets: ss, - Id: createdId, + SubjectSets: ss, + Id: created.Id, + MetadataUpdateBehavior: common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_REPLACE, } - id, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) + updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, id) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), created.Id, updated.Id) // verify the subject condition set was updated - got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, created.Id) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, got.Id) + assert.NotNil(s.T(), got) + assert.Equal(s.T(), created.Id, got.Id) assert.Equal(s.T(), len(ss), len(got.SubjectSets)) assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, got.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) } @@ -650,9 +664,9 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() }, } - createdId, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) + created, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, new) assert.Nil(s.T(), err) - assert.NotZero(s.T(), createdId) + assert.NotNil(s.T(), created) // update the subject condition set ss := []*subjectmapping.SubjectSet{ @@ -675,20 +689,22 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() Labels: map[string]string{"key_example": "value_example"}, } update := &subjectmapping.UpdateSubjectConditionSetRequest{ - UpdateSubjectSets: ss, - UpdateMetadata: metadata, - Id: createdId, + SubjectSets: ss, + Metadata: metadata, + MetadataUpdateBehavior: common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_REPLACE, + Id: created.Id, } - id, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) + updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) assert.Nil(s.T(), err) - assert.Equal(s.T(), createdId, id) + assert.NotNil(s.T(), updated) + assert.Equal(s.T(), created.Id, updated.Id) // verify the subject condition set was updated - got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, createdId) + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, created.Id) assert.Nil(s.T(), err) assert.NotNil(s.T(), got) - assert.Equal(s.T(), createdId, got.Id) + assert.Equal(s.T(), created.Id, got.Id) assert.Equal(s.T(), len(ss), len(got.SubjectSets)) assert.Equal(s.T(), ss[0].ConditionGroups[0].Conditions[0].SubjectExternalField, got.SubjectSets[0].ConditionGroups[0].Conditions[0].SubjectExternalField) assert.Equal(s.T(), metadata.Labels["key_example"], got.Metadata.Labels["key_example"]) @@ -696,15 +712,90 @@ func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_AllAllowedFields() func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_NonExistentId_Fails() { update := &subjectmapping.UpdateSubjectConditionSetRequest{ - Id: nonExistentSubjectSetId, + Id: nonExistentSubjectSetId, + SubjectSets: []*subjectmapping.SubjectSet{}, } - id, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) + updated, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, update) assert.NotNil(s.T(), err) - assert.Zero(s.T(), id) + assert.Nil(s.T(), updated) assert.ErrorIs(s.T(), err, db.ErrNotFound) } +func (s *SubjectMappingsSuite) TestUpdateSubjectConditionSet_MetadataVariations() { + fixedLabel := "fixed label" + updateLabel := "update label" + updatedLabel := "true" + newLabel := "new label" + + labels := map[string]string{ + "fixed": fixedLabel, + "update": updateLabel, + } + updateLabels := map[string]string{ + "update": updatedLabel, + "new": newLabel, + } + expectedLabels := map[string]string{ + "fixed": fixedLabel, + "update": updatedLabel, + "new": newLabel, + } + + created, err := s.db.PolicyClient.CreateSubjectConditionSet(s.ctx, &subjectmapping.SubjectConditionSetCreate{ + SubjectSets: []*subjectmapping.SubjectSet{ + {}, + }, + Metadata: &common.MetadataMutable{ + Labels: labels, + }, + }) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), created) + + // update with no changes + updatedWithoutChange, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, &subjectmapping.UpdateSubjectConditionSetRequest{ + Id: created.Id, + }) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updatedWithoutChange) + assert.Equal(s.T(), created.Id, updatedWithoutChange.Id) + + // update with changes + updatedWithChange, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, &subjectmapping.UpdateSubjectConditionSetRequest{ + Id: created.Id, + Metadata: &common.MetadataMutable{Labels: updateLabels}, + MetadataUpdateBehavior: common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_EXTEND, + }) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updatedWithChange) + assert.Equal(s.T(), created.Id, updatedWithChange.Id) + + // verify the metadata was extended + got, err := s.db.PolicyClient.GetSubjectConditionSet(s.ctx, created.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), got) + assert.Equal(s.T(), created.Id, got.Id) + assert.Equal(s.T(), expectedLabels, got.Metadata.Labels) + + // update with replace + updatedWithReplace, err := s.db.PolicyClient.UpdateSubjectConditionSet(s.ctx, &subjectmapping.UpdateSubjectConditionSetRequest{ + Id: created.Id, + Metadata: &common.MetadataMutable{Labels: labels}, + MetadataUpdateBehavior: common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_REPLACE, + }) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), updatedWithReplace) + assert.Equal(s.T(), created.Id, updatedWithReplace.Id) + + // verify the metadata was replaced + got, err = s.db.PolicyClient.GetSubjectConditionSet(s.ctx, created.Id) + assert.Nil(s.T(), err) + assert.NotNil(s.T(), got) + assert.Equal(s.T(), created.Id, got.Id) + assert.Equal(s.T(), labels, got.Metadata.Labels) +} + func TestSubjectMappingSuite(t *testing.T) { if testing.Short() { t.Skip("skipping subject_mappings integration tests") diff --git a/internal/db/marshalHelpers.go b/internal/db/marshalHelpers.go index f4a365f19b..fbbeca0fa9 100644 --- a/internal/db/marshalHelpers.go +++ b/internal/db/marshalHelpers.go @@ -44,7 +44,7 @@ func MarshalUpdateMetadata(m *common.MetadataMutable, b common.MetadataUpdateEnu if err != nil { return nil, nil, err } - if existing == nil { + if existing == nil || existing.Labels == nil { return marshalMetadata(m) } diff --git a/services/policy/attributes/attributes.go b/services/policy/attributes/attributes.go index 3a5572614a..7fb362c972 100644 --- a/services/policy/attributes/attributes.go +++ b/services/policy/attributes/attributes.go @@ -156,7 +156,7 @@ func (s *AttributesService) GetAttributeValue(ctx context.Context, req *attribut } func (s *AttributesService) UpdateAttributeValue(ctx context.Context, req *attributes.UpdateAttributeValueRequest) (*attributes.UpdateAttributeValueResponse, error) { - a, err := s.dbClient.UpdateAttributeValue(ctx, req.Id, req) + a, err := s.dbClient.UpdateAttributeValue(ctx, req) if err != nil { return nil, services.HandleError(err, services.ErrUpdateFailed, slog.String("id", req.Id), slog.String("value", req.String())) } diff --git a/services/policy/db/attribute_values.go b/services/policy/db/attribute_values.go index adfb565291..47e0e2344b 100644 --- a/services/policy/db/attribute_values.go +++ b/services/policy/db/attribute_values.go @@ -289,9 +289,9 @@ func updateAttributeValueSql( return sb.Where(sq.Eq{t.Field("id"): id}).ToSql() } -func (c PolicyDbClient) UpdateAttributeValue(ctx context.Context, id string, r *attributes.UpdateAttributeValueRequest) (*attributes.Value, error) { +func (c PolicyDbClient) UpdateAttributeValue(ctx context.Context, r *attributes.UpdateAttributeValueRequest) (*attributes.Value, error) { metadataJson, _, err := db.MarshalUpdateMetadata(r.Metadata, r.MetadataUpdateBehavior, func() (*common.Metadata, error) { - v, err := c.GetAttributeValue(ctx, id) + v, err := c.GetAttributeValue(ctx, r.Id) if err != nil { return nil, err } @@ -302,13 +302,13 @@ func (c PolicyDbClient) UpdateAttributeValue(ctx context.Context, id string, r * } sql, args, err := updateAttributeValueSql( - id, + r.Id, r.Members, metadataJson, ) if db.IsQueryBuilderSetClauseError(err) { return &attributes.Value{ - Id: id, + Id: r.Id, }, nil } if err != nil { @@ -320,10 +320,10 @@ func (c PolicyDbClient) UpdateAttributeValue(ctx context.Context, id string, r * } // Update FQN - c.upsertAttrFqn(ctx, attrFqnUpsertOptions{valueId: id}) + c.upsertAttrFqn(ctx, attrFqnUpsertOptions{valueId: r.Id}) return &attributes.Value{ - Id: id, + Id: r.Id, }, nil } diff --git a/services/policy/db/attributes.go b/services/policy/db/attributes.go index 895ab79afe..01eef52579 100644 --- a/services/policy/db/attributes.go +++ b/services/policy/db/attributes.go @@ -387,7 +387,7 @@ func createAttributeSql(namespaceId string, name string, rule string, metadata [ func (c PolicyDbClient) CreateAttribute(ctx context.Context, r *attributes.CreateAttributeRequest) (*attributes.Attribute, error) { metadataJson, metadata, err := db.MarshalCreateMetadata(r.Metadata) if err != nil { - return nil, db.WrapIfKnownInvalidQueryErr(err) + return nil, err } sql, args, err := createAttributeSql(r.NamespaceId, r.Name, attributesRuleTypeEnumTransformIn(r.Rule.String()), metadataJson) @@ -445,7 +445,7 @@ func (c PolicyDbClient) UpdateAttribute(ctx context.Context, id string, r *attri }, nil } if err != nil { - return nil, db.WrapIfKnownInvalidQueryErr(err) + return nil, err } if err := c.Exec(ctx, sql, args); err != nil { diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 92e7a98788..346c009ac1 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -351,10 +351,7 @@ func updateSubjectConditionSetSql(id string, metadata []byte, condition []byte) // Mutates provided fields and returns id of the updated subject condition set func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, r *subjectmapping.UpdateSubjectConditionSetRequest) (*subjectmapping.SubjectConditionSet, error) { - var ( - subjectSets []*subjectmapping.SubjectSet - condition []byte - ) + var condition []byte // if extend we need to merge the metadata metadataJSON, _, err := db.MarshalUpdateMetadata(r.Metadata, r.MetadataUpdateBehavior, func() (*common.Metadata, error) { @@ -369,8 +366,7 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, r *subjec } if r.SubjectSets != nil { - subjectSets = r.SubjectSets - condition, err = marshalSubjectSetsProto(subjectSets) + condition, err = marshalSubjectSetsProto(r.SubjectSets) if err != nil { slog.Error("failed to marshal subject sets", slog.String("error", err.Error())) return nil, err @@ -387,6 +383,9 @@ func (c PolicyDbClient) UpdateSubjectConditionSet(ctx context.Context, r *subjec Id: r.Id, }, nil } + if err != nil { + return nil, err + } if err := c.Exec(ctx, sql, args); err != nil { return nil, err @@ -579,7 +578,7 @@ func updateSubjectMappingSql(id string, metadataJSON []byte, subject_condition_s // Mutates provided fields and returns id of the updated subject mapping func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapping.UpdateSubjectMappingRequest) (*subjectmapping.SubjectMapping, error) { // if extend we need to merge the metadata - metadataJson, _, err := db.MarshalUpdateMetadata(r.Metadata, common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_EXTEND, func() (*common.Metadata, error) { + metadataJson, _, err := db.MarshalUpdateMetadata(r.Metadata, r.MetadataUpdateBehavior, func() (*common.Metadata, error) { a, err := c.GetSubjectMapping(ctx, r.Id) if err != nil { return nil, err From 96ca42f6e7fc0fc2d672b2509ac7bc977633a396 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 11:49:38 -0400 Subject: [PATCH 35/39] fix conflict around migration names and add the timestamp columns to the subject condition sets table --- ...> 20240305000000_add_subject_condition_sets.md} | 14 +++++++++++++- ... 20240305000000_add_subject_condition_sets.sql} | 10 +++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) rename migrations/{20240304000000_add_subject_condition_sets.md => 20240305000000_add_subject_condition_sets.md} (93%) rename migrations/{20240304000000_add_subject_condition_sets.sql => 20240305000000_add_subject_condition_sets.sql} (91%) diff --git a/migrations/20240304000000_add_subject_condition_sets.md b/migrations/20240305000000_add_subject_condition_sets.md similarity index 93% rename from migrations/20240304000000_add_subject_condition_sets.md rename to migrations/20240305000000_add_subject_condition_sets.md index 87554bf3c0..8d84941c07 100644 --- a/migrations/20240304000000_add_subject_condition_sets.md +++ b/migrations/20240305000000_add_subject_condition_sets.md @@ -66,6 +66,8 @@ erDiagram Namespace { uuid id PK varchar name UK + timestamp created_at + timestamp updated_at bool active } @@ -75,6 +77,8 @@ erDiagram varchar name enum rule jsonb metadata + timestamp created_at + timestamp updated_at compIdx comp_key UK "ns_id + name" bool active } @@ -90,6 +94,8 @@ erDiagram varchar value uuid[] members FK "Optional grouping of values" jsonb metadata + timestamp created_at + timestamp updated_at compIdx comp_key UK "ns_id + ad_id + value" bool active } @@ -104,6 +110,8 @@ erDiagram uuid attribute_value_id FK varchar[] terms jsonb metadata + timestamp created_at + timestamp updated_at } SubjectMapping { @@ -112,12 +120,16 @@ erDiagram uuid[] subject_condition_set_id FK "subject condition sets are reusable" jsonb actions jsonb metadata + timestamp created_at + timestamp updated_at } SubjectConditionSet { uuid id PK - jsonb metadata jsonb condition "marshaled proto SubjectSets -> ConditionGroups -> Conditions" + jsonb metadata + timestamp created_at + timestamp updated_at } SubjectMapping }|--|| AttributeValue: has diff --git a/migrations/20240304000000_add_subject_condition_sets.sql b/migrations/20240305000000_add_subject_condition_sets.sql similarity index 91% rename from migrations/20240304000000_add_subject_condition_sets.sql rename to migrations/20240305000000_add_subject_condition_sets.sql index e5f8590a98..b5e7ff4e77 100644 --- a/migrations/20240304000000_add_subject_condition_sets.sql +++ b/migrations/20240305000000_add_subject_condition_sets.sql @@ -3,10 +3,17 @@ CREATE TABLE IF NOT EXISTS subject_condition_set ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), + condition JSONB NOT NULL, metadata JSONB, - condition JSONB NOT NULL + created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP ); +CREATE TRIGGER subject_condition_set_updated_at + BEFORE UPDATE ON subject_condition_set + FOR EACH ROW + EXECUTE FUNCTION update_updated_at(); + ALTER TABLE IF EXISTS subject_mappings ADD COLUMN subject_condition_set_id UUID, ADD COLUMN actions JSONB; WITH subject_mappings_migration_data AS ( @@ -107,6 +114,7 @@ WHERE subject_mappings.subject_condition_set_id = subject_mappings_migration_dat ALTER TABLE IF EXISTS subject_mappings DROP COLUMN subject_condition_set_id, DROP COLUMN actions; +DROP TRIGGER subject_condition_set_updated_at; DROP TABLE subject_condition_set; CREATE TYPE subject_mappings_operator AS ENUM ('UNSPECIFIED', 'IN', 'NOT_IN'); From 327c1f4bc6daf68bbb24f06f8548c3f99cd0014e Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 12:00:24 -0400 Subject: [PATCH 36/39] remove extraneous comment --- services/policy/db/subject_mappings.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index 346c009ac1..c4b3bf5c6d 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -597,14 +597,6 @@ func (c PolicyDbClient) UpdateSubjectMapping(ctx context.Context, r *subjectmapp } } - // TODO: integration test for this failure - // if r.SubjectConditionSetId != "" { - // new, err := c.GetSubjectConditionSet(ctx, r.SubjectConditionSetId) - // if err != nil { - // return nil, err - // } - // } - sql, args, err := updateSubjectMappingSql( r.Id, metadataJson, From b70e5e3a39a8842aad1e3e3127d0ccbf0ffec843 Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 13:12:30 -0400 Subject: [PATCH 37/39] fix test and undefined values post-merge --- integration/subject_mappings_test.go | 6 +++--- services/policy/db/subject_mappings.go | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/integration/subject_mappings_test.go b/integration/subject_mappings_test.go index 736364f468..9990986833 100644 --- a/integration/subject_mappings_test.go +++ b/integration/subject_mappings_test.go @@ -787,7 +787,7 @@ func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_MissingFieldInPrope } sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) - assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) + assert.ErrorIs(s.T(), err, db.ErrMissingValue) assert.Zero(s.T(), sm) } @@ -799,7 +799,7 @@ func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_MissingValueInPrope } sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) - assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) + assert.ErrorIs(s.T(), err, db.ErrMissingValue) assert.Zero(s.T(), sm) } @@ -807,7 +807,7 @@ func (s *SubjectMappingsSuite) TestGetMatchedSubjectMappings_NoPropertiesProvide props := []*subjectmapping.SubjectProperty{} sm, err := s.db.PolicyClient.GetMatchedSubjectMappings(s.ctx, props) - assert.ErrorIs(s.T(), err, db.ErrMissingRequiredValue) + assert.ErrorIs(s.T(), err, db.ErrMissingValue) assert.Zero(s.T(), sm) } diff --git a/services/policy/db/subject_mappings.go b/services/policy/db/subject_mappings.go index dc194a0276..da61f13ab0 100644 --- a/services/policy/db/subject_mappings.go +++ b/services/policy/db/subject_mappings.go @@ -475,7 +475,6 @@ func (c PolicyDbClient) CreateSubjectMapping(ctx context.Context, s *subjectmapp if err != nil { return nil, err } - scsId = scs.Id } else { return nil, errors.Join(db.ErrMissingValue, errors.New("either an existing Subject Condition Set ID or a new Subject Condition Set is required when creating a subject mapping")) } @@ -675,14 +674,14 @@ func (c PolicyDbClient) DeleteSubjectMapping(ctx context.Context, id string) (*s func selectMatchedSubjectMappingsSql(subjectProperties []*subjectmapping.SubjectProperty) (string, []interface{}, error) { var err error if len(subjectProperties) == 0 { - err = errors.Join(db.ErrMissingRequiredValue, errors.New("one or more subject properties is required")) + err = errors.Join(db.ErrMissingValue, errors.New("one or more subject properties is required")) slog.Error("subject property missing required value", slog.Any("properties provided", subjectProperties), slog.String("error", err.Error())) return "", nil, err } where := "(" for i, sp := range subjectProperties { if sp.ExternalField == "" || sp.ExternalValue == "" { - err = errors.Join(db.ErrMissingRequiredValue, errors.New("all subject properties must include defined external field and value")) + err = errors.Join(db.ErrMissingValue, errors.New("all subject properties must include defined external field and value")) slog.Error("subject property missing required value", slog.Any("properties provided", subjectProperties), slog.String("error", err.Error())) return "", nil, err } From 13704d1520e5c8e5fac676cc7ab6649f90c60cdc Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 13:33:48 -0400 Subject: [PATCH 38/39] tiny fix --- services/policy/subjectmapping/subject_mapping.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/policy/subjectmapping/subject_mapping.go b/services/policy/subjectmapping/subject_mapping.go index 933f000e13..83df3a49b2 100644 --- a/services/policy/subjectmapping/subject_mapping.go +++ b/services/policy/subjectmapping/subject_mapping.go @@ -168,7 +168,7 @@ func (s SubjectMappingService) CreateSubjectConditionSet(ctx context.Context, return nil, services.HandleError(err, services.ErrCreationFailed, slog.String("subjectConditionSet", req.String())) } - rsp.Id = scs.Id + rsp.SubjectConditionSet.Id = scs.Id return rsp, nil } From ef50138b884fa0aaa7632b1711551655bf736cdc Mon Sep 17 00:00:00 2001 From: jakedoublev Date: Mon, 11 Mar 2024 13:44:47 -0400 Subject: [PATCH 39/39] handle key not in fixtures map edge case --- internal/fixtures/fixtures.go | 49 ++++++++++++++++++++--------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/internal/fixtures/fixtures.go b/internal/fixtures/fixtures.go index c95de56fc1..eabd523db9 100644 --- a/internal/fixtures/fixtures.go +++ b/internal/fixtures/fixtures.go @@ -151,59 +151,66 @@ func NewFixture(db DBInterface) Fixtures { } func (f *Fixtures) GetNamespaceKey(key string) FixtureDataNamespace { - if fixtureData.Namespaces.Data[key].Id == "" { + ns, ok := fixtureData.Namespaces.Data[key] + if !ok || ns.Id == "" { slog.Error("could not find namespace", slog.String("id", key)) - panic("could not find namespace") + panic("could not find namespace fixture: " + key) } - return fixtureData.Namespaces.Data[key] + return ns } func (f *Fixtures) GetAttributeKey(key string) FixtureDataAttribute { - if fixtureData.Attributes.Data[key].Id == "" { + a, ok := fixtureData.Attributes.Data[key] + if !ok || a.Id == "" { slog.Error("could not find attributes", slog.String("id", key)) - panic("could not find attributes") + panic("could not find attribute fixture: " + key) } - return fixtureData.Attributes.Data[key] + return a } func (f *Fixtures) GetAttributeValueKey(key string) FixtureDataAttributeValue { - if fixtureData.AttributeValues.Data[key].Id == "" { + av, ok := fixtureData.AttributeValues.Data[key] + if !ok || av.Id == "" { slog.Error("could not find attribute-values", slog.String("id", key)) - panic("could not find attribute-values") + panic("could not find attribute-value fixture: " + key) } - return fixtureData.AttributeValues.Data[key] + return av } func (f *Fixtures) GetSubjectMappingKey(key string) FixtureDataSubjectMapping { - if fixtureData.SubjectMappings.Data[key].Id == "" { + sm, ok := fixtureData.SubjectMappings.Data[key] + if !ok || sm.Id == "" { slog.Error("could not find subject-mappings", slog.String("id", key)) - panic("could not find subject-mappings") + panic("could not find subject-mapping fixture: " + key) } - return fixtureData.SubjectMappings.Data[key] + return sm } func (f *Fixtures) GetSubjectConditionSetKey(key string) SubjectConditionSet { - if fixtureData.SubjectConditionSet.Data[key].Id == "" { + scs, ok := fixtureData.SubjectConditionSet.Data[key] + if !ok || scs.Id == "" { slog.Error("could not find subject-condition-set", slog.String("id", key)) - panic("could not find subject-condition-set") + panic("could not find subject-condition-set fixture: " + key) } - return fixtureData.SubjectConditionSet.Data[key] + return scs } func (f *Fixtures) GetResourceMappingKey(key string) FixtureDataResourceMapping { - if fixtureData.ResourceMappings.Data[key].Id == "" { + rm, ok := fixtureData.ResourceMappings.Data[key] + if !ok || rm.Id == "" { slog.Error("could not find resource-mappings", slog.String("id", key)) - panic("could not find resource-mappings") + panic("could not find resource-mapping fixture: " + key) } - return fixtureData.ResourceMappings.Data[key] + return rm } func (f *Fixtures) GetKasRegistryKey(key string) FixtureDataKasRegistry { - if fixtureData.KasRegistries.Data[key].Id == "" { + kasr, ok := fixtureData.KasRegistries.Data[key] + if !ok || kasr.Id == "" { slog.Error("could not find kas-registry", slog.String("id", key)) - panic("could not find kas-registry") + panic("could not find kas-registry fixture: " + key) } - return fixtureData.KasRegistries.Data[key] + return kasr } func (f *Fixtures) Provision() {