diff --git a/docs/grpc/index.html b/docs/grpc/index.html
index cc84d00f71..956bc2be1d 100644
--- a/docs/grpc/index.html
+++ b/docs/grpc/index.html
@@ -821,6 +821,14 @@
+ -
+ MCreateResourceMappingGroupRequest
+
+
+ -
+ MCreateResourceMappingGroupResponse
+
+
-
MCreateResourceMappingRequest
@@ -829,6 +837,14 @@ Table of Contents
MCreateResourceMappingResponse
+ -
+ MDeleteResourceMappingGroupRequest
+
+
+ -
+ MDeleteResourceMappingGroupResponse
+
+
-
MDeleteResourceMappingRequest
@@ -837,6 +853,14 @@ Table of Contents
MDeleteResourceMappingResponse
+ -
+ MGetResourceMappingGroupRequest
+
+
+ -
+ MGetResourceMappingGroupResponse
+
+
-
MGetResourceMappingRequest
@@ -845,6 +869,26 @@ Table of Contents
MGetResourceMappingResponse
+ -
+ MListResourceMappingGroupsRequest
+
+
+ -
+ MListResourceMappingGroupsResponse
+
+
+ -
+ MListResourceMappingsByGroupFqnsRequest
+
+
+ -
+ MListResourceMappingsByGroupFqnsResponse
+
+
+ -
+ MListResourceMappingsByGroupFqnsResponse.FqnResourceMappingGroupsEntry
+
+
-
MListResourceMappingsRequest
@@ -853,6 +897,18 @@ Table of Contents
MListResourceMappingsResponse
+ -
+ MResourceMappingsByGroup
+
+
+ -
+ MUpdateResourceMappingGroupRequest
+
+
+ -
+ MUpdateResourceMappingGroupResponse
+
+
-
MUpdateResourceMappingRequest
@@ -6027,6 +6083,61 @@ policy/resourcemapping/re
+ CreateResourceMappingGroupRequest
+
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | namespace_id |
+ string |
+ |
+ Required |
+
+
+
+ | name |
+ string |
+ |
+ |
+
+
+
+
+
+
+
+
+
+ CreateResourceMappingGroupResponse
+
+
+
+
+
+
+
+
+
CreateResourceMappingRequest
### Request
grpcurl -plaintext -d @ localhost:8080 policy.resourcemapping.ResourceMappingService/CreateResourceMapping <{
"mapping": {
"name": "Classification",
"attribute_value_id": "12345678-1234-1234-1234-123456789012",
"terms": ["CONFIDENTIAL", "CONTROLLED UNCLASSIFIED", "OFFICIAL-SENSITIVE", "CUI", "C"]
}
}
EOM
### Response
{
"mapping": {
"metadata": {
"id": "12345678-1234-1234-1234-123456789012",
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z"
},
"name": "Classification",
"attribute_value_id": "12345678-1234-1234-1234-123456789012",
"terms": ["CONFIDENTIAL", "CONTROLLED UNCLASSIFIED", "OFFICIAL-SENSITIVE", "CUI", "C"]
}
}
@@ -6051,11 +6162,18 @@ CreateResourceMappi
|
+
+ | group_id |
+ string |
+ |
+ Optional |
+
+
| metadata |
common.MetadataMutable |
|
- Optional |
+ |
@@ -6089,7 +6207,7 @@ CreateResourceMapp
- DeleteResourceMappingRequest
+ DeleteResourceMappingGroupRequest
@@ -6103,6 +6221,30 @@ DeleteResourceMappi
| id |
string |
|
+ Required |
+
+
+
+
+
+
+
+
+
+ DeleteResourceMappingGroupResponse
+
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | resource_mapping_group |
+ policy.ResourceMappingGroup |
+ |
|
@@ -6113,6 +6255,30 @@ DeleteResourceMappi
+ DeleteResourceMappingRequest
+
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | id |
+ string |
+ |
+ Required |
+
+
+
+
+
+
+
+
+
DeleteResourceMappingResponse
@@ -6137,7 +6303,7 @@ DeleteResourceMapp
- GetResourceMappingRequest
+ GetResourceMappingGroupRequest
@@ -6151,6 +6317,30 @@ GetResourceMappingRequ
| id |
string |
|
+ Required |
+
+
+
+
+
+
+
+
+
+ GetResourceMappingGroupResponse
+
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | resource_mapping_group |
+ policy.ResourceMappingGroup |
+ |
|
@@ -6161,6 +6351,30 @@ GetResourceMappingRequ
+ GetResourceMappingRequest
+
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | id |
+ string |
+ |
+ Required |
+
+
+
+
+
+
+
+
+
GetResourceMappingResponse
@@ -6185,10 +6399,155 @@ GetResourceMappingRes
+ ListResourceMappingGroupsRequest
+
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | namespace_id |
+ string |
+ |
+ Optional |
+
+
+
+
+
+
+
+
+
+ ListResourceMappingGroupsResponse
+
+
+
+
+
+
+
+
+
+ ListResourceMappingsByGroupFqnsRequest
+
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | fqns |
+ string |
+ repeated |
+ Required
+Structure of the RM Group FQN is 'https://<namespace>/resm/<group name>' |
+
+
+
+
+
+
+
+
+
+ ListResourceMappingsByGroupFqnsResponse
+
+
+
+
+
+
+
+
+
+ ListResourceMappingsByGroupFqnsResponse.FqnResourceMappingGroupsEntry
+
+
+
+
+
+
+
+
+
ListResourceMappingsRequest
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | group_id |
+ string |
+ |
+ Optional |
+
+
+
+
+
+
@@ -6216,6 +6575,99 @@ ListResourceMapping
+ ResourceMappingsByGroup
+
+
+
+
+
+
+
+
+
+ UpdateResourceMappingGroupRequest
+
+
+
+
+
+ | Field | Type | Label | Description |
+
+
+
+
+ | id |
+ string |
+ |
+ Required |
+
+
+
+ | namespace_id |
+ string |
+ |
+ Optional |
+
+
+
+ | name |
+ string |
+ |
+ |
+
+
+
+
+
+
+
+
+
+ UpdateResourceMappingGroupResponse
+
+
+
+
+
+
+
+
+
UpdateResourceMappingRequest
@@ -6247,6 +6699,13 @@ UpdateResourceMappi
|
+
+ | group_id |
+ string |
+ |
+ |
+
+
| metadata |
common.MetadataMutable |
@@ -6299,13 +6758,48 @@ UpdateResourceMapp
ResourceMappingService
-
+ Resource Mapping Groups
| Method Name | Request Type | Response Type | Description |
+
+ | ListResourceMappingGroups |
+ ListResourceMappingGroupsRequest |
+ ListResourceMappingGroupsResponse |
+ |
+
+
+
+ | GetResourceMappingGroup |
+ GetResourceMappingGroupRequest |
+ GetResourceMappingGroupResponse |
+ |
+
+
+
+ | CreateResourceMappingGroup |
+ CreateResourceMappingGroupRequest |
+ CreateResourceMappingGroupResponse |
+ |
+
+
+
+ | UpdateResourceMappingGroup |
+ UpdateResourceMappingGroupRequest |
+ UpdateResourceMappingGroupResponse |
+ |
+
+
+
+ | DeleteResourceMappingGroup |
+ DeleteResourceMappingGroupRequest |
+ DeleteResourceMappingGroupResponse |
+ |
+
+
| ListResourceMappings |
ListResourceMappingsRequest |
@@ -6313,6 +6807,13 @@ ResourceMappingService
+
+ | ListResourceMappingsByGroupFqns |
+ ListResourceMappingsByGroupFqnsRequest |
+ ListResourceMappingsByGroupFqnsResponse |
+ |
+
+
| GetResourceMapping |
GetResourceMappingRequest |
@@ -6361,6 +6862,56 @@ Methods with HTTP bindings
+
+ | ListResourceMappingGroups |
+ GET |
+ /resource-mapping-groups |
+ |
+
+
+
+
+
+
+ | GetResourceMappingGroup |
+ GET |
+ /resource-mapping-groups/{id} |
+ |
+
+
+
+
+
+
+ | CreateResourceMappingGroup |
+ POST |
+ /resource-mapping-groups |
+ * |
+
+
+
+
+
+
+ | UpdateResourceMappingGroup |
+ PATCH |
+ /resource-mapping-groups/{id} |
+ * |
+
+
+
+
+
+
+ | DeleteResourceMappingGroup |
+ DELETE |
+ /resource-mapping-groups/{id} |
+ |
+
+
+
+
+
| ListResourceMappings |
GET |
@@ -6371,6 +6922,16 @@ Methods with HTTP bindings
+
+ | ListResourceMappingsByGroupFqns |
+ GET |
+ /resource-mappings/group-fqns |
+ |
+
+
+
+
+
| GetResourceMapping |
GET |
diff --git a/docs/openapi/policy/resourcemapping/resource_mapping.swagger.json b/docs/openapi/policy/resourcemapping/resource_mapping.swagger.json
index 7c5ae24d92..0de014988f 100644
--- a/docs/openapi/policy/resourcemapping/resource_mapping.swagger.json
+++ b/docs/openapi/policy/resourcemapping/resource_mapping.swagger.json
@@ -16,6 +16,173 @@
"application/json"
],
"paths": {
+ "/resource-mapping-groups": {
+ "get": {
+ "operationId": "ResourceMappingService_ListResourceMappingGroups",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/resourcemappingListResourceMappingGroupsResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "namespaceId",
+ "description": "Optional",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "ResourceMappingService"
+ ]
+ },
+ "post": {
+ "operationId": "ResourceMappingService_CreateResourceMappingGroup",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/resourcemappingCreateResourceMappingGroupResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/resourcemappingCreateResourceMappingGroupRequest"
+ }
+ }
+ ],
+ "tags": [
+ "ResourceMappingService"
+ ]
+ }
+ },
+ "/resource-mapping-groups/{id}": {
+ "get": {
+ "operationId": "ResourceMappingService_GetResourceMappingGroup",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/resourcemappingGetResourceMappingGroupResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Required",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "ResourceMappingService"
+ ]
+ },
+ "delete": {
+ "operationId": "ResourceMappingService_DeleteResourceMappingGroup",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/resourcemappingDeleteResourceMappingGroupResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Required",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ }
+ ],
+ "tags": [
+ "ResourceMappingService"
+ ]
+ },
+ "patch": {
+ "operationId": "ResourceMappingService_UpdateResourceMappingGroup",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/resourcemappingUpdateResourceMappingGroupResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "id",
+ "description": "Required",
+ "in": "path",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "name": "body",
+ "in": "body",
+ "required": true,
+ "schema": {
+ "type": "object",
+ "properties": {
+ "namespaceId": {
+ "type": "string",
+ "title": "Optional"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ ],
+ "tags": [
+ "ResourceMappingService"
+ ]
+ }
+ },
"/resource-mappings": {
"get": {
"operationId": "ResourceMappingService_ListResourceMappings",
@@ -33,6 +200,15 @@
}
}
},
+ "parameters": [
+ {
+ "name": "groupId",
+ "description": "Optional",
+ "in": "query",
+ "required": false,
+ "type": "string"
+ }
+ ],
"tags": [
"ResourceMappingService"
]
@@ -69,6 +245,41 @@
]
}
},
+ "/resource-mappings/group-fqns": {
+ "get": {
+ "operationId": "ResourceMappingService_ListResourceMappingsByGroupFqns",
+ "responses": {
+ "200": {
+ "description": "A successful response.",
+ "schema": {
+ "$ref": "#/definitions/resourcemappingListResourceMappingsByGroupFqnsResponse"
+ }
+ },
+ "default": {
+ "description": "An unexpected error response.",
+ "schema": {
+ "$ref": "#/definitions/rpcStatus"
+ }
+ }
+ },
+ "parameters": [
+ {
+ "name": "fqns",
+ "description": "Required\nStructure of the RM Group FQN is 'https://\u003cnamespace\u003e/resm/\u003cgroup name\u003e'",
+ "in": "query",
+ "required": false,
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "collectionFormat": "multi"
+ }
+ ],
+ "tags": [
+ "ResourceMappingService"
+ ]
+ }
+ },
"/resource-mappings/{id}": {
"get": {
"operationId": "ResourceMappingService_GetResourceMapping",
@@ -89,6 +300,7 @@
"parameters": [
{
"name": "id",
+ "description": "Required",
"in": "path",
"required": true,
"type": "string"
@@ -117,6 +329,7 @@
"parameters": [
{
"name": "id",
+ "description": "Required",
"in": "path",
"required": true,
"type": "string"
@@ -167,6 +380,9 @@
"type": "string"
}
},
+ "groupId": {
+ "type": "string"
+ },
"metadata": {
"$ref": "#/definitions/commonMetadataMutable",
"title": "Common Metadata"
@@ -633,6 +849,26 @@
"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 }"
},
+ "resourcemappingCreateResourceMappingGroupRequest": {
+ "type": "object",
+ "properties": {
+ "namespaceId": {
+ "type": "string",
+ "title": "Required"
+ },
+ "name": {
+ "type": "string"
+ }
+ }
+ },
+ "resourcemappingCreateResourceMappingGroupResponse": {
+ "type": "object",
+ "properties": {
+ "resourceMappingGroup": {
+ "$ref": "#/definitions/policyResourceMappingGroup"
+ }
+ }
+ },
"resourcemappingCreateResourceMappingRequest": {
"type": "object",
"properties": {
@@ -646,9 +882,12 @@
"type": "string"
}
},
- "metadata": {
- "$ref": "#/definitions/commonMetadataMutable",
+ "groupId": {
+ "type": "string",
"title": "Optional"
+ },
+ "metadata": {
+ "$ref": "#/definitions/commonMetadataMutable"
}
},
"description": "grpcurl -plaintext -d @ localhost:8080 policy.resourcemapping.ResourceMappingService/CreateResourceMapping \u003c\u003cEOM\n{\n\"mapping\": {\n\"name\": \"Classification\",\n\"attribute_value_id\": \"12345678-1234-1234-1234-123456789012\",\n\"terms\": [\"CONFIDENTIAL\", \"CONTROLLED UNCLASSIFIED\", \"OFFICIAL-SENSITIVE\", \"CUI\", \"C\"]\n}\n}\nEOM\n\n### Response\n\n{\n\"mapping\": {\n\"metadata\": {\n\"id\": \"12345678-1234-1234-1234-123456789012\",\n\"created_at\": \"2020-01-01T00:00:00Z\",\n\"updated_at\": \"2020-01-01T00:00:00Z\"\n},\n\"name\": \"Classification\",\n\"attribute_value_id\": \"12345678-1234-1234-1234-123456789012\",\n\"terms\": [\"CONFIDENTIAL\", \"CONTROLLED UNCLASSIFIED\", \"OFFICIAL-SENSITIVE\", \"CUI\", \"C\"]\n}\n}",
@@ -662,6 +901,14 @@
}
}
},
+ "resourcemappingDeleteResourceMappingGroupResponse": {
+ "type": "object",
+ "properties": {
+ "resourceMappingGroup": {
+ "$ref": "#/definitions/policyResourceMappingGroup"
+ }
+ }
+ },
"resourcemappingDeleteResourceMappingResponse": {
"type": "object",
"properties": {
@@ -670,6 +917,14 @@
}
}
},
+ "resourcemappingGetResourceMappingGroupResponse": {
+ "type": "object",
+ "properties": {
+ "resourceMappingGroup": {
+ "$ref": "#/definitions/policyResourceMappingGroup"
+ }
+ }
+ },
"resourcemappingGetResourceMappingResponse": {
"type": "object",
"properties": {
@@ -678,6 +933,29 @@
}
}
},
+ "resourcemappingListResourceMappingGroupsResponse": {
+ "type": "object",
+ "properties": {
+ "resourceMappingGroups": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/policyResourceMappingGroup"
+ }
+ }
+ }
+ },
+ "resourcemappingListResourceMappingsByGroupFqnsResponse": {
+ "type": "object",
+ "properties": {
+ "fqnResourceMappingGroups": {
+ "type": "object",
+ "additionalProperties": {
+ "$ref": "#/definitions/resourcemappingResourceMappingsByGroup"
+ }
+ }
+ }
+ },
"resourcemappingListResourceMappingsResponse": {
"type": "object",
"properties": {
@@ -690,6 +968,29 @@
}
}
},
+ "resourcemappingResourceMappingsByGroup": {
+ "type": "object",
+ "properties": {
+ "group": {
+ "$ref": "#/definitions/policyResourceMappingGroup"
+ },
+ "mappings": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "$ref": "#/definitions/policyResourceMapping"
+ }
+ }
+ }
+ },
+ "resourcemappingUpdateResourceMappingGroupResponse": {
+ "type": "object",
+ "properties": {
+ "resourceMappingGroup": {
+ "$ref": "#/definitions/policyResourceMappingGroup"
+ }
+ }
+ },
"resourcemappingUpdateResourceMappingResponse": {
"type": "object",
"properties": {
diff --git a/protocol/go/policy/resourcemapping/resource_mapping.pb.go b/protocol/go/policy/resourcemapping/resource_mapping.pb.go
index 2a68b49945..91d0d04d6f 100644
--- a/protocol/go/policy/resourcemapping/resource_mapping.pb.go
+++ b/protocol/go/policy/resourcemapping/resource_mapping.pb.go
@@ -24,29 +24,676 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
+type ListResourceMappingGroupsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Optional
+ NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"`
+}
+
+func (x *ListResourceMappingGroupsRequest) Reset() {
+ *x = ListResourceMappingGroupsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListResourceMappingGroupsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListResourceMappingGroupsRequest) ProtoMessage() {}
+
+func (x *ListResourceMappingGroupsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[0]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListResourceMappingGroupsRequest.ProtoReflect.Descriptor instead.
+func (*ListResourceMappingGroupsRequest) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ListResourceMappingGroupsRequest) GetNamespaceId() string {
+ if x != nil {
+ return x.NamespaceId
+ }
+ return ""
+}
+
+type ListResourceMappingGroupsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ResourceMappingGroups []*policy.ResourceMappingGroup `protobuf:"bytes,1,rep,name=resource_mapping_groups,json=resourceMappingGroups,proto3" json:"resource_mapping_groups,omitempty"`
+}
+
+func (x *ListResourceMappingGroupsResponse) Reset() {
+ *x = ListResourceMappingGroupsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListResourceMappingGroupsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListResourceMappingGroupsResponse) ProtoMessage() {}
+
+func (x *ListResourceMappingGroupsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[1]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListResourceMappingGroupsResponse.ProtoReflect.Descriptor instead.
+func (*ListResourceMappingGroupsResponse) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListResourceMappingGroupsResponse) GetResourceMappingGroups() []*policy.ResourceMappingGroup {
+ if x != nil {
+ return x.ResourceMappingGroups
+ }
+ return nil
+}
+
+type GetResourceMappingGroupRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Required
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *GetResourceMappingGroupRequest) Reset() {
+ *x = GetResourceMappingGroupRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetResourceMappingGroupRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetResourceMappingGroupRequest) ProtoMessage() {}
+
+func (x *GetResourceMappingGroupRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[2]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetResourceMappingGroupRequest.ProtoReflect.Descriptor instead.
+func (*GetResourceMappingGroupRequest) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *GetResourceMappingGroupRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+type GetResourceMappingGroupResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ResourceMappingGroup *policy.ResourceMappingGroup `protobuf:"bytes,1,opt,name=resource_mapping_group,json=resourceMappingGroup,proto3" json:"resource_mapping_group,omitempty"`
+}
+
+func (x *GetResourceMappingGroupResponse) Reset() {
+ *x = GetResourceMappingGroupResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetResourceMappingGroupResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetResourceMappingGroupResponse) ProtoMessage() {}
+
+func (x *GetResourceMappingGroupResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_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 GetResourceMappingGroupResponse.ProtoReflect.Descriptor instead.
+func (*GetResourceMappingGroupResponse) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *GetResourceMappingGroupResponse) GetResourceMappingGroup() *policy.ResourceMappingGroup {
+ if x != nil {
+ return x.ResourceMappingGroup
+ }
+ return nil
+}
+
+type CreateResourceMappingGroupRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Required
+ NamespaceId string `protobuf:"bytes,1,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *CreateResourceMappingGroupRequest) Reset() {
+ *x = CreateResourceMappingGroupRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateResourceMappingGroupRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateResourceMappingGroupRequest) ProtoMessage() {}
+
+func (x *CreateResourceMappingGroupRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[4]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CreateResourceMappingGroupRequest.ProtoReflect.Descriptor instead.
+func (*CreateResourceMappingGroupRequest) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CreateResourceMappingGroupRequest) GetNamespaceId() string {
+ if x != nil {
+ return x.NamespaceId
+ }
+ return ""
+}
+
+func (x *CreateResourceMappingGroupRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type CreateResourceMappingGroupResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ResourceMappingGroup *policy.ResourceMappingGroup `protobuf:"bytes,1,opt,name=resource_mapping_group,json=resourceMappingGroup,proto3" json:"resource_mapping_group,omitempty"`
+}
+
+func (x *CreateResourceMappingGroupResponse) Reset() {
+ *x = CreateResourceMappingGroupResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateResourceMappingGroupResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateResourceMappingGroupResponse) ProtoMessage() {}
+
+func (x *CreateResourceMappingGroupResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[5]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use CreateResourceMappingGroupResponse.ProtoReflect.Descriptor instead.
+func (*CreateResourceMappingGroupResponse) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *CreateResourceMappingGroupResponse) GetResourceMappingGroup() *policy.ResourceMappingGroup {
+ if x != nil {
+ return x.ResourceMappingGroup
+ }
+ return nil
+}
+
+type UpdateResourceMappingGroupRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Required
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // Optional
+ NamespaceId string `protobuf:"bytes,2,opt,name=namespace_id,json=namespaceId,proto3" json:"namespace_id,omitempty"`
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *UpdateResourceMappingGroupRequest) Reset() {
+ *x = UpdateResourceMappingGroupRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateResourceMappingGroupRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateResourceMappingGroupRequest) ProtoMessage() {}
+
+func (x *UpdateResourceMappingGroupRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[6]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use UpdateResourceMappingGroupRequest.ProtoReflect.Descriptor instead.
+func (*UpdateResourceMappingGroupRequest) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *UpdateResourceMappingGroupRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *UpdateResourceMappingGroupRequest) GetNamespaceId() string {
+ if x != nil {
+ return x.NamespaceId
+ }
+ return ""
+}
+
+func (x *UpdateResourceMappingGroupRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type UpdateResourceMappingGroupResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ResourceMappingGroup *policy.ResourceMappingGroup `protobuf:"bytes,1,opt,name=resource_mapping_group,json=resourceMappingGroup,proto3" json:"resource_mapping_group,omitempty"`
+}
+
+func (x *UpdateResourceMappingGroupResponse) Reset() {
+ *x = UpdateResourceMappingGroupResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateResourceMappingGroupResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateResourceMappingGroupResponse) ProtoMessage() {}
+
+func (x *UpdateResourceMappingGroupResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_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 UpdateResourceMappingGroupResponse.ProtoReflect.Descriptor instead.
+func (*UpdateResourceMappingGroupResponse) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *UpdateResourceMappingGroupResponse) GetResourceMappingGroup() *policy.ResourceMappingGroup {
+ if x != nil {
+ return x.ResourceMappingGroup
+ }
+ return nil
+}
+
+type DeleteResourceMappingGroupRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Required
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *DeleteResourceMappingGroupRequest) Reset() {
+ *x = DeleteResourceMappingGroupRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteResourceMappingGroupRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteResourceMappingGroupRequest) ProtoMessage() {}
+
+func (x *DeleteResourceMappingGroupRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[8]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteResourceMappingGroupRequest.ProtoReflect.Descriptor instead.
+func (*DeleteResourceMappingGroupRequest) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *DeleteResourceMappingGroupRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+type DeleteResourceMappingGroupResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ResourceMappingGroup *policy.ResourceMappingGroup `protobuf:"bytes,1,opt,name=resource_mapping_group,json=resourceMappingGroup,proto3" json:"resource_mapping_group,omitempty"`
+}
+
+func (x *DeleteResourceMappingGroupResponse) Reset() {
+ *x = DeleteResourceMappingGroupResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteResourceMappingGroupResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteResourceMappingGroupResponse) ProtoMessage() {}
+
+func (x *DeleteResourceMappingGroupResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[9]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use DeleteResourceMappingGroupResponse.ProtoReflect.Descriptor instead.
+func (*DeleteResourceMappingGroupResponse) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *DeleteResourceMappingGroupResponse) GetResourceMappingGroup() *policy.ResourceMappingGroup {
+ if x != nil {
+ return x.ResourceMappingGroup
+ }
+ return nil
+}
+
type ListResourceMappingsRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+
+ // Optional
+ GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
+}
+
+func (x *ListResourceMappingsRequest) Reset() {
+ *x = ListResourceMappingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListResourceMappingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListResourceMappingsRequest) ProtoMessage() {}
+
+func (x *ListResourceMappingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[10]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListResourceMappingsRequest.ProtoReflect.Descriptor instead.
+func (*ListResourceMappingsRequest) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *ListResourceMappingsRequest) GetGroupId() string {
+ if x != nil {
+ return x.GroupId
+ }
+ return ""
+}
+
+type ListResourceMappingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ResourceMappings []*policy.ResourceMapping `protobuf:"bytes,1,rep,name=resource_mappings,json=resourceMappings,proto3" json:"resource_mappings,omitempty"`
+}
+
+func (x *ListResourceMappingsResponse) Reset() {
+ *x = ListResourceMappingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListResourceMappingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListResourceMappingsResponse) ProtoMessage() {}
+
+func (x *ListResourceMappingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[11]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListResourceMappingsResponse.ProtoReflect.Descriptor instead.
+func (*ListResourceMappingsResponse) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *ListResourceMappingsResponse) GetResourceMappings() []*policy.ResourceMapping {
+ if x != nil {
+ return x.ResourceMappings
+ }
+ return nil
+}
+
+type ListResourceMappingsByGroupFqnsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Required
+ // Structure of the RM Group FQN is 'https:///resm/'
+ Fqns []string `protobuf:"bytes,1,rep,name=fqns,proto3" json:"fqns,omitempty"`
+}
+
+func (x *ListResourceMappingsByGroupFqnsRequest) Reset() {
+ *x = ListResourceMappingsByGroupFqnsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListResourceMappingsByGroupFqnsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListResourceMappingsByGroupFqnsRequest) ProtoMessage() {}
+
+func (x *ListResourceMappingsByGroupFqnsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[12]
+ if protoimpl.UnsafeEnabled && x != nil {
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ if ms.LoadMessageInfo() == nil {
+ ms.StoreMessageInfo(mi)
+ }
+ return ms
+ }
+ return mi.MessageOf(x)
+}
+
+// Deprecated: Use ListResourceMappingsByGroupFqnsRequest.ProtoReflect.Descriptor instead.
+func (*ListResourceMappingsByGroupFqnsRequest) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *ListResourceMappingsByGroupFqnsRequest) GetFqns() []string {
+ if x != nil {
+ return x.Fqns
+ }
+ return nil
+}
+
+type ResourceMappingsByGroup struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Group *policy.ResourceMappingGroup `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"`
+ Mappings []*policy.ResourceMapping `protobuf:"bytes,2,rep,name=mappings,proto3" json:"mappings,omitempty"`
}
-func (x *ListResourceMappingsRequest) Reset() {
- *x = ListResourceMappingsRequest{}
+func (x *ResourceMappingsByGroup) Reset() {
+ *x = ResourceMappingsByGroup{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[0]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[13]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *ListResourceMappingsRequest) String() string {
+func (x *ResourceMappingsByGroup) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ListResourceMappingsRequest) ProtoMessage() {}
+func (*ResourceMappingsByGroup) ProtoMessage() {}
-func (x *ListResourceMappingsRequest) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[0]
+func (x *ResourceMappingsByGroup) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[13]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -57,36 +704,50 @@ func (x *ListResourceMappingsRequest) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ListResourceMappingsRequest.ProtoReflect.Descriptor instead.
-func (*ListResourceMappingsRequest) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{0}
+// Deprecated: Use ResourceMappingsByGroup.ProtoReflect.Descriptor instead.
+func (*ResourceMappingsByGroup) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{13}
}
-type ListResourceMappingsResponse struct {
+func (x *ResourceMappingsByGroup) GetGroup() *policy.ResourceMappingGroup {
+ if x != nil {
+ return x.Group
+ }
+ return nil
+}
+
+func (x *ResourceMappingsByGroup) GetMappings() []*policy.ResourceMapping {
+ if x != nil {
+ return x.Mappings
+ }
+ return nil
+}
+
+type ListResourceMappingsByGroupFqnsResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
- ResourceMappings []*policy.ResourceMapping `protobuf:"bytes,1,rep,name=resource_mappings,json=resourceMappings,proto3" json:"resource_mappings,omitempty"`
+ FqnResourceMappingGroups map[string]*ResourceMappingsByGroup `protobuf:"bytes,1,rep,name=fqn_resource_mapping_groups,json=fqnResourceMappingGroups,proto3" json:"fqn_resource_mapping_groups,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
}
-func (x *ListResourceMappingsResponse) Reset() {
- *x = ListResourceMappingsResponse{}
+func (x *ListResourceMappingsByGroupFqnsResponse) Reset() {
+ *x = ListResourceMappingsByGroupFqnsResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[1]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[14]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
-func (x *ListResourceMappingsResponse) String() string {
+func (x *ListResourceMappingsByGroupFqnsResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
-func (*ListResourceMappingsResponse) ProtoMessage() {}
+func (*ListResourceMappingsByGroupFqnsResponse) ProtoMessage() {}
-func (x *ListResourceMappingsResponse) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[1]
+func (x *ListResourceMappingsByGroupFqnsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[14]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -97,14 +758,14 @@ func (x *ListResourceMappingsResponse) ProtoReflect() protoreflect.Message {
return mi.MessageOf(x)
}
-// Deprecated: Use ListResourceMappingsResponse.ProtoReflect.Descriptor instead.
-func (*ListResourceMappingsResponse) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{1}
+// Deprecated: Use ListResourceMappingsByGroupFqnsResponse.ProtoReflect.Descriptor instead.
+func (*ListResourceMappingsByGroupFqnsResponse) Descriptor() ([]byte, []int) {
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{14}
}
-func (x *ListResourceMappingsResponse) GetResourceMappings() []*policy.ResourceMapping {
+func (x *ListResourceMappingsByGroupFqnsResponse) GetFqnResourceMappingGroups() map[string]*ResourceMappingsByGroup {
if x != nil {
- return x.ResourceMappings
+ return x.FqnResourceMappingGroups
}
return nil
}
@@ -114,13 +775,14 @@ type GetResourceMappingRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+ // Required
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *GetResourceMappingRequest) Reset() {
*x = GetResourceMappingRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[2]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[15]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -133,7 +795,7 @@ func (x *GetResourceMappingRequest) String() string {
func (*GetResourceMappingRequest) ProtoMessage() {}
func (x *GetResourceMappingRequest) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[2]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[15]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -146,7 +808,7 @@ func (x *GetResourceMappingRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetResourceMappingRequest.ProtoReflect.Descriptor instead.
func (*GetResourceMappingRequest) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{2}
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{15}
}
func (x *GetResourceMappingRequest) GetId() string {
@@ -167,7 +829,7 @@ type GetResourceMappingResponse struct {
func (x *GetResourceMappingResponse) Reset() {
*x = GetResourceMappingResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[3]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[16]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -180,7 +842,7 @@ func (x *GetResourceMappingResponse) String() string {
func (*GetResourceMappingResponse) ProtoMessage() {}
func (x *GetResourceMappingResponse) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[3]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[16]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -193,7 +855,7 @@ func (x *GetResourceMappingResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use GetResourceMappingResponse.ProtoReflect.Descriptor instead.
func (*GetResourceMappingResponse) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{3}
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{16}
}
func (x *GetResourceMappingResponse) GetResourceMapping() *policy.ResourceMapping {
@@ -238,13 +900,14 @@ type CreateResourceMappingRequest struct {
AttributeValueId string `protobuf:"bytes,1,opt,name=attribute_value_id,json=attributeValueId,proto3" json:"attribute_value_id,omitempty"`
Terms []string `protobuf:"bytes,2,rep,name=terms,proto3" json:"terms,omitempty"`
// Optional
+ GroupId string `protobuf:"bytes,3,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
Metadata *common.MetadataMutable `protobuf:"bytes,100,opt,name=metadata,proto3" json:"metadata,omitempty"`
}
func (x *CreateResourceMappingRequest) Reset() {
*x = CreateResourceMappingRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[4]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[17]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -257,7 +920,7 @@ func (x *CreateResourceMappingRequest) String() string {
func (*CreateResourceMappingRequest) ProtoMessage() {}
func (x *CreateResourceMappingRequest) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[4]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[17]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -270,7 +933,7 @@ func (x *CreateResourceMappingRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateResourceMappingRequest.ProtoReflect.Descriptor instead.
func (*CreateResourceMappingRequest) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{4}
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{17}
}
func (x *CreateResourceMappingRequest) GetAttributeValueId() string {
@@ -287,6 +950,13 @@ func (x *CreateResourceMappingRequest) GetTerms() []string {
return nil
}
+func (x *CreateResourceMappingRequest) GetGroupId() string {
+ if x != nil {
+ return x.GroupId
+ }
+ return ""
+}
+
func (x *CreateResourceMappingRequest) GetMetadata() *common.MetadataMutable {
if x != nil {
return x.Metadata
@@ -305,7 +975,7 @@ type CreateResourceMappingResponse struct {
func (x *CreateResourceMappingResponse) Reset() {
*x = CreateResourceMappingResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[5]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[18]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -318,7 +988,7 @@ func (x *CreateResourceMappingResponse) String() string {
func (*CreateResourceMappingResponse) ProtoMessage() {}
func (x *CreateResourceMappingResponse) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[5]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[18]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -331,7 +1001,7 @@ func (x *CreateResourceMappingResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use CreateResourceMappingResponse.ProtoReflect.Descriptor instead.
func (*CreateResourceMappingResponse) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{5}
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{18}
}
func (x *CreateResourceMappingResponse) GetResourceMapping() *policy.ResourceMapping {
@@ -351,6 +1021,7 @@ type UpdateResourceMappingRequest struct {
// Optional
AttributeValueId string `protobuf:"bytes,4,opt,name=attribute_value_id,json=attributeValueId,proto3" json:"attribute_value_id,omitempty"`
Terms []string `protobuf:"bytes,5,rep,name=terms,proto3" json:"terms,omitempty"`
+ GroupId string `protobuf:"bytes,6,opt,name=group_id,json=groupId,proto3" json:"group_id,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"`
@@ -359,7 +1030,7 @@ type UpdateResourceMappingRequest struct {
func (x *UpdateResourceMappingRequest) Reset() {
*x = UpdateResourceMappingRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[6]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[19]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -372,7 +1043,7 @@ func (x *UpdateResourceMappingRequest) String() string {
func (*UpdateResourceMappingRequest) ProtoMessage() {}
func (x *UpdateResourceMappingRequest) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[6]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[19]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -385,7 +1056,7 @@ func (x *UpdateResourceMappingRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateResourceMappingRequest.ProtoReflect.Descriptor instead.
func (*UpdateResourceMappingRequest) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{6}
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{19}
}
func (x *UpdateResourceMappingRequest) GetId() string {
@@ -409,6 +1080,13 @@ func (x *UpdateResourceMappingRequest) GetTerms() []string {
return nil
}
+func (x *UpdateResourceMappingRequest) GetGroupId() string {
+ if x != nil {
+ return x.GroupId
+ }
+ return ""
+}
+
func (x *UpdateResourceMappingRequest) GetMetadata() *common.MetadataMutable {
if x != nil {
return x.Metadata
@@ -434,7 +1112,7 @@ type UpdateResourceMappingResponse struct {
func (x *UpdateResourceMappingResponse) Reset() {
*x = UpdateResourceMappingResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[7]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[20]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -447,7 +1125,7 @@ func (x *UpdateResourceMappingResponse) String() string {
func (*UpdateResourceMappingResponse) ProtoMessage() {}
func (x *UpdateResourceMappingResponse) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[7]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[20]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -460,7 +1138,7 @@ func (x *UpdateResourceMappingResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use UpdateResourceMappingResponse.ProtoReflect.Descriptor instead.
func (*UpdateResourceMappingResponse) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{7}
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{20}
}
func (x *UpdateResourceMappingResponse) GetResourceMapping() *policy.ResourceMapping {
@@ -475,13 +1153,14 @@ type DeleteResourceMappingRequest struct {
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
+ // Required
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
}
func (x *DeleteResourceMappingRequest) Reset() {
*x = DeleteResourceMappingRequest{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[8]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[21]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -494,7 +1173,7 @@ func (x *DeleteResourceMappingRequest) String() string {
func (*DeleteResourceMappingRequest) ProtoMessage() {}
func (x *DeleteResourceMappingRequest) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[8]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[21]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -507,7 +1186,7 @@ func (x *DeleteResourceMappingRequest) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteResourceMappingRequest.ProtoReflect.Descriptor instead.
func (*DeleteResourceMappingRequest) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{8}
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{21}
}
func (x *DeleteResourceMappingRequest) GetId() string {
@@ -528,7 +1207,7 @@ type DeleteResourceMappingResponse struct {
func (x *DeleteResourceMappingResponse) Reset() {
*x = DeleteResourceMappingResponse{}
if protoimpl.UnsafeEnabled {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[9]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[22]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -541,7 +1220,7 @@ func (x *DeleteResourceMappingResponse) String() string {
func (*DeleteResourceMappingResponse) ProtoMessage() {}
func (x *DeleteResourceMappingResponse) ProtoReflect() protoreflect.Message {
- mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[9]
+ mi := &file_policy_resourcemapping_resource_mapping_proto_msgTypes[22]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -554,7 +1233,7 @@ func (x *DeleteResourceMappingResponse) ProtoReflect() protoreflect.Message {
// Deprecated: Use DeleteResourceMappingResponse.ProtoReflect.Descriptor instead.
func (*DeleteResourceMappingResponse) Descriptor() ([]byte, []int) {
- return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{9}
+ return file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP(), []int{22}
}
func (x *DeleteResourceMappingResponse) GetResourceMapping() *policy.ResourceMapping {
@@ -577,50 +1256,169 @@ var file_policy_resourcemapping_resource_mapping_proto_rawDesc = []byte{
0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2f,
- 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1d, 0x0a,
- 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70,
- 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x64, 0x0a, 0x1c,
- 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
- 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x11,
+ 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x45, 0x0a,
+ 0x20, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70,
+ 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
+ 0x63, 0x65, 0x49, 0x64, 0x22, 0x79, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x17, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x15, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x22,
+ 0x38, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 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, 0x75, 0x0a, 0x1f, 0x47, 0x65, 0x74,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x16,
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
- 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70,
+ 0x22, 0x6a, 0x0a, 0x21, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61,
+ 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03,
+ 0xc8, 0x01, 0x01, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x49, 0x64,
+ 0x12, 0x1a, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06,
+ 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x78, 0x0a, 0x22,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x52, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d,
+ 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70,
+ 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+ 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x72, 0x0a, 0x21, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 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, 0x21, 0x0a, 0x0c, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65,
+ 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x61, 0x6d, 0x65, 0x73,
+ 0x70, 0x61, 0x63, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x78, 0x0a, 0x22, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x52, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x70,
+ 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1c, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x14,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x22, 0x3b, 0x0a, 0x21, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f,
+ 0x75, 0x70, 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, 0x78, 0x0a, 0x22, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75,
+ 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
- 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
- 0x67, 0x73, 0x22, 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
- 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03,
- 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x22, 0x60, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73,
- 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
- 0x17, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
- 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0xa7, 0x01, 0x0a, 0x1c, 0x43, 0x72,
- 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
- 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 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, 0x1c, 0x0a, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42,
- 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 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, 0x63, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
- 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0x85, 0x02, 0x0a, 0x1c, 0x55, 0x70, 0x64,
- 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
+ 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x38, 0x0a, 0x1b, 0x4c,
+ 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x17, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x22, 0xd0, 0x02, 0x0a, 0x26,
+ 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x71, 0x6e, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0xa5, 0x02, 0x0a, 0x04, 0x66, 0x71, 0x6e, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x90, 0x02, 0xba, 0x48, 0x8c, 0x02, 0x92, 0x01, 0x88, 0x02,
+ 0x08, 0x01, 0x22, 0x83, 0x02, 0xba, 0x01, 0xff, 0x01, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f,
+ 0x66, 0x71, 0x6e, 0x12, 0x58, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x4d, 0x61,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x46, 0x51, 0x4e, 0x20,
+ 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66,
+ 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x27, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x3c,
+ 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x3e, 0x2f, 0x72, 0x65, 0x73, 0x6d, 0x2f,
+ 0x3c, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3e, 0x27, 0x1a, 0x88, 0x01,
+ 0x74, 0x68, 0x69, 0x73, 0x2e, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x73, 0x28, 0x27, 0x5e, 0x68,
+ 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30,
+ 0x2d, 0x39, 0x5d, 0x28, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5c, 0x5c,
+ 0x2d, 0x5d, 0x7b, 0x30, 0x2c, 0x36, 0x31, 0x7d, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30,
+ 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x5c, 0x5c, 0x2e, 0x29, 0x2b, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d,
+ 0x5a, 0x5d, 0x7b, 0x32, 0x2c, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6d, 0x2f, 0x5b, 0x61, 0x2d, 0x7a,
+ 0x41, 0x2d, 0x5a, 0x30, 0x2d, 0x39, 0x5d, 0x28, 0x3f, 0x3a, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d,
+ 0x5a, 0x30, 0x2d, 0x39, 0x5f, 0x2d, 0x5d, 0x2a, 0x5b, 0x61, 0x2d, 0x7a, 0x41, 0x2d, 0x5a, 0x30,
+ 0x2d, 0x39, 0x5d, 0x29, 0x3f, 0x24, 0x27, 0x29, 0x52, 0x04, 0x66, 0x71, 0x6e, 0x73, 0x22, 0x82,
+ 0x01, 0x0a, 0x17, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x32, 0x0a, 0x05, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6f, 0x6c, 0x69,
+ 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x33,
+ 0x0a, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x17, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x73, 0x22, 0xc6, 0x02, 0x0a, 0x27, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x47, 0x72,
+ 0x6f, 0x75, 0x70, 0x46, 0x71, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x9c, 0x01, 0x0a, 0x1b, 0x66, 0x71, 0x6e, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x5d, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c,
+ 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x71, 0x6e, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x71, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x45,
+ 0x6e, 0x74, 0x72, 0x79, 0x52, 0x18, 0x66, 0x71, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x1a, 0x7c,
+ 0x0a, 0x1d, 0x46, 0x71, 0x6e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70,
+ 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
+ 0x79, 0x12, 0x45, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x2f, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75,
+ 0x70, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x33, 0x0a, 0x19,
+ 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x02, 0x69, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01, 0x01, 0x52, 0x02, 0x69,
- 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x5f, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x61,
- 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x64, 0x12,
- 0x14, 0x0a, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05,
- 0x74, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x33, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x64, 0x22, 0x60, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x42, 0x0a, 0x10, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x6f, 0x6c, 0x69,
+ 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x22, 0xc2, 0x01, 0x0a, 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 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, 0x1c, 0x0a, 0x05, 0x74, 0x65,
+ 0x72, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8, 0x01,
+ 0x01, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, 0x6f, 0x75,
+ 0x70, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, 0x6f, 0x75,
+ 0x70, 0x49, 0x64, 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, 0x63, 0x0a, 0x1d, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+ 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x10, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x22, 0xa0, 0x02,
+ 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16,
+ 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x06, 0xba, 0x48, 0x03, 0xc8,
+ 0x01, 0x01, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62,
+ 0x75, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x10, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x56, 0x61, 0x6c,
+ 0x75, 0x65, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x05, 0x20,
+ 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72,
+ 0x6f, 0x75, 0x70, 0x49, 0x64, 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,
@@ -645,75 +1443,146 @@ var file_policy_resourcemapping_resource_mapping_proto_rawDesc = []byte{
0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63,
0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
0x67, 0x52, 0x0f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
- 0x6e, 0x67, 0x32, 0xd0, 0x06, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
- 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9d, 0x01,
- 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61,
- 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x33, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e,
- 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e,
- 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
- 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x70, 0x6f,
+ 0x6e, 0x67, 0x32, 0xbd, 0x0f, 0x0a, 0x16, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
+ 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb2, 0x01,
+ 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x38, 0x2e, 0x70, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70,
0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
- 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
- 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x9c, 0x01,
- 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70,
- 0x70, 0x69, 0x6e, 0x67, 0x12, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65,
- 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
- 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
- 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
- 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4,
- 0x93, 0x02, 0x19, 0x12, 0x17, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d,
- 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa3, 0x01, 0x0a,
- 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
- 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e,
+ 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c,
+ 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1a, 0x12, 0x18, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2d, 0x67, 0x72, 0x6f, 0x75,
+ 0x70, 0x73, 0x12, 0xb1, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x36,
+ 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e,
0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e,
- 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61,
- 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70,
- 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61,
- 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
- 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12,
- 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e,
- 0x67, 0x73, 0x12, 0xa8, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x2e, 0x70,
- 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61,
- 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
- 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61,
- 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
- 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02,
- 0x1c, 0x3a, 0x01, 0x2a, 0x32, 0x17, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d,
- 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa5, 0x01,
- 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
- 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
- 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
- 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
- 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e,
- 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d,
- 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70,
- 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x72,
- 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73,
- 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x42, 0xeb, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f,
+ 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xb8, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
+ 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x39, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70,
+ 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x3a, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, 0x82, 0xd3,
+ 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70,
+ 0x73, 0x12, 0xbd, 0x01, 0x0a, 0x1a, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70,
+ 0x12, 0x39, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x70, 0x6f,
+ 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70,
+ 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a,
+ 0x01, 0x2a, 0x32, 0x1d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64,
+ 0x7d, 0x12, 0xba, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70,
+ 0x12, 0x39, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47,
+ 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x70, 0x6f,
0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70,
- 0x70, 0x69, 0x6e, 0x67, 0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61,
- 0x70, 0x70, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x72, 0x65, 0x73,
- 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x50,
- 0x52, 0x58, 0xaa, 0x02, 0x16, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f,
- 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x16, 0x50, 0x6f,
- 0x6c, 0x69, 0x63, 0x79, 0x5c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70,
- 0x70, 0x69, 0x6e, 0x67, 0xe2, 0x02, 0x22, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5c, 0x52, 0x65,
- 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5c, 0x47, 0x50,
- 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x50, 0x6f, 0x6c, 0x69,
- 0x63, 0x79, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70,
- 0x69, 0x6e, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+ 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x2a,
+ 0x1d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x2d, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x9d,
+ 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
+ 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x33, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79,
+ 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
+ 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70,
+ 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x70,
+ 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61,
+ 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12, 0xc9,
+ 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d,
+ 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x71,
+ 0x6e, 0x73, 0x12, 0x3e, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73,
+ 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x71, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73,
+ 0x42, 0x79, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x46, 0x71, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f,
+ 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2d, 0x66, 0x71, 0x6e, 0x73, 0x12, 0x9c, 0x01, 0x0a, 0x12, 0x47,
+ 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+ 0x67, 0x12, 0x31, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x47, 0x65,
+ 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19,
+ 0x12, 0x17, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa3, 0x01, 0x0a, 0x15, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x6f, 0x6c, 0x69,
+ 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x3a, 0x01, 0x2a, 0x22, 0x12, 0x2f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x12,
+ 0xa8, 0x01, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6c, 0x69,
+ 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x35, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1c, 0x3a, 0x01,
+ 0x2a, 0x32, 0x17, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70,
+ 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0xa5, 0x01, 0x0a, 0x15, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70,
+ 0x70, 0x69, 0x6e, 0x67, 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x6f, 0x6c,
+ 0x69, 0x63, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70,
+ 0x69, 0x6e, 0x67, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x1f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x19, 0x2a, 0x17, 0x2f, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x2d, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x7b, 0x69,
+ 0x64, 0x7d, 0x42, 0xeb, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63,
+ 0x79, 0x2e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+ 0x67, 0x42, 0x14, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x4d, 0x61, 0x70, 0x70, 0x69,
+ 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3e, 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, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xa2, 0x02, 0x03, 0x50, 0x52, 0x58, 0xaa,
+ 0x02, 0x16, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0xca, 0x02, 0x16, 0x50, 0x6f, 0x6c, 0x69, 0x63,
+ 0x79, 0x5c, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+ 0x67, 0xe2, 0x02, 0x22, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x5c, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x17, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x3a,
+ 0x3a, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
@@ -728,46 +1597,82 @@ func file_policy_resourcemapping_resource_mapping_proto_rawDescGZIP() []byte {
return file_policy_resourcemapping_resource_mapping_proto_rawDescData
}
-var file_policy_resourcemapping_resource_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
+var file_policy_resourcemapping_resource_mapping_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
var file_policy_resourcemapping_resource_mapping_proto_goTypes = []interface{}{
- (*ListResourceMappingsRequest)(nil), // 0: policy.resourcemapping.ListResourceMappingsRequest
- (*ListResourceMappingsResponse)(nil), // 1: policy.resourcemapping.ListResourceMappingsResponse
- (*GetResourceMappingRequest)(nil), // 2: policy.resourcemapping.GetResourceMappingRequest
- (*GetResourceMappingResponse)(nil), // 3: policy.resourcemapping.GetResourceMappingResponse
- (*CreateResourceMappingRequest)(nil), // 4: policy.resourcemapping.CreateResourceMappingRequest
- (*CreateResourceMappingResponse)(nil), // 5: policy.resourcemapping.CreateResourceMappingResponse
- (*UpdateResourceMappingRequest)(nil), // 6: policy.resourcemapping.UpdateResourceMappingRequest
- (*UpdateResourceMappingResponse)(nil), // 7: policy.resourcemapping.UpdateResourceMappingResponse
- (*DeleteResourceMappingRequest)(nil), // 8: policy.resourcemapping.DeleteResourceMappingRequest
- (*DeleteResourceMappingResponse)(nil), // 9: policy.resourcemapping.DeleteResourceMappingResponse
- (*policy.ResourceMapping)(nil), // 10: policy.ResourceMapping
- (*common.MetadataMutable)(nil), // 11: common.MetadataMutable
- (common.MetadataUpdateEnum)(0), // 12: common.MetadataUpdateEnum
+ (*ListResourceMappingGroupsRequest)(nil), // 0: policy.resourcemapping.ListResourceMappingGroupsRequest
+ (*ListResourceMappingGroupsResponse)(nil), // 1: policy.resourcemapping.ListResourceMappingGroupsResponse
+ (*GetResourceMappingGroupRequest)(nil), // 2: policy.resourcemapping.GetResourceMappingGroupRequest
+ (*GetResourceMappingGroupResponse)(nil), // 3: policy.resourcemapping.GetResourceMappingGroupResponse
+ (*CreateResourceMappingGroupRequest)(nil), // 4: policy.resourcemapping.CreateResourceMappingGroupRequest
+ (*CreateResourceMappingGroupResponse)(nil), // 5: policy.resourcemapping.CreateResourceMappingGroupResponse
+ (*UpdateResourceMappingGroupRequest)(nil), // 6: policy.resourcemapping.UpdateResourceMappingGroupRequest
+ (*UpdateResourceMappingGroupResponse)(nil), // 7: policy.resourcemapping.UpdateResourceMappingGroupResponse
+ (*DeleteResourceMappingGroupRequest)(nil), // 8: policy.resourcemapping.DeleteResourceMappingGroupRequest
+ (*DeleteResourceMappingGroupResponse)(nil), // 9: policy.resourcemapping.DeleteResourceMappingGroupResponse
+ (*ListResourceMappingsRequest)(nil), // 10: policy.resourcemapping.ListResourceMappingsRequest
+ (*ListResourceMappingsResponse)(nil), // 11: policy.resourcemapping.ListResourceMappingsResponse
+ (*ListResourceMappingsByGroupFqnsRequest)(nil), // 12: policy.resourcemapping.ListResourceMappingsByGroupFqnsRequest
+ (*ResourceMappingsByGroup)(nil), // 13: policy.resourcemapping.ResourceMappingsByGroup
+ (*ListResourceMappingsByGroupFqnsResponse)(nil), // 14: policy.resourcemapping.ListResourceMappingsByGroupFqnsResponse
+ (*GetResourceMappingRequest)(nil), // 15: policy.resourcemapping.GetResourceMappingRequest
+ (*GetResourceMappingResponse)(nil), // 16: policy.resourcemapping.GetResourceMappingResponse
+ (*CreateResourceMappingRequest)(nil), // 17: policy.resourcemapping.CreateResourceMappingRequest
+ (*CreateResourceMappingResponse)(nil), // 18: policy.resourcemapping.CreateResourceMappingResponse
+ (*UpdateResourceMappingRequest)(nil), // 19: policy.resourcemapping.UpdateResourceMappingRequest
+ (*UpdateResourceMappingResponse)(nil), // 20: policy.resourcemapping.UpdateResourceMappingResponse
+ (*DeleteResourceMappingRequest)(nil), // 21: policy.resourcemapping.DeleteResourceMappingRequest
+ (*DeleteResourceMappingResponse)(nil), // 22: policy.resourcemapping.DeleteResourceMappingResponse
+ nil, // 23: policy.resourcemapping.ListResourceMappingsByGroupFqnsResponse.FqnResourceMappingGroupsEntry
+ (*policy.ResourceMappingGroup)(nil), // 24: policy.ResourceMappingGroup
+ (*policy.ResourceMapping)(nil), // 25: policy.ResourceMapping
+ (*common.MetadataMutable)(nil), // 26: common.MetadataMutable
+ (common.MetadataUpdateEnum)(0), // 27: common.MetadataUpdateEnum
}
var file_policy_resourcemapping_resource_mapping_proto_depIdxs = []int32{
- 10, // 0: policy.resourcemapping.ListResourceMappingsResponse.resource_mappings:type_name -> policy.ResourceMapping
- 10, // 1: policy.resourcemapping.GetResourceMappingResponse.resource_mapping:type_name -> policy.ResourceMapping
- 11, // 2: policy.resourcemapping.CreateResourceMappingRequest.metadata:type_name -> common.MetadataMutable
- 10, // 3: policy.resourcemapping.CreateResourceMappingResponse.resource_mapping:type_name -> policy.ResourceMapping
- 11, // 4: policy.resourcemapping.UpdateResourceMappingRequest.metadata:type_name -> common.MetadataMutable
- 12, // 5: policy.resourcemapping.UpdateResourceMappingRequest.metadata_update_behavior:type_name -> common.MetadataUpdateEnum
- 10, // 6: policy.resourcemapping.UpdateResourceMappingResponse.resource_mapping:type_name -> policy.ResourceMapping
- 10, // 7: policy.resourcemapping.DeleteResourceMappingResponse.resource_mapping:type_name -> policy.ResourceMapping
- 0, // 8: policy.resourcemapping.ResourceMappingService.ListResourceMappings:input_type -> policy.resourcemapping.ListResourceMappingsRequest
- 2, // 9: policy.resourcemapping.ResourceMappingService.GetResourceMapping:input_type -> policy.resourcemapping.GetResourceMappingRequest
- 4, // 10: policy.resourcemapping.ResourceMappingService.CreateResourceMapping:input_type -> policy.resourcemapping.CreateResourceMappingRequest
- 6, // 11: policy.resourcemapping.ResourceMappingService.UpdateResourceMapping:input_type -> policy.resourcemapping.UpdateResourceMappingRequest
- 8, // 12: policy.resourcemapping.ResourceMappingService.DeleteResourceMapping:input_type -> policy.resourcemapping.DeleteResourceMappingRequest
- 1, // 13: policy.resourcemapping.ResourceMappingService.ListResourceMappings:output_type -> policy.resourcemapping.ListResourceMappingsResponse
- 3, // 14: policy.resourcemapping.ResourceMappingService.GetResourceMapping:output_type -> policy.resourcemapping.GetResourceMappingResponse
- 5, // 15: policy.resourcemapping.ResourceMappingService.CreateResourceMapping:output_type -> policy.resourcemapping.CreateResourceMappingResponse
- 7, // 16: policy.resourcemapping.ResourceMappingService.UpdateResourceMapping:output_type -> policy.resourcemapping.UpdateResourceMappingResponse
- 9, // 17: policy.resourcemapping.ResourceMappingService.DeleteResourceMapping:output_type -> policy.resourcemapping.DeleteResourceMappingResponse
- 13, // [13:18] is the sub-list for method output_type
- 8, // [8:13] is the sub-list for method input_type
- 8, // [8:8] is the sub-list for extension type_name
- 8, // [8:8] is the sub-list for extension extendee
- 0, // [0:8] is the sub-list for field type_name
+ 24, // 0: policy.resourcemapping.ListResourceMappingGroupsResponse.resource_mapping_groups:type_name -> policy.ResourceMappingGroup
+ 24, // 1: policy.resourcemapping.GetResourceMappingGroupResponse.resource_mapping_group:type_name -> policy.ResourceMappingGroup
+ 24, // 2: policy.resourcemapping.CreateResourceMappingGroupResponse.resource_mapping_group:type_name -> policy.ResourceMappingGroup
+ 24, // 3: policy.resourcemapping.UpdateResourceMappingGroupResponse.resource_mapping_group:type_name -> policy.ResourceMappingGroup
+ 24, // 4: policy.resourcemapping.DeleteResourceMappingGroupResponse.resource_mapping_group:type_name -> policy.ResourceMappingGroup
+ 25, // 5: policy.resourcemapping.ListResourceMappingsResponse.resource_mappings:type_name -> policy.ResourceMapping
+ 24, // 6: policy.resourcemapping.ResourceMappingsByGroup.group:type_name -> policy.ResourceMappingGroup
+ 25, // 7: policy.resourcemapping.ResourceMappingsByGroup.mappings:type_name -> policy.ResourceMapping
+ 23, // 8: policy.resourcemapping.ListResourceMappingsByGroupFqnsResponse.fqn_resource_mapping_groups:type_name -> policy.resourcemapping.ListResourceMappingsByGroupFqnsResponse.FqnResourceMappingGroupsEntry
+ 25, // 9: policy.resourcemapping.GetResourceMappingResponse.resource_mapping:type_name -> policy.ResourceMapping
+ 26, // 10: policy.resourcemapping.CreateResourceMappingRequest.metadata:type_name -> common.MetadataMutable
+ 25, // 11: policy.resourcemapping.CreateResourceMappingResponse.resource_mapping:type_name -> policy.ResourceMapping
+ 26, // 12: policy.resourcemapping.UpdateResourceMappingRequest.metadata:type_name -> common.MetadataMutable
+ 27, // 13: policy.resourcemapping.UpdateResourceMappingRequest.metadata_update_behavior:type_name -> common.MetadataUpdateEnum
+ 25, // 14: policy.resourcemapping.UpdateResourceMappingResponse.resource_mapping:type_name -> policy.ResourceMapping
+ 25, // 15: policy.resourcemapping.DeleteResourceMappingResponse.resource_mapping:type_name -> policy.ResourceMapping
+ 13, // 16: policy.resourcemapping.ListResourceMappingsByGroupFqnsResponse.FqnResourceMappingGroupsEntry.value:type_name -> policy.resourcemapping.ResourceMappingsByGroup
+ 0, // 17: policy.resourcemapping.ResourceMappingService.ListResourceMappingGroups:input_type -> policy.resourcemapping.ListResourceMappingGroupsRequest
+ 2, // 18: policy.resourcemapping.ResourceMappingService.GetResourceMappingGroup:input_type -> policy.resourcemapping.GetResourceMappingGroupRequest
+ 4, // 19: policy.resourcemapping.ResourceMappingService.CreateResourceMappingGroup:input_type -> policy.resourcemapping.CreateResourceMappingGroupRequest
+ 6, // 20: policy.resourcemapping.ResourceMappingService.UpdateResourceMappingGroup:input_type -> policy.resourcemapping.UpdateResourceMappingGroupRequest
+ 8, // 21: policy.resourcemapping.ResourceMappingService.DeleteResourceMappingGroup:input_type -> policy.resourcemapping.DeleteResourceMappingGroupRequest
+ 10, // 22: policy.resourcemapping.ResourceMappingService.ListResourceMappings:input_type -> policy.resourcemapping.ListResourceMappingsRequest
+ 12, // 23: policy.resourcemapping.ResourceMappingService.ListResourceMappingsByGroupFqns:input_type -> policy.resourcemapping.ListResourceMappingsByGroupFqnsRequest
+ 15, // 24: policy.resourcemapping.ResourceMappingService.GetResourceMapping:input_type -> policy.resourcemapping.GetResourceMappingRequest
+ 17, // 25: policy.resourcemapping.ResourceMappingService.CreateResourceMapping:input_type -> policy.resourcemapping.CreateResourceMappingRequest
+ 19, // 26: policy.resourcemapping.ResourceMappingService.UpdateResourceMapping:input_type -> policy.resourcemapping.UpdateResourceMappingRequest
+ 21, // 27: policy.resourcemapping.ResourceMappingService.DeleteResourceMapping:input_type -> policy.resourcemapping.DeleteResourceMappingRequest
+ 1, // 28: policy.resourcemapping.ResourceMappingService.ListResourceMappingGroups:output_type -> policy.resourcemapping.ListResourceMappingGroupsResponse
+ 3, // 29: policy.resourcemapping.ResourceMappingService.GetResourceMappingGroup:output_type -> policy.resourcemapping.GetResourceMappingGroupResponse
+ 5, // 30: policy.resourcemapping.ResourceMappingService.CreateResourceMappingGroup:output_type -> policy.resourcemapping.CreateResourceMappingGroupResponse
+ 7, // 31: policy.resourcemapping.ResourceMappingService.UpdateResourceMappingGroup:output_type -> policy.resourcemapping.UpdateResourceMappingGroupResponse
+ 9, // 32: policy.resourcemapping.ResourceMappingService.DeleteResourceMappingGroup:output_type -> policy.resourcemapping.DeleteResourceMappingGroupResponse
+ 11, // 33: policy.resourcemapping.ResourceMappingService.ListResourceMappings:output_type -> policy.resourcemapping.ListResourceMappingsResponse
+ 14, // 34: policy.resourcemapping.ResourceMappingService.ListResourceMappingsByGroupFqns:output_type -> policy.resourcemapping.ListResourceMappingsByGroupFqnsResponse
+ 16, // 35: policy.resourcemapping.ResourceMappingService.GetResourceMapping:output_type -> policy.resourcemapping.GetResourceMappingResponse
+ 18, // 36: policy.resourcemapping.ResourceMappingService.CreateResourceMapping:output_type -> policy.resourcemapping.CreateResourceMappingResponse
+ 20, // 37: policy.resourcemapping.ResourceMappingService.UpdateResourceMapping:output_type -> policy.resourcemapping.UpdateResourceMappingResponse
+ 22, // 38: policy.resourcemapping.ResourceMappingService.DeleteResourceMapping:output_type -> policy.resourcemapping.DeleteResourceMappingResponse
+ 28, // [28:39] is the sub-list for method output_type
+ 17, // [17:28] is the sub-list for method input_type
+ 17, // [17:17] is the sub-list for extension type_name
+ 17, // [17:17] is the sub-list for extension extendee
+ 0, // [0:17] is the sub-list for field type_name
}
func init() { file_policy_resourcemapping_resource_mapping_proto_init() }
@@ -777,7 +1682,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
if !protoimpl.UnsafeEnabled {
file_policy_resourcemapping_resource_mapping_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListResourceMappingsRequest); i {
+ switch v := v.(*ListResourceMappingGroupsRequest); i {
case 0:
return &v.state
case 1:
@@ -789,7 +1694,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
}
file_policy_resourcemapping_resource_mapping_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*ListResourceMappingsResponse); i {
+ switch v := v.(*ListResourceMappingGroupsResponse); i {
case 0:
return &v.state
case 1:
@@ -801,7 +1706,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
}
file_policy_resourcemapping_resource_mapping_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetResourceMappingRequest); i {
+ switch v := v.(*GetResourceMappingGroupRequest); i {
case 0:
return &v.state
case 1:
@@ -813,7 +1718,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
}
file_policy_resourcemapping_resource_mapping_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*GetResourceMappingResponse); i {
+ switch v := v.(*GetResourceMappingGroupResponse); i {
case 0:
return &v.state
case 1:
@@ -825,7 +1730,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
}
file_policy_resourcemapping_resource_mapping_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateResourceMappingRequest); i {
+ switch v := v.(*CreateResourceMappingGroupRequest); i {
case 0:
return &v.state
case 1:
@@ -837,7 +1742,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
}
file_policy_resourcemapping_resource_mapping_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*CreateResourceMappingResponse); i {
+ switch v := v.(*CreateResourceMappingGroupResponse); i {
case 0:
return &v.state
case 1:
@@ -849,7 +1754,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
}
file_policy_resourcemapping_resource_mapping_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpdateResourceMappingRequest); i {
+ switch v := v.(*UpdateResourceMappingGroupRequest); i {
case 0:
return &v.state
case 1:
@@ -861,7 +1766,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
}
file_policy_resourcemapping_resource_mapping_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*UpdateResourceMappingResponse); i {
+ switch v := v.(*UpdateResourceMappingGroupResponse); i {
case 0:
return &v.state
case 1:
@@ -873,7 +1778,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
}
file_policy_resourcemapping_resource_mapping_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*DeleteResourceMappingRequest); i {
+ switch v := v.(*DeleteResourceMappingGroupRequest); i {
case 0:
return &v.state
case 1:
@@ -885,6 +1790,162 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
}
}
file_policy_resourcemapping_resource_mapping_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteResourceMappingGroupResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListResourceMappingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListResourceMappingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListResourceMappingsByGroupFqnsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ResourceMappingsByGroup); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListResourceMappingsByGroupFqnsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetResourceMappingRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetResourceMappingResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateResourceMappingRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateResourceMappingResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateResourceMappingRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateResourceMappingResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteResourceMappingRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_policy_resourcemapping_resource_mapping_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DeleteResourceMappingResponse); i {
case 0:
return &v.state
@@ -903,7 +1964,7 @@ func file_policy_resourcemapping_resource_mapping_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_policy_resourcemapping_resource_mapping_proto_rawDesc,
NumEnums: 0,
- NumMessages: 10,
+ NumMessages: 24,
NumExtensions: 0,
NumServices: 1,
},
diff --git a/protocol/go/policy/resourcemapping/resource_mapping.pb.gw.go b/protocol/go/policy/resourcemapping/resource_mapping.pb.gw.go
index 6d40903529..54d80107c4 100644
--- a/protocol/go/policy/resourcemapping/resource_mapping.pb.gw.go
+++ b/protocol/go/policy/resourcemapping/resource_mapping.pb.gw.go
@@ -31,10 +31,247 @@ var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
+var (
+ filter_ResourceMappingService_ListResourceMappingGroups_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
+func request_ResourceMappingService_ListResourceMappingGroups_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListResourceMappingGroupsRequest
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceMappingService_ListResourceMappingGroups_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.ListResourceMappingGroups(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ResourceMappingService_ListResourceMappingGroups_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListResourceMappingGroupsRequest
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceMappingService_ListResourceMappingGroups_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.ListResourceMappingGroups(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_ResourceMappingService_GetResourceMappingGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetResourceMappingGroupRequest
+ 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.GetResourceMappingGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ResourceMappingService_GetResourceMappingGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq GetResourceMappingGroupRequest
+ 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.GetResourceMappingGroup(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_ResourceMappingService_CreateResourceMappingGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateResourceMappingGroupRequest
+ var metadata runtime.ServerMetadata
+
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.CreateResourceMappingGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ResourceMappingService_CreateResourceMappingGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq CreateResourceMappingGroupRequest
+ var metadata runtime.ServerMetadata
+
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.CreateResourceMappingGroup(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_ResourceMappingService_UpdateResourceMappingGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateResourceMappingGroupRequest
+ var metadata runtime.ServerMetadata
+
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); 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.UpdateResourceMappingGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ResourceMappingService_UpdateResourceMappingGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq UpdateResourceMappingGroupRequest
+ var metadata runtime.ServerMetadata
+
+ if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); 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.UpdateResourceMappingGroup(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+func request_ResourceMappingService_DeleteResourceMappingGroup_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteResourceMappingGroupRequest
+ 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.DeleteResourceMappingGroup(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ResourceMappingService_DeleteResourceMappingGroup_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq DeleteResourceMappingGroupRequest
+ 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.DeleteResourceMappingGroup(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
+var (
+ filter_ResourceMappingService_ListResourceMappings_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
func request_ResourceMappingService_ListResourceMappings_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq ListResourceMappingsRequest
var metadata runtime.ServerMetadata
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceMappingService_ListResourceMappings_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
msg, err := client.ListResourceMappings(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
@@ -44,11 +281,54 @@ func local_request_ResourceMappingService_ListResourceMappings_0(ctx context.Con
var protoReq ListResourceMappingsRequest
var metadata runtime.ServerMetadata
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceMappingService_ListResourceMappings_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
msg, err := server.ListResourceMappings(ctx, &protoReq)
return msg, metadata, err
}
+var (
+ filter_ResourceMappingService_ListResourceMappingsByGroupFqns_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
+)
+
+func request_ResourceMappingService_ListResourceMappingsByGroupFqns_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListResourceMappingsByGroupFqnsRequest
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceMappingService_ListResourceMappingsByGroupFqns_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := client.ListResourceMappingsByGroupFqns(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
+ return msg, metadata, err
+
+}
+
+func local_request_ResourceMappingService_ListResourceMappingsByGroupFqns_0(ctx context.Context, marshaler runtime.Marshaler, server ResourceMappingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
+ var protoReq ListResourceMappingsByGroupFqnsRequest
+ var metadata runtime.ServerMetadata
+
+ if err := req.ParseForm(); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+ if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_ResourceMappingService_ListResourceMappingsByGroupFqns_0); err != nil {
+ return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
+ }
+
+ msg, err := server.ListResourceMappingsByGroupFqns(ctx, &protoReq)
+ return msg, metadata, err
+
+}
+
func request_ResourceMappingService_GetResourceMapping_0(ctx context.Context, marshaler runtime.Marshaler, client ResourceMappingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetResourceMappingRequest
var metadata runtime.ServerMetadata
@@ -245,6 +525,131 @@ func local_request_ResourceMappingService_DeleteResourceMapping_0(ctx context.Co
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterResourceMappingServiceHandlerFromEndpoint instead.
func RegisterResourceMappingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ResourceMappingServiceServer) error {
+ mux.Handle("GET", pattern_ResourceMappingService_ListResourceMappingGroups_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.resourcemapping.ResourceMappingService/ListResourceMappingGroups", runtime.WithHTTPPathPattern("/resource-mapping-groups"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ResourceMappingService_ListResourceMappingGroups_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_ResourceMappingService_ListResourceMappingGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_ResourceMappingService_GetResourceMappingGroup_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.resourcemapping.ResourceMappingService/GetResourceMappingGroup", runtime.WithHTTPPathPattern("/resource-mapping-groups/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ResourceMappingService_GetResourceMappingGroup_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_ResourceMappingService_GetResourceMappingGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ResourceMappingService_CreateResourceMappingGroup_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.resourcemapping.ResourceMappingService/CreateResourceMappingGroup", runtime.WithHTTPPathPattern("/resource-mapping-groups"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ResourceMappingService_CreateResourceMappingGroup_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_ResourceMappingService_CreateResourceMappingGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_ResourceMappingService_UpdateResourceMappingGroup_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.resourcemapping.ResourceMappingService/UpdateResourceMappingGroup", runtime.WithHTTPPathPattern("/resource-mapping-groups/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ResourceMappingService_UpdateResourceMappingGroup_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_ResourceMappingService_UpdateResourceMappingGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("DELETE", pattern_ResourceMappingService_DeleteResourceMappingGroup_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.resourcemapping.ResourceMappingService/DeleteResourceMappingGroup", runtime.WithHTTPPathPattern("/resource-mapping-groups/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ResourceMappingService_DeleteResourceMappingGroup_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_ResourceMappingService_DeleteResourceMappingGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("GET", pattern_ResourceMappingService_ListResourceMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -270,6 +675,31 @@ func RegisterResourceMappingServiceHandlerServer(ctx context.Context, mux *runti
})
+ mux.Handle("GET", pattern_ResourceMappingService_ListResourceMappingsByGroupFqns_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.resourcemapping.ResourceMappingService/ListResourceMappingsByGroupFqns", runtime.WithHTTPPathPattern("/resource-mappings/group-fqns"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := local_request_ResourceMappingService_ListResourceMappingsByGroupFqns_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_ResourceMappingService_ListResourceMappingsByGroupFqns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("GET", pattern_ResourceMappingService_GetResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -411,6 +841,116 @@ func RegisterResourceMappingServiceHandler(ctx context.Context, mux *runtime.Ser
// "ResourceMappingServiceClient" to call the correct interceptors.
func RegisterResourceMappingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ResourceMappingServiceClient) error {
+ mux.Handle("GET", pattern_ResourceMappingService_ListResourceMappingGroups_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.resourcemapping.ResourceMappingService/ListResourceMappingGroups", runtime.WithHTTPPathPattern("/resource-mapping-groups"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ResourceMappingService_ListResourceMappingGroups_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ResourceMappingService_ListResourceMappingGroups_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("GET", pattern_ResourceMappingService_GetResourceMappingGroup_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.resourcemapping.ResourceMappingService/GetResourceMappingGroup", runtime.WithHTTPPathPattern("/resource-mapping-groups/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ResourceMappingService_GetResourceMappingGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ResourceMappingService_GetResourceMappingGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("POST", pattern_ResourceMappingService_CreateResourceMappingGroup_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.resourcemapping.ResourceMappingService/CreateResourceMappingGroup", runtime.WithHTTPPathPattern("/resource-mapping-groups"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ResourceMappingService_CreateResourceMappingGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ResourceMappingService_CreateResourceMappingGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("PATCH", pattern_ResourceMappingService_UpdateResourceMappingGroup_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.resourcemapping.ResourceMappingService/UpdateResourceMappingGroup", runtime.WithHTTPPathPattern("/resource-mapping-groups/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ResourceMappingService_UpdateResourceMappingGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ResourceMappingService_UpdateResourceMappingGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
+ mux.Handle("DELETE", pattern_ResourceMappingService_DeleteResourceMappingGroup_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.resourcemapping.ResourceMappingService/DeleteResourceMappingGroup", runtime.WithHTTPPathPattern("/resource-mapping-groups/{id}"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ResourceMappingService_DeleteResourceMappingGroup_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ResourceMappingService_DeleteResourceMappingGroup_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("GET", pattern_ResourceMappingService_ListResourceMappings_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -433,6 +973,28 @@ func RegisterResourceMappingServiceHandlerClient(ctx context.Context, mux *runti
})
+ mux.Handle("GET", pattern_ResourceMappingService_ListResourceMappingsByGroupFqns_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.resourcemapping.ResourceMappingService/ListResourceMappingsByGroupFqns", runtime.WithHTTPPathPattern("/resource-mappings/group-fqns"))
+ if err != nil {
+ runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
+ return
+ }
+ resp, md, err := request_ResourceMappingService_ListResourceMappingsByGroupFqns_0(annotatedContext, inboundMarshaler, client, req, pathParams)
+ annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
+ if err != nil {
+ runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
+ return
+ }
+
+ forward_ResourceMappingService_ListResourceMappingsByGroupFqns_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
+
+ })
+
mux.Handle("GET", pattern_ResourceMappingService_GetResourceMapping_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
@@ -525,8 +1087,20 @@ func RegisterResourceMappingServiceHandlerClient(ctx context.Context, mux *runti
}
var (
+ pattern_ResourceMappingService_ListResourceMappingGroups_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"resource-mapping-groups"}, ""))
+
+ pattern_ResourceMappingService_GetResourceMappingGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"resource-mapping-groups", "id"}, ""))
+
+ pattern_ResourceMappingService_CreateResourceMappingGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"resource-mapping-groups"}, ""))
+
+ pattern_ResourceMappingService_UpdateResourceMappingGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"resource-mapping-groups", "id"}, ""))
+
+ pattern_ResourceMappingService_DeleteResourceMappingGroup_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"resource-mapping-groups", "id"}, ""))
+
pattern_ResourceMappingService_ListResourceMappings_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"resource-mappings"}, ""))
+ pattern_ResourceMappingService_ListResourceMappingsByGroupFqns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"resource-mappings", "group-fqns"}, ""))
+
pattern_ResourceMappingService_GetResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"resource-mappings", "id"}, ""))
pattern_ResourceMappingService_CreateResourceMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"resource-mappings"}, ""))
@@ -537,8 +1111,20 @@ var (
)
var (
+ forward_ResourceMappingService_ListResourceMappingGroups_0 = runtime.ForwardResponseMessage
+
+ forward_ResourceMappingService_GetResourceMappingGroup_0 = runtime.ForwardResponseMessage
+
+ forward_ResourceMappingService_CreateResourceMappingGroup_0 = runtime.ForwardResponseMessage
+
+ forward_ResourceMappingService_UpdateResourceMappingGroup_0 = runtime.ForwardResponseMessage
+
+ forward_ResourceMappingService_DeleteResourceMappingGroup_0 = runtime.ForwardResponseMessage
+
forward_ResourceMappingService_ListResourceMappings_0 = runtime.ForwardResponseMessage
+ forward_ResourceMappingService_ListResourceMappingsByGroupFqns_0 = runtime.ForwardResponseMessage
+
forward_ResourceMappingService_GetResourceMapping_0 = runtime.ForwardResponseMessage
forward_ResourceMappingService_CreateResourceMapping_0 = runtime.ForwardResponseMessage
diff --git a/protocol/go/policy/resourcemapping/resource_mapping_grpc.pb.go b/protocol/go/policy/resourcemapping/resource_mapping_grpc.pb.go
index 459f476976..c7916d0f30 100644
--- a/protocol/go/policy/resourcemapping/resource_mapping_grpc.pb.go
+++ b/protocol/go/policy/resourcemapping/resource_mapping_grpc.pb.go
@@ -19,18 +19,30 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
- ResourceMappingService_ListResourceMappings_FullMethodName = "/policy.resourcemapping.ResourceMappingService/ListResourceMappings"
- ResourceMappingService_GetResourceMapping_FullMethodName = "/policy.resourcemapping.ResourceMappingService/GetResourceMapping"
- ResourceMappingService_CreateResourceMapping_FullMethodName = "/policy.resourcemapping.ResourceMappingService/CreateResourceMapping"
- ResourceMappingService_UpdateResourceMapping_FullMethodName = "/policy.resourcemapping.ResourceMappingService/UpdateResourceMapping"
- ResourceMappingService_DeleteResourceMapping_FullMethodName = "/policy.resourcemapping.ResourceMappingService/DeleteResourceMapping"
+ ResourceMappingService_ListResourceMappingGroups_FullMethodName = "/policy.resourcemapping.ResourceMappingService/ListResourceMappingGroups"
+ ResourceMappingService_GetResourceMappingGroup_FullMethodName = "/policy.resourcemapping.ResourceMappingService/GetResourceMappingGroup"
+ ResourceMappingService_CreateResourceMappingGroup_FullMethodName = "/policy.resourcemapping.ResourceMappingService/CreateResourceMappingGroup"
+ ResourceMappingService_UpdateResourceMappingGroup_FullMethodName = "/policy.resourcemapping.ResourceMappingService/UpdateResourceMappingGroup"
+ ResourceMappingService_DeleteResourceMappingGroup_FullMethodName = "/policy.resourcemapping.ResourceMappingService/DeleteResourceMappingGroup"
+ ResourceMappingService_ListResourceMappings_FullMethodName = "/policy.resourcemapping.ResourceMappingService/ListResourceMappings"
+ ResourceMappingService_ListResourceMappingsByGroupFqns_FullMethodName = "/policy.resourcemapping.ResourceMappingService/ListResourceMappingsByGroupFqns"
+ ResourceMappingService_GetResourceMapping_FullMethodName = "/policy.resourcemapping.ResourceMappingService/GetResourceMapping"
+ ResourceMappingService_CreateResourceMapping_FullMethodName = "/policy.resourcemapping.ResourceMappingService/CreateResourceMapping"
+ ResourceMappingService_UpdateResourceMapping_FullMethodName = "/policy.resourcemapping.ResourceMappingService/UpdateResourceMapping"
+ ResourceMappingService_DeleteResourceMapping_FullMethodName = "/policy.resourcemapping.ResourceMappingService/DeleteResourceMapping"
)
// ResourceMappingServiceClient is the client API for ResourceMappingService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type ResourceMappingServiceClient interface {
+ ListResourceMappingGroups(ctx context.Context, in *ListResourceMappingGroupsRequest, opts ...grpc.CallOption) (*ListResourceMappingGroupsResponse, error)
+ GetResourceMappingGroup(ctx context.Context, in *GetResourceMappingGroupRequest, opts ...grpc.CallOption) (*GetResourceMappingGroupResponse, error)
+ CreateResourceMappingGroup(ctx context.Context, in *CreateResourceMappingGroupRequest, opts ...grpc.CallOption) (*CreateResourceMappingGroupResponse, error)
+ UpdateResourceMappingGroup(ctx context.Context, in *UpdateResourceMappingGroupRequest, opts ...grpc.CallOption) (*UpdateResourceMappingGroupResponse, error)
+ DeleteResourceMappingGroup(ctx context.Context, in *DeleteResourceMappingGroupRequest, opts ...grpc.CallOption) (*DeleteResourceMappingGroupResponse, error)
ListResourceMappings(ctx context.Context, in *ListResourceMappingsRequest, opts ...grpc.CallOption) (*ListResourceMappingsResponse, error)
+ ListResourceMappingsByGroupFqns(ctx context.Context, in *ListResourceMappingsByGroupFqnsRequest, opts ...grpc.CallOption) (*ListResourceMappingsByGroupFqnsResponse, error)
GetResourceMapping(ctx context.Context, in *GetResourceMappingRequest, opts ...grpc.CallOption) (*GetResourceMappingResponse, error)
CreateResourceMapping(ctx context.Context, in *CreateResourceMappingRequest, opts ...grpc.CallOption) (*CreateResourceMappingResponse, error)
UpdateResourceMapping(ctx context.Context, in *UpdateResourceMappingRequest, opts ...grpc.CallOption) (*UpdateResourceMappingResponse, error)
@@ -45,6 +57,51 @@ func NewResourceMappingServiceClient(cc grpc.ClientConnInterface) ResourceMappin
return &resourceMappingServiceClient{cc}
}
+func (c *resourceMappingServiceClient) ListResourceMappingGroups(ctx context.Context, in *ListResourceMappingGroupsRequest, opts ...grpc.CallOption) (*ListResourceMappingGroupsResponse, error) {
+ out := new(ListResourceMappingGroupsResponse)
+ err := c.cc.Invoke(ctx, ResourceMappingService_ListResourceMappingGroups_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *resourceMappingServiceClient) GetResourceMappingGroup(ctx context.Context, in *GetResourceMappingGroupRequest, opts ...grpc.CallOption) (*GetResourceMappingGroupResponse, error) {
+ out := new(GetResourceMappingGroupResponse)
+ err := c.cc.Invoke(ctx, ResourceMappingService_GetResourceMappingGroup_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *resourceMappingServiceClient) CreateResourceMappingGroup(ctx context.Context, in *CreateResourceMappingGroupRequest, opts ...grpc.CallOption) (*CreateResourceMappingGroupResponse, error) {
+ out := new(CreateResourceMappingGroupResponse)
+ err := c.cc.Invoke(ctx, ResourceMappingService_CreateResourceMappingGroup_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *resourceMappingServiceClient) UpdateResourceMappingGroup(ctx context.Context, in *UpdateResourceMappingGroupRequest, opts ...grpc.CallOption) (*UpdateResourceMappingGroupResponse, error) {
+ out := new(UpdateResourceMappingGroupResponse)
+ err := c.cc.Invoke(ctx, ResourceMappingService_UpdateResourceMappingGroup_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
+func (c *resourceMappingServiceClient) DeleteResourceMappingGroup(ctx context.Context, in *DeleteResourceMappingGroupRequest, opts ...grpc.CallOption) (*DeleteResourceMappingGroupResponse, error) {
+ out := new(DeleteResourceMappingGroupResponse)
+ err := c.cc.Invoke(ctx, ResourceMappingService_DeleteResourceMappingGroup_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *resourceMappingServiceClient) ListResourceMappings(ctx context.Context, in *ListResourceMappingsRequest, opts ...grpc.CallOption) (*ListResourceMappingsResponse, error) {
out := new(ListResourceMappingsResponse)
err := c.cc.Invoke(ctx, ResourceMappingService_ListResourceMappings_FullMethodName, in, out, opts...)
@@ -54,6 +111,15 @@ func (c *resourceMappingServiceClient) ListResourceMappings(ctx context.Context,
return out, nil
}
+func (c *resourceMappingServiceClient) ListResourceMappingsByGroupFqns(ctx context.Context, in *ListResourceMappingsByGroupFqnsRequest, opts ...grpc.CallOption) (*ListResourceMappingsByGroupFqnsResponse, error) {
+ out := new(ListResourceMappingsByGroupFqnsResponse)
+ err := c.cc.Invoke(ctx, ResourceMappingService_ListResourceMappingsByGroupFqns_FullMethodName, in, out, opts...)
+ if err != nil {
+ return nil, err
+ }
+ return out, nil
+}
+
func (c *resourceMappingServiceClient) GetResourceMapping(ctx context.Context, in *GetResourceMappingRequest, opts ...grpc.CallOption) (*GetResourceMappingResponse, error) {
out := new(GetResourceMappingResponse)
err := c.cc.Invoke(ctx, ResourceMappingService_GetResourceMapping_FullMethodName, in, out, opts...)
@@ -94,7 +160,13 @@ func (c *resourceMappingServiceClient) DeleteResourceMapping(ctx context.Context
// All implementations must embed UnimplementedResourceMappingServiceServer
// for forward compatibility
type ResourceMappingServiceServer interface {
+ ListResourceMappingGroups(context.Context, *ListResourceMappingGroupsRequest) (*ListResourceMappingGroupsResponse, error)
+ GetResourceMappingGroup(context.Context, *GetResourceMappingGroupRequest) (*GetResourceMappingGroupResponse, error)
+ CreateResourceMappingGroup(context.Context, *CreateResourceMappingGroupRequest) (*CreateResourceMappingGroupResponse, error)
+ UpdateResourceMappingGroup(context.Context, *UpdateResourceMappingGroupRequest) (*UpdateResourceMappingGroupResponse, error)
+ DeleteResourceMappingGroup(context.Context, *DeleteResourceMappingGroupRequest) (*DeleteResourceMappingGroupResponse, error)
ListResourceMappings(context.Context, *ListResourceMappingsRequest) (*ListResourceMappingsResponse, error)
+ ListResourceMappingsByGroupFqns(context.Context, *ListResourceMappingsByGroupFqnsRequest) (*ListResourceMappingsByGroupFqnsResponse, error)
GetResourceMapping(context.Context, *GetResourceMappingRequest) (*GetResourceMappingResponse, error)
CreateResourceMapping(context.Context, *CreateResourceMappingRequest) (*CreateResourceMappingResponse, error)
UpdateResourceMapping(context.Context, *UpdateResourceMappingRequest) (*UpdateResourceMappingResponse, error)
@@ -106,9 +178,27 @@ type ResourceMappingServiceServer interface {
type UnimplementedResourceMappingServiceServer struct {
}
+func (UnimplementedResourceMappingServiceServer) ListResourceMappingGroups(context.Context, *ListResourceMappingGroupsRequest) (*ListResourceMappingGroupsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListResourceMappingGroups not implemented")
+}
+func (UnimplementedResourceMappingServiceServer) GetResourceMappingGroup(context.Context, *GetResourceMappingGroupRequest) (*GetResourceMappingGroupResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method GetResourceMappingGroup not implemented")
+}
+func (UnimplementedResourceMappingServiceServer) CreateResourceMappingGroup(context.Context, *CreateResourceMappingGroupRequest) (*CreateResourceMappingGroupResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method CreateResourceMappingGroup not implemented")
+}
+func (UnimplementedResourceMappingServiceServer) UpdateResourceMappingGroup(context.Context, *UpdateResourceMappingGroupRequest) (*UpdateResourceMappingGroupResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method UpdateResourceMappingGroup not implemented")
+}
+func (UnimplementedResourceMappingServiceServer) DeleteResourceMappingGroup(context.Context, *DeleteResourceMappingGroupRequest) (*DeleteResourceMappingGroupResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method DeleteResourceMappingGroup not implemented")
+}
func (UnimplementedResourceMappingServiceServer) ListResourceMappings(context.Context, *ListResourceMappingsRequest) (*ListResourceMappingsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListResourceMappings not implemented")
}
+func (UnimplementedResourceMappingServiceServer) ListResourceMappingsByGroupFqns(context.Context, *ListResourceMappingsByGroupFqnsRequest) (*ListResourceMappingsByGroupFqnsResponse, error) {
+ return nil, status.Errorf(codes.Unimplemented, "method ListResourceMappingsByGroupFqns not implemented")
+}
func (UnimplementedResourceMappingServiceServer) GetResourceMapping(context.Context, *GetResourceMappingRequest) (*GetResourceMappingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetResourceMapping not implemented")
}
@@ -135,6 +225,96 @@ func RegisterResourceMappingServiceServer(s grpc.ServiceRegistrar, srv ResourceM
s.RegisterService(&ResourceMappingService_ServiceDesc, srv)
}
+func _ResourceMappingService_ListResourceMappingGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListResourceMappingGroupsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ResourceMappingServiceServer).ListResourceMappingGroups(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ResourceMappingService_ListResourceMappingGroups_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ResourceMappingServiceServer).ListResourceMappingGroups(ctx, req.(*ListResourceMappingGroupsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ResourceMappingService_GetResourceMappingGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(GetResourceMappingGroupRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ResourceMappingServiceServer).GetResourceMappingGroup(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ResourceMappingService_GetResourceMappingGroup_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ResourceMappingServiceServer).GetResourceMappingGroup(ctx, req.(*GetResourceMappingGroupRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ResourceMappingService_CreateResourceMappingGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(CreateResourceMappingGroupRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ResourceMappingServiceServer).CreateResourceMappingGroup(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ResourceMappingService_CreateResourceMappingGroup_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ResourceMappingServiceServer).CreateResourceMappingGroup(ctx, req.(*CreateResourceMappingGroupRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ResourceMappingService_UpdateResourceMappingGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(UpdateResourceMappingGroupRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ResourceMappingServiceServer).UpdateResourceMappingGroup(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ResourceMappingService_UpdateResourceMappingGroup_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ResourceMappingServiceServer).UpdateResourceMappingGroup(ctx, req.(*UpdateResourceMappingGroupRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
+func _ResourceMappingService_DeleteResourceMappingGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(DeleteResourceMappingGroupRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ResourceMappingServiceServer).DeleteResourceMappingGroup(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ResourceMappingService_DeleteResourceMappingGroup_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ResourceMappingServiceServer).DeleteResourceMappingGroup(ctx, req.(*DeleteResourceMappingGroupRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _ResourceMappingService_ListResourceMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListResourceMappingsRequest)
if err := dec(in); err != nil {
@@ -153,6 +333,24 @@ func _ResourceMappingService_ListResourceMappings_Handler(srv interface{}, ctx c
return interceptor(ctx, in, info, handler)
}
+func _ResourceMappingService_ListResourceMappingsByGroupFqns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+ in := new(ListResourceMappingsByGroupFqnsRequest)
+ if err := dec(in); err != nil {
+ return nil, err
+ }
+ if interceptor == nil {
+ return srv.(ResourceMappingServiceServer).ListResourceMappingsByGroupFqns(ctx, in)
+ }
+ info := &grpc.UnaryServerInfo{
+ Server: srv,
+ FullMethod: ResourceMappingService_ListResourceMappingsByGroupFqns_FullMethodName,
+ }
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+ return srv.(ResourceMappingServiceServer).ListResourceMappingsByGroupFqns(ctx, req.(*ListResourceMappingsByGroupFqnsRequest))
+ }
+ return interceptor(ctx, in, info, handler)
+}
+
func _ResourceMappingService_GetResourceMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetResourceMappingRequest)
if err := dec(in); err != nil {
@@ -232,10 +430,34 @@ var ResourceMappingService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "policy.resourcemapping.ResourceMappingService",
HandlerType: (*ResourceMappingServiceServer)(nil),
Methods: []grpc.MethodDesc{
+ {
+ MethodName: "ListResourceMappingGroups",
+ Handler: _ResourceMappingService_ListResourceMappingGroups_Handler,
+ },
+ {
+ MethodName: "GetResourceMappingGroup",
+ Handler: _ResourceMappingService_GetResourceMappingGroup_Handler,
+ },
+ {
+ MethodName: "CreateResourceMappingGroup",
+ Handler: _ResourceMappingService_CreateResourceMappingGroup_Handler,
+ },
+ {
+ MethodName: "UpdateResourceMappingGroup",
+ Handler: _ResourceMappingService_UpdateResourceMappingGroup_Handler,
+ },
+ {
+ MethodName: "DeleteResourceMappingGroup",
+ Handler: _ResourceMappingService_DeleteResourceMappingGroup_Handler,
+ },
{
MethodName: "ListResourceMappings",
Handler: _ResourceMappingService_ListResourceMappings_Handler,
},
+ {
+ MethodName: "ListResourceMappingsByGroupFqns",
+ Handler: _ResourceMappingService_ListResourceMappingsByGroupFqns_Handler,
+ },
{
MethodName: "GetResourceMapping",
Handler: _ResourceMappingService_GetResourceMapping_Handler,
diff --git a/service/integration/resource_mappings_test.go b/service/integration/resource_mappings_test.go
index 2617371e0e..47d9ca2103 100644
--- a/service/integration/resource_mappings_test.go
+++ b/service/integration/resource_mappings_test.go
@@ -14,7 +14,9 @@ import (
"github.com/stretchr/testify/suite"
)
-var nonExistentResourceMappingUUID = "45674556-8888-9999-9999-000001230000"
+var unknownNamespaceID = "64257d69-c007-4893-931a-434f1819a4f7"
+var unknownResourceMappingGroupID = "c70cad07-21b4-4cb1-9095-bce54615536a"
+var unknownResourceMappingID = "45674556-8888-9999-9999-000001230000"
type ResourceMappingsSuite struct {
suite.Suite
@@ -38,6 +40,24 @@ func (s *ResourceMappingsSuite) TearDownSuite() {
s.f.TearDown()
}
+func (s *ResourceMappingsSuite) getExampleDotComNamespace() *fixtures.FixtureDataNamespace {
+ namespace := s.f.GetNamespaceKey("example.com")
+ return &namespace
+}
+
+func (s *ResourceMappingsSuite) getScenarioDotComNamespace() *fixtures.FixtureDataNamespace {
+ namespace := s.f.GetNamespaceKey("scenario.com")
+ return &namespace
+}
+
+func (s *ResourceMappingsSuite) getResourceMappingGroupFixtures() []fixtures.FixtureDataResourceMappingGroup {
+ return []fixtures.FixtureDataResourceMappingGroup{
+ s.f.GetResourceMappingGroupKey("example.com_ns_group_1"),
+ s.f.GetResourceMappingGroupKey("example.com_ns_group_2"),
+ s.f.GetResourceMappingGroupKey("scenario.com_ns_group_1"),
+ }
+}
+
func (s *ResourceMappingsSuite) getResourceMappingFixtures() []fixtures.FixtureDataResourceMapping {
return []fixtures.FixtureDataResourceMapping{
s.f.GetResourceMappingKey("resource_mapping_to_attribute_value1"),
@@ -46,6 +66,226 @@ func (s *ResourceMappingsSuite) getResourceMappingFixtures() []fixtures.FixtureD
}
}
+/*
+ Resource Mapping Groups
+*/
+
+func (s *ResourceMappingsSuite) Test_ListResourceMappingGroups() {
+ testData := s.getResourceMappingGroupFixtures()
+ rmGroups, err := s.db.PolicyClient.ListResourceMappingGroups(s.ctx, &resourcemapping.ListResourceMappingGroupsRequest{})
+ s.Require().NoError(err)
+ s.NotNil(rmGroups)
+ for _, testRmGroup := range testData {
+ found := false
+ for _, rmGroup := range rmGroups {
+ if testRmGroup.ID == rmGroup.GetId() {
+ found = true
+ break
+ }
+ }
+ s.True(found, fmt.Sprintf("expected to find resource mapping group %s", testRmGroup.ID))
+ }
+}
+
+func (s *ResourceMappingsSuite) Test_ListResourceMappingGroupsWithNamespaceIdSucceeds() {
+ scenarioDotComRmGroup := s.f.GetResourceMappingGroupKey("scenario.com_ns_group_1")
+ rmGroups, err := s.db.PolicyClient.ListResourceMappingGroups(s.ctx, &resourcemapping.ListResourceMappingGroupsRequest{
+ NamespaceId: scenarioDotComRmGroup.NamespaceID,
+ })
+ s.Require().NoError(err)
+ s.NotNil(rmGroups)
+ s.Len(rmGroups, 1)
+ s.Equal(scenarioDotComRmGroup.ID, rmGroups[0].GetId())
+ s.Equal(scenarioDotComRmGroup.NamespaceID, rmGroups[0].GetNamespaceId())
+ s.Equal(scenarioDotComRmGroup.Name, rmGroups[0].GetName())
+}
+
+func (s *ResourceMappingsSuite) Test_GetResourceMappingGroup() {
+ testRmGroup := s.f.GetResourceMappingGroupKey("example.com_ns_group_1")
+ rmGroup, err := s.db.PolicyClient.GetResourceMappingGroup(s.ctx, testRmGroup.ID)
+ s.Require().NoError(err)
+ s.NotNil(rmGroup)
+ s.Equal(testRmGroup.ID, rmGroup.GetId())
+ s.Equal(testRmGroup.NamespaceID, rmGroup.GetNamespaceId())
+ s.Equal(testRmGroup.Name, rmGroup.GetName())
+}
+
+func (s *ResourceMappingsSuite) Test_GetResourceMappingGroupWithUnknownIdFails() {
+ rmGroup, err := s.db.PolicyClient.GetResourceMappingGroup(s.ctx, unknownResourceMappingGroupID)
+ s.Require().ErrorIs(err, db.ErrNotFound)
+ s.Nil(rmGroup)
+}
+
+func (s *ResourceMappingsSuite) Test_CreateResourceMappingGroup() {
+ req := &resourcemapping.CreateResourceMappingGroupRequest{
+ NamespaceId: s.getExampleDotComNamespace().ID,
+ Name: "example.com_ns_new_group",
+ }
+ rmGroup, err := s.db.PolicyClient.CreateResourceMappingGroup(s.ctx, req)
+ s.Require().NoError(err)
+ s.NotNil(rmGroup)
+}
+
+func (s *ResourceMappingsSuite) Test_CreateResourceMappingGroupWithUnknownNamespaceIdFails() {
+ req := &resourcemapping.CreateResourceMappingGroupRequest{
+ NamespaceId: unknownNamespaceID,
+ Name: "unknown_ns_new_group",
+ }
+ rmGroup, err := s.db.PolicyClient.CreateResourceMappingGroup(s.ctx, req)
+ s.Require().Error(err)
+ s.Nil(rmGroup)
+}
+
+func (s *ResourceMappingsSuite) Test_CreateResourceMappingGroupWithDuplicateNamespaceIdAndNameComboFails() {
+ name := "example.com_ns_dupe_group"
+ req := &resourcemapping.CreateResourceMappingGroupRequest{
+ NamespaceId: s.getExampleDotComNamespace().ID,
+ Name: name,
+ }
+ rmGroup, err := s.db.PolicyClient.CreateResourceMappingGroup(s.ctx, req)
+ s.Require().NoError(err)
+ s.NotNil(rmGroup)
+
+ rmGroup, err = s.db.PolicyClient.CreateResourceMappingGroup(s.ctx, req)
+ s.Require().Error(err)
+ s.Nil(rmGroup)
+}
+
+func (s *ResourceMappingsSuite) Test_UpdateResourceMappingGroup() {
+ req := &resourcemapping.CreateResourceMappingGroupRequest{
+ NamespaceId: s.getExampleDotComNamespace().ID,
+ Name: "example.com_ns_group_created",
+ }
+ rmGroup, err := s.db.PolicyClient.CreateResourceMappingGroup(s.ctx, req)
+ s.Require().NoError(err)
+ s.NotNil(rmGroup)
+
+ updateReq := &resourcemapping.UpdateResourceMappingGroupRequest{
+ Id: rmGroup.GetId(),
+ NamespaceId: s.getScenarioDotComNamespace().ID,
+ Name: "example.com_ns_group_updated",
+ }
+ updatedRmGroup, err := s.db.PolicyClient.UpdateResourceMappingGroup(s.ctx, rmGroup.GetId(), updateReq)
+ s.Require().NoError(err)
+ s.NotNil(updatedRmGroup)
+
+ // get after update to verify db reflects changes made
+ gotUpdatedRmGroup, err := s.db.PolicyClient.GetResourceMappingGroup(s.ctx, updatedRmGroup.GetId())
+ s.Require().NoError(err)
+ s.NotNil(gotUpdatedRmGroup)
+ s.Equal(updateReq.GetNamespaceId(), gotUpdatedRmGroup.GetNamespaceId())
+ s.Equal(updateReq.GetName(), gotUpdatedRmGroup.GetName())
+}
+
+func (s *ResourceMappingsSuite) Test_UpdateResourceMappingGroupWithUnknownIdFails() {
+ req := &resourcemapping.CreateResourceMappingGroupRequest{
+ NamespaceId: s.getExampleDotComNamespace().ID,
+ Name: "example.com_ns_group_created",
+ }
+ rmGroup, err := s.db.PolicyClient.CreateResourceMappingGroup(s.ctx, req)
+ s.Require().NoError(err)
+ s.NotNil(rmGroup)
+
+ updateReq := &resourcemapping.UpdateResourceMappingGroupRequest{
+ Id: rmGroup.GetId(),
+ NamespaceId: unknownNamespaceID,
+ Name: "example.com_ns_group_updated",
+ }
+ updatedRmGroup, err := s.db.PolicyClient.UpdateResourceMappingGroup(s.ctx, rmGroup.GetId(), updateReq)
+ s.Require().Error(err)
+ s.Nil(updatedRmGroup)
+}
+
+func (s *ResourceMappingsSuite) Test_UpdateResourceMappingGroupWithNamespaceIdOnlySucceeds() {
+ req := &resourcemapping.CreateResourceMappingGroupRequest{
+ NamespaceId: s.getExampleDotComNamespace().ID,
+ Name: "example.com_ns_group_created",
+ }
+ rmGroup, err := s.db.PolicyClient.CreateResourceMappingGroup(s.ctx, req)
+ s.Require().NoError(err)
+ s.NotNil(rmGroup)
+
+ updateReq := &resourcemapping.UpdateResourceMappingGroupRequest{
+ Id: rmGroup.GetId(),
+ NamespaceId: s.getScenarioDotComNamespace().ID,
+ }
+ updatedRmGroup, err := s.db.PolicyClient.UpdateResourceMappingGroup(s.ctx, rmGroup.GetId(), updateReq)
+ s.Require().NoError(err)
+ s.NotNil(updatedRmGroup)
+
+ // get after update to verify ONLY namespace id is updated
+ gotUpdatedRmGroup, err := s.db.PolicyClient.GetResourceMappingGroup(s.ctx, updatedRmGroup.GetId())
+ s.Require().NoError(err)
+ s.NotNil(gotUpdatedRmGroup)
+ s.Equal(updateReq.GetNamespaceId(), gotUpdatedRmGroup.GetNamespaceId())
+ s.Equal(req.GetName(), gotUpdatedRmGroup.GetName())
+}
+
+func (s *ResourceMappingsSuite) Test_UpdateResourceMappingGroupWithNameOnlySucceeds() {
+ req := &resourcemapping.CreateResourceMappingGroupRequest{
+ NamespaceId: s.getExampleDotComNamespace().ID,
+ Name: "example.com_ns_group_created",
+ }
+ rmGroup, err := s.db.PolicyClient.CreateResourceMappingGroup(s.ctx, req)
+ s.Require().NoError(err)
+ s.NotNil(rmGroup)
+
+ updateReq := &resourcemapping.UpdateResourceMappingGroupRequest{
+ Id: rmGroup.GetId(),
+ Name: "example.com_ns_group_updated",
+ }
+ updatedRmGroup, err := s.db.PolicyClient.UpdateResourceMappingGroup(s.ctx, rmGroup.GetId(), updateReq)
+ s.Require().NoError(err)
+ s.NotNil(updatedRmGroup)
+
+ // get after update to verify ONLY name is updated
+ gotUpdatedRmGroup, err := s.db.PolicyClient.GetResourceMappingGroup(s.ctx, updatedRmGroup.GetId())
+ s.Require().NoError(err)
+ s.NotNil(gotUpdatedRmGroup)
+ s.Equal(req.GetNamespaceId(), gotUpdatedRmGroup.GetNamespaceId())
+ s.Equal(updateReq.GetName(), gotUpdatedRmGroup.GetName())
+}
+
+func (s *ResourceMappingsSuite) Test_DeleteResourceMappingGroup() {
+ // create a group
+ group := &resourcemapping.CreateResourceMappingGroupRequest{
+ NamespaceId: s.getExampleDotComNamespace().ID,
+ Name: "example.com_ns_group_to_delete",
+ }
+ createdGroup, err := s.db.PolicyClient.CreateResourceMappingGroup(s.ctx, group)
+ s.Require().NoError(err)
+ s.NotNil(createdGroup)
+
+ // create a mapping with the group
+ metadata := &common.MetadataMutable{}
+ attrValue := s.f.GetAttributeValueKey("example.com/attr/attr1/value/value1")
+ mapping := &resourcemapping.CreateResourceMappingRequest{
+ AttributeValueId: attrValue.ID,
+ Metadata: metadata,
+ Terms: []string{},
+ GroupId: createdGroup.GetId(),
+ }
+ createdMapping, err := s.db.PolicyClient.CreateResourceMapping(s.ctx, mapping)
+ s.Require().NoError(err)
+ s.NotNil(createdMapping)
+
+ // delete the group
+ deletedGroup, err := s.db.PolicyClient.DeleteResourceMappingGroup(s.ctx, createdGroup.GetId())
+ s.Require().NoError(err)
+ s.NotNil(deletedGroup)
+ s.Equal(createdGroup.GetId(), deletedGroup.GetId())
+
+ // get the mapping to verify group id is cascade set to null
+ gotMapping, err := s.db.PolicyClient.GetResourceMapping(s.ctx, createdMapping.GetId())
+ s.Require().NoError(err)
+ s.NotNil(gotMapping)
+ s.Nil(gotMapping.GetGroup())
+}
+
+/*
+ Resource Mappings
+*/
+
func (s *ResourceMappingsSuite) Test_CreateResourceMapping() {
metadata := &common.MetadataMutable{
Labels: map[string]string{
@@ -62,6 +302,10 @@ func (s *ResourceMappingsSuite) Test_CreateResourceMapping() {
createdMapping, err := s.db.PolicyClient.CreateResourceMapping(s.ctx, mapping)
s.Require().NoError(err)
s.NotNil(createdMapping)
+ s.Equal(mapping.GetAttributeValueId(), createdMapping.GetAttributeValue().GetId())
+ s.Equal(mapping.GetMetadata().GetLabels()["name"], createdMapping.GetMetadata().GetLabels()["name"])
+ s.Equal(mapping.GetTerms(), createdMapping.GetTerms())
+ s.Nil(createdMapping.GetGroup())
}
func (s *ResourceMappingsSuite) Test_CreateResourceMappingWithUnknownAttributeValueFails() {
@@ -94,10 +338,43 @@ func (s *ResourceMappingsSuite) Test_CreateResourceMappingWithEmptyTermsSucceeds
s.Empty(createdMapping.GetTerms())
}
+func (s *ResourceMappingsSuite) Test_CreateResourceMappingWithGroupIdSucceeds() {
+ metadata := &common.MetadataMutable{}
+
+ attrValue := s.f.GetAttributeValueKey("example.com/attr/attr1/value/value1")
+ rmGroup := s.getResourceMappingGroupFixtures()[0]
+ mapping := &resourcemapping.CreateResourceMappingRequest{
+ AttributeValueId: attrValue.ID,
+ Metadata: metadata,
+ Terms: []string{},
+ GroupId: rmGroup.ID,
+ }
+ createdMapping, err := s.db.PolicyClient.CreateResourceMapping(s.ctx, mapping)
+ s.Require().NoError(err)
+ s.NotNil(createdMapping)
+ s.Equal(rmGroup.ID, createdMapping.GetGroup().GetId())
+}
+
+func (s *ResourceMappingsSuite) Test_CreateResourceMappingWithUnknownGroupIdFails() {
+ metadata := &common.MetadataMutable{}
+
+ attrValue := s.f.GetAttributeValueKey("example.com/attr/attr1/value/value1")
+ mapping := &resourcemapping.CreateResourceMappingRequest{
+ AttributeValueId: attrValue.ID,
+ Metadata: metadata,
+ Terms: []string{},
+ GroupId: unknownResourceMappingGroupID,
+ }
+ createdMapping, err := s.db.PolicyClient.CreateResourceMapping(s.ctx, mapping)
+ s.Require().Error(err)
+ s.Nil(createdMapping)
+}
+
func (s *ResourceMappingsSuite) Test_ListResourceMappings() {
// make sure we can get all fixtures
testData := s.getResourceMappingFixtures()
- mappings, err := s.db.PolicyClient.ListResourceMappings(s.ctx)
+ req := &resourcemapping.ListResourceMappingsRequest{}
+ mappings, err := s.db.PolicyClient.ListResourceMappings(s.ctx, req)
s.Require().NoError(err)
s.NotNil(mappings)
for _, testMapping := range testData {
@@ -112,6 +389,110 @@ func (s *ResourceMappingsSuite) Test_ListResourceMappings() {
}
}
+func (s *ResourceMappingsSuite) Test_ListResourceMappingsByGroupId() {
+ req := &resourcemapping.ListResourceMappingsRequest{
+ GroupId: s.getResourceMappingGroupFixtures()[0].ID,
+ }
+ mappings, err := s.db.PolicyClient.ListResourceMappings(s.ctx, req)
+ s.Require().NoError(err)
+ s.NotNil(mappings)
+ for _, mapping := range mappings {
+ expectedGroupID := req.GetGroupId()
+ actualGroupID := mapping.GetGroup().GetId()
+ s.Equal(expectedGroupID, actualGroupID,
+ fmt.Sprintf("expected group id %s, got %s", expectedGroupID, actualGroupID))
+ }
+}
+
+func (s *ResourceMappingsSuite) Test_ListResourceMappingsByGroupFqns() {
+ scenarioDotComNs := s.getScenarioDotComNamespace()
+ scenarioDotComGroup := s.f.GetResourceMappingGroupKey("scenario.com_ns_group_1")
+ scenarioDotComGroupMapping := s.f.GetResourceMappingKey("resource_mapping_to_attribute_value3")
+
+ groupFqn := fmt.Sprintf("https://%s/resm/%s", scenarioDotComNs.Name, scenarioDotComGroup.Name)
+
+ fqnRmGroupMap, err := s.db.PolicyClient.ListResourceMappingsByGroupFqns(s.ctx, []string{groupFqn})
+ s.Require().NoError(err)
+ s.NotNil(fqnRmGroupMap)
+
+ mappingsByGroup, ok := fqnRmGroupMap[groupFqn]
+ s.True(ok)
+ s.NotNil(mappingsByGroup)
+ s.Equal(scenarioDotComGroup.ID, mappingsByGroup.GetGroup().GetId())
+ s.Equal(scenarioDotComGroup.NamespaceID, mappingsByGroup.GetGroup().GetNamespaceId())
+ s.Equal(scenarioDotComGroup.Name, mappingsByGroup.GetGroup().GetName())
+
+ s.Len(mappingsByGroup.GetMappings(), 1, "expected 1 mapping")
+ mapping := mappingsByGroup.GetMappings()[0]
+ s.Equal(scenarioDotComGroupMapping.ID, mapping.GetId())
+ s.Equal(scenarioDotComGroupMapping.AttributeValueID, mapping.GetAttributeValue().GetId())
+ s.Equal(scenarioDotComGroupMapping.Terms, mapping.GetTerms())
+ s.NotNil(mapping.GetMetadata())
+}
+
+func (s *ResourceMappingsSuite) Test_ListResourceMappingsByGroupFqnsWithEmptyOrNilFqnsFails() {
+ fqnRmGroupMap, err := s.db.PolicyClient.ListResourceMappingsByGroupFqns(s.ctx, nil)
+ s.Require().Error(err)
+ s.Nil(fqnRmGroupMap)
+
+ fqnRmGroupMap, err = s.db.PolicyClient.ListResourceMappingsByGroupFqns(s.ctx, []string{})
+ s.Require().Error(err)
+ s.Nil(fqnRmGroupMap)
+}
+
+func (s *ResourceMappingsSuite) Test_ListResourceMappingsByGroupFqnsWithInvalidFqnsFails() {
+ fqnRmGroupMap, err := s.db.PolicyClient.ListResourceMappingsByGroupFqns(s.ctx, []string{"invalid_fqn"})
+ s.Require().Error(err)
+ s.Nil(fqnRmGroupMap)
+}
+
+func (s *ResourceMappingsSuite) Test_ListResourceMappingsByGroupFqnsWithUnknownFqnsFails() {
+ unknownFqn := "https://unknown.com/resm/unknown_group"
+ fqnRmGroupMap, err := s.db.PolicyClient.ListResourceMappingsByGroupFqns(s.ctx, []string{unknownFqn})
+ s.Require().Error(err)
+ s.Nil(fqnRmGroupMap)
+}
+
+func (s *ResourceMappingsSuite) Test_ListResourceMappingsByGroupFqnsWithKnownAndUnknownFqnsSucceeds() {
+ exampleDotComNs := s.getExampleDotComNamespace()
+ exampleDotComRmGroup1 := s.f.GetResourceMappingGroupKey("example.com_ns_group_1")
+
+ group1Fqn := fmt.Sprintf("https://%s/resm/%s", exampleDotComNs.Name, exampleDotComRmGroup1.Name)
+ unknownFqn := "https://unknown.com/resm/unknown_group"
+
+ fqnRmGroupMap, err := s.db.PolicyClient.ListResourceMappingsByGroupFqns(s.ctx, []string{group1Fqn, unknownFqn})
+ s.Require().NoError(err)
+ s.NotNil(fqnRmGroupMap)
+
+ group1Resp, ok := fqnRmGroupMap[group1Fqn]
+ s.True(ok)
+ s.NotNil(group1Resp)
+
+ unknownResp, ok := fqnRmGroupMap[unknownFqn]
+ s.False(ok)
+ s.Nil(unknownResp)
+}
+
+func (s *ResourceMappingsSuite) Test_ListResourceMappingsByGroupFqnsWithKnownAndInvalidFqnsSucceeds() {
+ exampleDotComNs := s.getExampleDotComNamespace()
+ exampleDotComRmGroup1 := s.f.GetResourceMappingGroupKey("example.com_ns_group_1")
+
+ group1Fqn := fmt.Sprintf("https://%s/resm/%s", exampleDotComNs.Name, exampleDotComRmGroup1.Name)
+ invalidFqn := "invalid_fqn"
+
+ fqnRmGroupMap, err := s.db.PolicyClient.ListResourceMappingsByGroupFqns(s.ctx, []string{group1Fqn, invalidFqn})
+ s.Require().NoError(err)
+ s.NotNil(fqnRmGroupMap)
+
+ group1Resp, ok := fqnRmGroupMap[group1Fqn]
+ s.True(ok)
+ s.NotNil(group1Resp)
+
+ unknownResp, ok := fqnRmGroupMap[invalidFqn]
+ s.False(ok)
+ s.Nil(unknownResp)
+}
+
func (s *ResourceMappingsSuite) Test_GetResourceMapping() {
// make sure we can get all fixtures
testData := s.getResourceMappingFixtures()
@@ -122,6 +503,7 @@ func (s *ResourceMappingsSuite) Test_GetResourceMapping() {
s.Equal(testMapping.ID, mapping.GetId())
s.Equal(testMapping.AttributeValueID, mapping.GetAttributeValue().GetId())
s.Equal(testMapping.Terms, mapping.GetTerms())
+ s.Equal(testMapping.GroupID, mapping.GetGroup().GetId())
metadata := mapping.GetMetadata()
createdAt := metadata.GetCreatedAt()
updatedAt := metadata.GetUpdatedAt()
@@ -131,7 +513,7 @@ func (s *ResourceMappingsSuite) Test_GetResourceMapping() {
}
func (s *ResourceMappingsSuite) Test_GetResourceMappingWithUnknownIdFails() {
- mapping, err := s.db.PolicyClient.GetResourceMapping(s.ctx, nonExistentResourceMappingUUID)
+ mapping, err := s.db.PolicyClient.GetResourceMapping(s.ctx, unknownResourceMappingID)
s.Require().Error(err)
s.Nil(mapping)
s.Require().ErrorIs(err, db.ErrNotFound)
@@ -141,10 +523,12 @@ func (s *ResourceMappingsSuite) Test_GetResourceMappingOfCreatedSucceeds() {
metadata := &common.MetadataMutable{}
attrValue := s.f.GetAttributeValueKey("example.com/attr/attr1/value/value2")
+ rmGroup := s.getResourceMappingGroupFixtures()[0]
mapping := &resourcemapping.CreateResourceMappingRequest{
AttributeValueId: attrValue.ID,
Metadata: metadata,
Terms: []string{"term1", "term2"},
+ GroupId: rmGroup.ID,
}
createdMapping, err := s.db.PolicyClient.CreateResourceMapping(s.ctx, mapping)
s.Require().NoError(err)
@@ -156,6 +540,7 @@ func (s *ResourceMappingsSuite) Test_GetResourceMappingOfCreatedSucceeds() {
s.Equal(createdMapping.GetId(), got.GetId())
s.Equal(createdMapping.GetAttributeValue().GetId(), got.GetAttributeValue().GetId())
s.Equal(createdMapping.GetTerms(), mapping.GetTerms())
+ s.Equal(createdMapping.GetGroup().GetId(), got.GetGroup().GetId())
}
func (s *ResourceMappingsSuite) Test_UpdateResourceMapping() {
@@ -164,6 +549,8 @@ func (s *ResourceMappingsSuite) Test_UpdateResourceMapping() {
updatedLabel := "true"
newLabel := "new label"
+ rmGroup := s.getResourceMappingGroupFixtures()[0]
+
labels := map[string]string{
"fixed": fixedLabel,
"update": updateLabel,
@@ -221,6 +608,7 @@ func (s *ResourceMappingsSuite) Test_UpdateResourceMapping() {
Labels: updateLabels,
},
MetadataUpdateBehavior: common.MetadataUpdateEnum_METADATA_UPDATE_ENUM_EXTEND,
+ GroupId: rmGroup.ID,
})
s.Require().NoError(err)
s.NotNil(updateWithChange)
@@ -235,6 +623,7 @@ func (s *ResourceMappingsSuite) Test_UpdateResourceMapping() {
s.Equal(updateTerms, got.GetTerms())
s.EqualValues(expectedLabels, got.GetMetadata().GetLabels())
s.True(got.GetMetadata().GetUpdatedAt().AsTime().After(updatedAt.AsTime()))
+ s.Equal(rmGroup.ID, got.GetGroup().GetId())
}
func (s *ResourceMappingsSuite) Test_UpdateResourceMappingWithUnknownIdFails() {
@@ -252,7 +641,7 @@ func (s *ResourceMappingsSuite) Test_UpdateResourceMappingWithUnknownIdFails() {
AttributeValueId: createdMapping.GetAttributeValue().GetId(),
Terms: []string{"asdf updated term1"},
}
- updated, err := s.db.PolicyClient.UpdateResourceMapping(s.ctx, nonExistentResourceMappingUUID, updatedMapping)
+ updated, err := s.db.PolicyClient.UpdateResourceMapping(s.ctx, unknownResourceMappingID, updatedMapping)
s.Require().Error(err)
s.Nil(updated)
s.Require().ErrorIs(err, db.ErrNotFound)
@@ -284,6 +673,27 @@ func (s *ResourceMappingsSuite) Test_UpdateResourceMappingWithUnknownAttributeVa
s.Require().ErrorIs(err, db.ErrForeignKeyViolation)
}
+func (s *ResourceMappingsSuite) Test_UpdateResourceMappingWithUnknownGroupIdFails() {
+ attrValue := s.f.GetAttributeValueKey("example.com/attr/attr2/value/value2")
+ mapping := &resourcemapping.CreateResourceMappingRequest{
+ AttributeValueId: attrValue.ID,
+ Terms: []string{"asdf qwerty"},
+ }
+ createdMapping, err := s.db.PolicyClient.CreateResourceMapping(s.ctx, mapping)
+ s.Require().NoError(err)
+ s.NotNil(createdMapping)
+
+ // update the created with new metadata, terms and unknown group ID
+ updatedMapping := &resourcemapping.UpdateResourceMappingRequest{
+ AttributeValueId: createdMapping.GetAttributeValue().GetId(),
+ Terms: []string{"asdf updated term1"},
+ GroupId: unknownResourceMappingGroupID,
+ }
+ updated, err := s.db.PolicyClient.UpdateResourceMapping(s.ctx, unknownResourceMappingID, updatedMapping)
+ s.Require().Error(err)
+ s.Nil(updated)
+}
+
func (s *ResourceMappingsSuite) Test_DeleteResourceMapping() {
attrValue := s.f.GetAttributeValueKey("example.net/attr/attr1/value/value1")
mapping := &resourcemapping.CreateResourceMappingRequest{
@@ -304,7 +714,7 @@ func (s *ResourceMappingsSuite) Test_DeleteResourceMapping() {
}
func (s *ResourceMappingsSuite) Test_DeleteResourceMappingWithUnknownIdFails() {
- deleted, err := s.db.PolicyClient.DeleteResourceMapping(s.ctx, nonExistentResourceMappingUUID)
+ deleted, err := s.db.PolicyClient.DeleteResourceMapping(s.ctx, unknownResourceMappingID)
s.Require().Error(err)
s.Nil(deleted)
s.Require().ErrorIs(err, db.ErrNotFound)
diff --git a/service/internal/fixtures/fixtures.go b/service/internal/fixtures/fixtures.go
index d4eb049a5f..08ec20ffbc 100644
--- a/service/internal/fixtures/fixtures.go
+++ b/service/internal/fixtures/fixtures.go
@@ -84,10 +84,17 @@ type SubjectConditionSet struct {
} `yaml:"condition" json:"condition"`
}
+type FixtureDataResourceMappingGroup struct {
+ ID string `yaml:"id"`
+ NamespaceID string `yaml:"namespace_id"`
+ Name string `yaml:"name"`
+}
+
type FixtureDataResourceMapping struct {
ID string `yaml:"id"`
AttributeValueID string `yaml:"attribute_value_id"`
Terms []string `yaml:"terms"`
+ GroupID string `yaml:"group_id"`
}
type FixtureDataKasRegistry struct {
@@ -122,6 +129,10 @@ type FixtureData struct {
Metadata FixtureMetadata `yaml:"metadata"`
Data map[string]SubjectConditionSet `yaml:"data"`
} `yaml:"subject_condition_set"`
+ ResourceMappingGroups struct {
+ Metadata FixtureMetadata `yaml:"metadata"`
+ Data map[string]FixtureDataResourceMappingGroup `yaml:"data"`
+ } `yaml:"resource_mapping_groups"`
ResourceMappings struct {
Metadata FixtureMetadata `yaml:"metadata"`
Data map[string]FixtureDataResourceMapping `yaml:"data"`
@@ -201,6 +212,15 @@ func (f *Fixtures) GetSubjectConditionSetKey(key string) SubjectConditionSet {
return scs
}
+func (f *Fixtures) GetResourceMappingGroupKey(key string) FixtureDataResourceMappingGroup {
+ rmGroup, ok := fixtureData.ResourceMappingGroups.Data[key]
+ if !ok || rmGroup.ID == "" {
+ slog.Error("could not find resource-mapping-groups", slog.String("id", key))
+ panic("could not find resource-mapping-group fixture: " + key)
+ }
+ return rmGroup
+}
+
func (f *Fixtures) GetResourceMappingKey(key string) FixtureDataResourceMapping {
rm, ok := fixtureData.ResourceMappings.Data[key]
if !ok || rm.ID == "" {
@@ -236,8 +256,10 @@ func (f *Fixtures) Provision() {
sc := f.provisionSubjectConditionSet()
slog.Info("📦 provisioning subject mapping data")
sM := f.provisionSubjectMappings()
+ slog.Info("📦 provisioning resource mapping group data")
+ rmg := f.provisionResourceMappingGroups()
slog.Info("📦 provisioning resource mapping data")
- rM := f.provisionResourceMappings()
+ rm := f.provisionResourceMappings()
slog.Info("📦 provisioning kas registry data")
kas := f.provisionKasRegistry()
slog.Info("📦 provisioning attribute key access server data")
@@ -251,7 +273,8 @@ func (f *Fixtures) Provision() {
slog.Int64("attribute_values", aV),
slog.Int64("subject_mappings", sM),
slog.Int64("subject_condition_set", sc),
- slog.Int64("resource_mappings", rM),
+ slog.Int64("resource_mapping_groups", rmg),
+ slog.Int64("resource_mappings", rm),
slog.Int64("kas_registry", kas),
slog.Int64("attribute_key_access_server", akas),
slog.Int64("attribute_value_key_access_server", avkas),
@@ -348,6 +371,18 @@ func (f *Fixtures) provisionSubjectMappings() int64 {
return f.provision(fixtureData.SubjectMappings.Metadata.TableName, fixtureData.SubjectMappings.Metadata.Columns, values)
}
+func (f *Fixtures) provisionResourceMappingGroups() int64 {
+ values := make([][]string, 0, len(fixtureData.ResourceMappingGroups.Data))
+ for _, d := range fixtureData.ResourceMappingGroups.Data {
+ values = append(values, []string{
+ f.db.StringWrap(d.ID),
+ f.db.StringWrap(d.NamespaceID),
+ f.db.StringWrap(d.Name),
+ })
+ }
+ return f.provision(fixtureData.ResourceMappingGroups.Metadata.TableName, fixtureData.ResourceMappingGroups.Metadata.Columns, values)
+}
+
func (f *Fixtures) provisionResourceMappings() int64 {
values := make([][]string, 0, len(fixtureData.ResourceMappings.Data))
for _, d := range fixtureData.ResourceMappings.Data {
@@ -355,6 +390,7 @@ func (f *Fixtures) provisionResourceMappings() int64 {
f.db.StringWrap(d.ID),
f.db.StringWrap(d.AttributeValueID),
f.db.StringArrayWrap(d.Terms),
+ f.db.StringWrap(d.GroupID),
})
}
return f.provision(fixtureData.ResourceMappings.Metadata.TableName, fixtureData.ResourceMappings.Metadata.Columns, values)
diff --git a/service/internal/fixtures/policy_fixtures.yaml b/service/internal/fixtures/policy_fixtures.yaml
index 538baa6786..1ca766bb49 100644
--- a/service/internal/fixtures/policy_fixtures.yaml
+++ b/service/internal/fixtures/policy_fixtures.yaml
@@ -374,6 +374,31 @@ subject_condition_set:
subject_external_values:
- opentdf-sdk
+##
+# Resource Mapping Groups
+#
+##
+resource_mapping_groups:
+ metadata:
+ table_name: resource_mapping_groups
+ columns:
+ - id
+ - namespace_id
+ - name
+ data:
+ example.com_ns_group_1:
+ id: 173bb45c-76ae-4993-a648-d9bc0bc05147
+ namespace_id: 8f1d8839-2851-4bf4-8bf4-5243dbfe517d
+ name: example_group_1
+ example.com_ns_group_2:
+ id: 32d4df0c-8600-4b8d-89cf-801b61bc7abe
+ namespace_id: 8f1d8839-2851-4bf4-8bf4-5243dbfe517d
+ name: example_group_2
+ scenario.com_ns_group_1:
+ id: 45f392f0-7d9e-4c73-9bf7-11bbd3bd40af
+ namespace_id: 87ba60e1-da12-4889-95fd-267968bf0896
+ name: scenario_group_1
+
##
# Resource Mappings
#
@@ -385,6 +410,7 @@ resource_mappings:
- id
- attribute_value_id
- terms
+ - group_id
data:
resource_mapping_to_attribute_value1:
id: 02092d67-fffa-4030-9775-b5cd5d581e1f
@@ -392,16 +418,19 @@ resource_mappings:
terms:
- TS
- TOPSECRET
+ group_id: 173bb45c-76ae-4993-a648-d9bc0bc05147
resource_mapping_to_attribute_value2:
id: b05d8d25-42ad-445d-b973-12b7561a7738
attribute_value_id: 2fe8dea1-3555-498c-afe9-99724f35f3d3
terms:
- test0
+ group_id: 173bb45c-76ae-4993-a648-d9bc0bc05147
resource_mapping_to_attribute_value3:
id: f4d76bfb-e1a1-4f7a-83f2-8e8433cf229f
attribute_value_id: 04bd2657-de10-46bc-a88f-5d687de4816b
terms:
- helloworld
+ group_id: 45f392f0-7d9e-4c73-9bf7-11bbd3bd40af
##
# KAS Registry (key access server registry)
diff --git a/service/pkg/util/fqn.go b/service/pkg/util/fqn.go
new file mode 100644
index 0000000000..098d0b8f1c
--- /dev/null
+++ b/service/pkg/util/fqn.go
@@ -0,0 +1,39 @@
+package util
+
+import (
+ "errors"
+ "regexp"
+)
+
+type FullyQualifiedResourceMappingGroup struct {
+ Fqn string
+ Namespace string
+ GroupName string
+}
+
+// protovalidate already validates the FQN format in the service request
+// for parsing purposes, we can just look for any non-whitespace characters
+// e.g. should be in format of "https:///resm/"
+var resourceMappingGroupFqnRegex = regexp.MustCompile(
+ `^https:\/\/(?\S+)\/resm\/(?\S+)$`,
+)
+
+// todo: logic could be made more generic in the future to support multiple FQN formats
+// e.g. parse FQN for '/attr', '/value', '/resm' or some other method
+func ParseResourceMappingGroupFqn(fqn string) (*FullyQualifiedResourceMappingGroup, error) {
+ matches := resourceMappingGroupFqnRegex.FindStringSubmatch(fqn)
+ numMatches := len(matches)
+
+ namespaceIdx := resourceMappingGroupFqnRegex.SubexpIndex("namespace")
+ groupNameIdx := resourceMappingGroupFqnRegex.SubexpIndex("name")
+
+ if numMatches < namespaceIdx || numMatches < groupNameIdx {
+ return nil, errors.New("error: valid FQN format of https:///resm/ must be provided")
+ }
+
+ return &FullyQualifiedResourceMappingGroup{
+ Fqn: fqn,
+ Namespace: matches[namespaceIdx],
+ GroupName: matches[groupNameIdx],
+ }, nil
+}
diff --git a/service/policy/db/key_access_server_registry.go b/service/policy/db/key_access_server_registry.go
index 0e5f7230f5..65d111c898 100644
--- a/service/policy/db/key_access_server_registry.go
+++ b/service/policy/db/key_access_server_registry.go
@@ -15,7 +15,7 @@ import (
func (c PolicyDBClient) ListKeyAccessServers(ctx context.Context) ([]*policy.KeyAccessServer, error) {
list, err := c.Queries.ListKeyAccessServers(ctx)
if err != nil {
- return nil, err
+ return nil, db.WrapIfKnownInvalidQueryErr(err)
}
keyAccessServers := make([]*policy.KeyAccessServer, len(list))
diff --git a/service/policy/db/migrations/20240815000000_add_res_map_groups_created_updated_fields.sql b/service/policy/db/migrations/20240815000000_add_res_map_groups_created_updated_fields.sql
new file mode 100644
index 0000000000..dd30ca6d89
--- /dev/null
+++ b/service/policy/db/migrations/20240815000000_add_res_map_groups_created_updated_fields.sql
@@ -0,0 +1,23 @@
+-- +goose Up
+-- +goose StatementBegin
+
+ALTER TABLE resource_mapping_groups ADD COLUMN created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP;
+ALTER TABLE resource_mapping_groups ADD COLUMN updated_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT CURRENT_TIMESTAMP;
+
+-- create trigger to update updated_at when the row is updated
+CREATE TRIGGER resource_mapping_groups_updated_at
+ BEFORE UPDATE ON resource_mapping_groups
+ FOR EACH ROW
+ EXECUTE FUNCTION update_updated_at();
+
+-- +goose StatementEnd
+
+-- +goose Down
+-- +goose StatementBegin
+
+ALTER TABLE resource_mapping_groups DROP COLUMN created_at;
+ALTER TABLE resource_mapping_groups DROP COLUMN updated_at;
+
+DROP TRIGGER resource_mapping_groups_updated_at ON resource_mapping_groups;
+
+-- +goose StatementEnd
diff --git a/service/policy/db/models.go b/service/policy/db/models.go
index 76b9d1022f..a0ee74b88a 100644
--- a/service/policy/db/models.go
+++ b/service/policy/db/models.go
@@ -180,7 +180,9 @@ type ResourceMappingGroup struct {
// Foreign key to the namespace of the attribute
NamespaceID string `json:"namespace_id"`
// Name for the group of resource mappings
- Name string `json:"name"`
+ Name string `json:"name"`
+ CreatedAt pgtype.Timestamptz `json:"created_at"`
+ UpdatedAt pgtype.Timestamptz `json:"updated_at"`
}
// Table to store sets of conditions that logically entitle subject entity representations to attribute values via a subject mapping
diff --git a/service/policy/db/query.sql b/service/policy/db/query.sql
index 10979930ad..cebf078c06 100644
--- a/service/policy/db/query.sql
+++ b/service/policy/db/query.sql
@@ -236,7 +236,8 @@ GROUP BY
-- name: ListResourceMappingGroups :many
SELECT id, namespace_id, name
-FROM resource_mapping_groups;
+FROM resource_mapping_groups
+WHERE (NULLIF(@namespace_id, '') IS NULL OR namespace_id = @namespace_id::uuid);
-- name: GetResourceMappingGroup :one
SELECT id, namespace_id, name
@@ -251,14 +252,34 @@ RETURNING id;
-- name: UpdateResourceMappingGroup :one
UPDATE resource_mapping_groups
SET
- namespace_id = coalesce(sqlc.narg('namespace_id'), namespace_id),
- name = coalesce(sqlc.narg('name'), name)
+ namespace_id = COALESCE(sqlc.narg('namespace_id'), namespace_id),
+ name = COALESCE(sqlc.narg('name'), name)
WHERE id = $1
RETURNING id;
-- name: DeleteResourceMappingGroup :execrows
DELETE FROM resource_mapping_groups WHERE id = $1;
+----------------------------------------------------------------
+-- RESOURCE MAPPING
+----------------------------------------------------------------
+
+-- name: ListResourceMappingsByFullyQualifiedGroup :many
+SELECT
+ m.id,
+ m.attribute_value_id,
+ m.terms,
+ JSON_STRIP_NULLS(JSON_BUILD_OBJECT('labels', m.metadata -> 'labels', 'created_at', m.created_at, 'updated_at', m.updated_at)) as metadata,
+ -- sqlc needs TEXT cast here to be able to generate string properties in Go struct
+ -- has issues when using aliases for some reason, even on a varchar field like g.name
+ g.id::TEXT as group_id,
+ g.namespace_id::TEXT as group_namespace_id,
+ g.name::TEXT as group_name
+FROM resource_mappings m
+LEFT JOIN resource_mapping_groups g ON m.group_id = g.id
+LEFT JOIN attribute_namespaces ns ON g.namespace_id = ns.id
+WHERE ns.name = LOWER(@namespace_name) AND g.name = LOWER(@group_name);
+
----------------------------------------------------------------
-- NAMESPACES
----------------------------------------------------------------
diff --git a/service/policy/db/query.sql.go b/service/policy/db/query.sql.go
index 046784fc80..6452a7e98f 100644
--- a/service/policy/db/query.sql.go
+++ b/service/policy/db/query.sql.go
@@ -531,14 +531,20 @@ FROM resource_mapping_groups
WHERE id = $1
`
+type GetResourceMappingGroupRow struct {
+ ID string `json:"id"`
+ NamespaceID string `json:"namespace_id"`
+ Name string `json:"name"`
+}
+
// GetResourceMappingGroup
//
// SELECT id, namespace_id, name
// FROM resource_mapping_groups
// WHERE id = $1
-func (q *Queries) GetResourceMappingGroup(ctx context.Context, id string) (ResourceMappingGroup, error) {
+func (q *Queries) GetResourceMappingGroup(ctx context.Context, id string) (GetResourceMappingGroupRow, error) {
row := q.db.QueryRow(ctx, getResourceMappingGroup, id)
- var i ResourceMappingGroup
+ var i GetResourceMappingGroupRow
err := row.Scan(&i.ID, &i.NamespaceID, &i.Name)
return i, err
}
@@ -736,23 +742,31 @@ const listResourceMappingGroups = `-- name: ListResourceMappingGroups :many
SELECT id, namespace_id, name
FROM resource_mapping_groups
+WHERE (NULLIF($1, '') IS NULL OR namespace_id = $1::uuid)
`
+type ListResourceMappingGroupsRow struct {
+ ID string `json:"id"`
+ NamespaceID string `json:"namespace_id"`
+ Name string `json:"name"`
+}
+
// --------------------------------------------------------------
// RESOURCE MAPPING GROUPS
// --------------------------------------------------------------
//
// SELECT id, namespace_id, name
// FROM resource_mapping_groups
-func (q *Queries) ListResourceMappingGroups(ctx context.Context) ([]ResourceMappingGroup, error) {
- rows, err := q.db.Query(ctx, listResourceMappingGroups)
+// WHERE (NULLIF($1, '') IS NULL OR namespace_id = $1::uuid)
+func (q *Queries) ListResourceMappingGroups(ctx context.Context, namespaceID interface{}) ([]ListResourceMappingGroupsRow, error) {
+ rows, err := q.db.Query(ctx, listResourceMappingGroups, namespaceID)
if err != nil {
return nil, err
}
defer rows.Close()
- var items []ResourceMappingGroup
+ var items []ListResourceMappingGroupsRow
for rows.Next() {
- var i ResourceMappingGroup
+ var i ListResourceMappingGroupsRow
if err := rows.Scan(&i.ID, &i.NamespaceID, &i.Name); err != nil {
return nil, err
}
@@ -764,6 +778,85 @@ func (q *Queries) ListResourceMappingGroups(ctx context.Context) ([]ResourceMapp
return items, nil
}
+const listResourceMappingsByFullyQualifiedGroup = `-- name: ListResourceMappingsByFullyQualifiedGroup :many
+
+SELECT
+ m.id,
+ m.attribute_value_id,
+ m.terms,
+ JSON_STRIP_NULLS(JSON_BUILD_OBJECT('labels', m.metadata -> 'labels', 'created_at', m.created_at, 'updated_at', m.updated_at)) as metadata,
+ -- sqlc needs TEXT cast here to be able to generate string properties in Go struct
+ -- has issues when using aliases for some reason, even on a varchar field like g.name
+ g.id::TEXT as group_id,
+ g.namespace_id::TEXT as group_namespace_id,
+ g.name::TEXT as group_name
+FROM resource_mappings m
+LEFT JOIN resource_mapping_groups g ON m.group_id = g.id
+LEFT JOIN attribute_namespaces ns ON g.namespace_id = ns.id
+WHERE ns.name = LOWER($1) AND g.name = LOWER($2)
+`
+
+type ListResourceMappingsByFullyQualifiedGroupParams struct {
+ NamespaceName string `json:"namespace_name"`
+ GroupName string `json:"group_name"`
+}
+
+type ListResourceMappingsByFullyQualifiedGroupRow struct {
+ ID string `json:"id"`
+ AttributeValueID string `json:"attribute_value_id"`
+ Terms []string `json:"terms"`
+ Metadata []byte `json:"metadata"`
+ GroupID string `json:"group_id"`
+ GroupNamespaceID string `json:"group_namespace_id"`
+ GroupName string `json:"group_name"`
+}
+
+// --------------------------------------------------------------
+// RESOURCE MAPPING
+// --------------------------------------------------------------
+//
+// SELECT
+// m.id,
+// m.attribute_value_id,
+// m.terms,
+// JSON_STRIP_NULLS(JSON_BUILD_OBJECT('labels', m.metadata -> 'labels', 'created_at', m.created_at, 'updated_at', m.updated_at)) as metadata,
+// -- sqlc needs TEXT cast here to be able to generate string properties in Go struct
+// -- has issues when using aliases for some reason, even on a varchar field like g.name
+// g.id::TEXT as group_id,
+// g.namespace_id::TEXT as group_namespace_id,
+// g.name::TEXT as group_name
+// FROM resource_mappings m
+// LEFT JOIN resource_mapping_groups g ON m.group_id = g.id
+// LEFT JOIN attribute_namespaces ns ON g.namespace_id = ns.id
+// WHERE ns.name = LOWER($1) AND g.name = LOWER($2)
+func (q *Queries) ListResourceMappingsByFullyQualifiedGroup(ctx context.Context, arg ListResourceMappingsByFullyQualifiedGroupParams) ([]ListResourceMappingsByFullyQualifiedGroupRow, error) {
+ rows, err := q.db.Query(ctx, listResourceMappingsByFullyQualifiedGroup, arg.NamespaceName, arg.GroupName)
+ if err != nil {
+ return nil, err
+ }
+ defer rows.Close()
+ var items []ListResourceMappingsByFullyQualifiedGroupRow
+ for rows.Next() {
+ var i ListResourceMappingsByFullyQualifiedGroupRow
+ if err := rows.Scan(
+ &i.ID,
+ &i.AttributeValueID,
+ &i.Terms,
+ &i.Metadata,
+ &i.GroupID,
+ &i.GroupNamespaceID,
+ &i.GroupName,
+ ); err != nil {
+ return nil, err
+ }
+ items = append(items, i)
+ }
+ if err := rows.Err(); err != nil {
+ return nil, err
+ }
+ return items, nil
+}
+
const removeKeyAccessServerFromNamespace = `-- name: RemoveKeyAccessServerFromNamespace :execrows
DELETE FROM attribute_namespace_key_access_grants
WHERE namespace_id = $1 AND key_access_server_id = $2
@@ -827,8 +920,8 @@ func (q *Queries) UpdateKeyAccessServer(ctx context.Context, arg UpdateKeyAccess
const updateResourceMappingGroup = `-- name: UpdateResourceMappingGroup :one
UPDATE resource_mapping_groups
SET
- namespace_id = coalesce($2, namespace_id),
- name = coalesce($3, name)
+ namespace_id = COALESCE($2, namespace_id),
+ name = COALESCE($3, name)
WHERE id = $1
RETURNING id
`
@@ -843,8 +936,8 @@ type UpdateResourceMappingGroupParams struct {
//
// UPDATE resource_mapping_groups
// SET
-// namespace_id = coalesce($2, namespace_id),
-// name = coalesce($3, name)
+// namespace_id = COALESCE($2, namespace_id),
+// name = COALESCE($3, name)
// WHERE id = $1
// RETURNING id
func (q *Queries) UpdateResourceMappingGroup(ctx context.Context, arg UpdateResourceMappingGroupParams) (string, error) {
diff --git a/service/policy/db/resource_mapping.go b/service/policy/db/resource_mapping.go
index 2f72ad88d5..42edfbcc39 100644
--- a/service/policy/db/resource_mapping.go
+++ b/service/policy/db/resource_mapping.go
@@ -5,15 +5,118 @@ import (
"log/slog"
sq "github.com/Masterminds/squirrel"
+ "github.com/google/uuid"
"github.com/jackc/pgx/v5"
+ "github.com/jackc/pgx/v5/pgtype"
"github.com/opentdf/platform/protocol/go/common"
"github.com/opentdf/platform/protocol/go/policy"
"github.com/opentdf/platform/protocol/go/policy/resourcemapping"
"github.com/opentdf/platform/service/logger"
"github.com/opentdf/platform/service/pkg/db"
+ "github.com/opentdf/platform/service/pkg/util"
"google.golang.org/protobuf/encoding/protojson"
)
+/*
+ Resource Mapping CRUD
+
+ NOTE: uses sqlc instead of squirrel
+*/
+
+func (c PolicyDBClient) ListResourceMappingGroups(ctx context.Context, r *resourcemapping.ListResourceMappingGroupsRequest) ([]*policy.ResourceMappingGroup, error) {
+ list, err := c.Queries.ListResourceMappingGroups(ctx, r.GetNamespaceId())
+ if err != nil {
+ return nil, db.WrapIfKnownInvalidQueryErr(err)
+ }
+
+ resourceMappingGroups := make([]*policy.ResourceMappingGroup, len(list))
+
+ for i, rmGroup := range list {
+ resourceMappingGroups[i] = &policy.ResourceMappingGroup{
+ Id: rmGroup.ID,
+ NamespaceId: rmGroup.NamespaceID,
+ Name: rmGroup.Name,
+ }
+ }
+
+ return resourceMappingGroups, nil
+}
+
+func (c PolicyDBClient) GetResourceMappingGroup(ctx context.Context, id string) (*policy.ResourceMappingGroup, error) {
+ rmGroup, err := c.Queries.GetResourceMappingGroup(ctx, id)
+ if err != nil {
+ return nil, db.WrapIfKnownInvalidQueryErr(err)
+ }
+
+ return &policy.ResourceMappingGroup{
+ Id: rmGroup.ID,
+ NamespaceId: rmGroup.NamespaceID,
+ Name: rmGroup.Name,
+ }, nil
+}
+
+func (c PolicyDBClient) CreateResourceMappingGroup(ctx context.Context, r *resourcemapping.CreateResourceMappingGroupRequest) (*policy.ResourceMappingGroup, error) {
+ createdID, err := c.Queries.CreateResourceMappingGroup(ctx, CreateResourceMappingGroupParams{
+ NamespaceID: r.GetNamespaceId(),
+ Name: r.GetName(),
+ })
+ if err != nil {
+ return nil, db.WrapIfKnownInvalidQueryErr(err)
+ }
+
+ return &policy.ResourceMappingGroup{
+ Id: createdID,
+ }, nil
+}
+
+func (c PolicyDBClient) UpdateResourceMappingGroup(ctx context.Context, id string, r *resourcemapping.UpdateResourceMappingGroupRequest) (*policy.ResourceMappingGroup, error) {
+ uuidNamespaceID, err := uuid.Parse(r.GetNamespaceId())
+ pgNamespaceID := pgtype.UUID{
+ Bytes: [16]byte(uuidNamespaceID),
+ Valid: err == nil,
+ }
+
+ name := r.GetName()
+ pgName := pgtype.Text{
+ String: name,
+ Valid: name != "",
+ }
+
+ updatedID, err := c.Queries.UpdateResourceMappingGroup(ctx, UpdateResourceMappingGroupParams{
+ ID: id,
+ NamespaceID: pgNamespaceID,
+ Name: pgName,
+ })
+ if err != nil {
+ return nil, db.WrapIfKnownInvalidQueryErr(err)
+ }
+
+ return &policy.ResourceMappingGroup{
+ Id: updatedID,
+ }, nil
+}
+
+func (c PolicyDBClient) DeleteResourceMappingGroup(ctx context.Context, id string) (*policy.ResourceMappingGroup, error) {
+ count, err := c.Queries.DeleteResourceMappingGroup(ctx, id)
+ if err != nil {
+ return nil, db.WrapIfKnownInvalidQueryErr(err)
+ }
+
+ if count == 0 {
+ return nil, db.ErrNotFound
+ }
+
+ return &policy.ResourceMappingGroup{
+ Id: id,
+ }, nil
+}
+
+/*
+ Resource Mapping CRUD
+
+ TODO: migrate from squirrel to sqlc
+*/
+
func resourceMappingHydrateList(rows pgx.Rows, logger *logger.Logger) ([]*policy.ResourceMapping, error) {
var list []*policy.ResourceMapping
@@ -35,6 +138,7 @@ func resourceMappingHydrateItem(row pgx.Row, logger *logger.Logger) (*policy.Res
terms []string
attributeValueJSON []byte
attributeValue = new(policy.Value)
+ groupID string
)
err := row.Scan(
@@ -42,6 +146,7 @@ func resourceMappingHydrateItem(row pgx.Row, logger *logger.Logger) (*policy.Res
&metadataJSON,
&terms,
&attributeValueJSON,
+ &groupID,
)
if err != nil {
return nil, db.WrapIfKnownInvalidQueryErr(err)
@@ -61,12 +166,18 @@ func resourceMappingHydrateItem(row pgx.Row, logger *logger.Logger) (*policy.Res
}
}
- return &policy.ResourceMapping{
+ rm := &policy.ResourceMapping{
Id: id,
Metadata: metadata,
AttributeValue: attributeValue,
Terms: terms,
- }, nil
+ }
+
+ if groupID != "" {
+ rm.Group = &policy.ResourceMappingGroup{Id: groupID}
+ }
+
+ return rm, nil
}
func resourceMappingSelect() sq.SelectBuilder {
@@ -80,29 +191,26 @@ func resourceMappingSelect() sq.SelectBuilder {
"'id', av.id,"+
"'value', av.value "+
") AS attribute_value",
+ "COALESCE("+t.Field("group_id")+"::TEXT, '') AS group_id",
).
LeftJoin(at.Name() + " av ON " + t.Field("attribute_value_id") + " = " + "av.id").
GroupBy("av.id").
GroupBy(t.Field("id"))
}
-/*
- Resource Mapping CRUD
-*/
+func createResourceMappingSQL(attributeValueID string, metadata []byte, terms []string, groupID string) (string, []interface{}, error) {
+ columns := []string{"attribute_value_id", "metadata", "terms"}
+ values := []interface{}{attributeValueID, metadata, terms}
+
+ if groupID != "" {
+ columns = append(columns, "group_id")
+ values = append(values, groupID)
+ }
-func createResourceMappingSQL(attributeValueID string, metadata []byte, terms []string) (string, []interface{}, error) {
return db.NewStatementBuilder().
Insert(Tables.ResourceMappings.Name()).
- Columns(
- "attribute_value_id",
- "metadata",
- "terms",
- ).
- Values(
- attributeValueID,
- metadata,
- terms,
- ).
+ Columns(columns...).
+ Values(values...).
Suffix(createSuffix).
ToSql()
}
@@ -113,7 +221,9 @@ func (c PolicyDBClient) CreateResourceMapping(ctx context.Context, r *resourcema
return nil, err
}
- sql, args, err := createResourceMappingSQL(r.GetAttributeValueId(), metadataJSON, r.GetTerms())
+ groupID := r.GetGroupId()
+
+ sql, args, err := createResourceMappingSQL(r.GetAttributeValueId(), metadataJSON, r.GetTerms(), groupID)
if err != nil {
return nil, err
}
@@ -138,12 +248,18 @@ func (c PolicyDBClient) CreateResourceMapping(ctx context.Context, r *resourcema
return nil, err
}
- return &policy.ResourceMapping{
+ rm := &policy.ResourceMapping{
Id: id,
Metadata: metadata,
AttributeValue: av,
Terms: r.GetTerms(),
- }, nil
+ }
+
+ if groupID != "" {
+ rm.Group = &policy.ResourceMappingGroup{Id: groupID}
+ }
+
+ return rm, nil
}
func getResourceMappingSQL(id string) (string, []interface{}, error) {
@@ -172,15 +288,19 @@ func (c PolicyDBClient) GetResourceMapping(ctx context.Context, id string) (*pol
return rm, nil
}
-func listResourceMappingsSQL() (string, []interface{}, error) {
+func listResourceMappingsSQL(groupID string) (string, []interface{}, error) {
t := Tables.ResourceMappings
- return resourceMappingSelect().
- From(t.Name()).
- ToSql()
+ builder := resourceMappingSelect().From(t.Name())
+
+ if groupID != "" {
+ builder = builder.Where(sq.Eq{t.Field("group_id"): groupID})
+ }
+
+ return builder.ToSql()
}
-func (c PolicyDBClient) ListResourceMappings(ctx context.Context) ([]*policy.ResourceMapping, error) {
- sql, args, err := listResourceMappingsSQL()
+func (c PolicyDBClient) ListResourceMappings(ctx context.Context, r *resourcemapping.ListResourceMappingsRequest) ([]*policy.ResourceMapping, error) {
+ sql, args, err := listResourceMappingsSQL(r.GetGroupId())
if err != nil {
return nil, err
}
@@ -199,7 +319,73 @@ func (c PolicyDBClient) ListResourceMappings(ctx context.Context) ([]*policy.Res
return list, nil
}
-func updateResourceMappingSQL(id string, attributeValueID string, metadata []byte, terms []string) (string, []interface{}, error) {
+// NOTE: uses sqlc instead of squirrel
+func (c PolicyDBClient) ListResourceMappingsByGroupFqns(ctx context.Context, fqns []string) (map[string]*resourcemapping.ResourceMappingsByGroup, error) {
+ resp := make(map[string]*resourcemapping.ResourceMappingsByGroup)
+ resultCount := 0
+
+ for _, fqn := range fqns {
+ fullyQualifiedGroup, err := util.ParseResourceMappingGroupFqn(fqn)
+ if err != nil {
+ // invalid FQNs not included in the response - ignore and continue, but log for investigation
+ slog.DebugContext(ctx, "error parsing Resource Mapping Group FQN", slog.String("rmg_fqn", fqn))
+ continue
+ }
+
+ rows, err := c.Queries.ListResourceMappingsByFullyQualifiedGroup(ctx, ListResourceMappingsByFullyQualifiedGroupParams{
+ NamespaceName: fullyQualifiedGroup.Namespace,
+ GroupName: fullyQualifiedGroup.GroupName,
+ })
+ if err != nil {
+ return nil, db.WrapIfKnownInvalidQueryErr(err)
+ }
+
+ if len(rows) == 0 {
+ // no rows found for this FQN - ignore and continue
+ continue
+ }
+
+ resultCount++
+
+ mappings := make([]*policy.ResourceMapping, len(rows))
+ for i, row := range rows {
+ metadata := new(common.Metadata)
+ if row.Metadata != nil {
+ if err := protojson.Unmarshal(row.Metadata, metadata); err != nil {
+ return nil, err
+ }
+ }
+
+ mappings[i] = &policy.ResourceMapping{
+ Id: row.ID,
+ AttributeValue: &policy.Value{Id: row.AttributeValueID},
+ Terms: row.Terms,
+ Metadata: metadata,
+ }
+ }
+
+ mappingsByGroup := &resourcemapping.ResourceMappingsByGroup{
+ Group: &policy.ResourceMappingGroup{
+ // all rows will have the same group values, so we can just use the first row
+ Id: rows[0].GroupID,
+ NamespaceId: rows[0].GroupNamespaceID,
+ Name: rows[0].GroupName,
+ },
+ Mappings: mappings,
+ }
+
+ resp[fqn] = mappingsByGroup
+ }
+
+ if resultCount == 0 {
+ // should return an error if none of the FQNs are found
+ return nil, db.ErrNotFound
+ }
+
+ return resp, nil
+}
+
+func updateResourceMappingSQL(id string, attributeValueID string, metadata []byte, terms []string, groupID string) (string, []interface{}, error) {
t := Tables.ResourceMappings
sb := db.NewStatementBuilder().
Update(t.Name())
@@ -216,6 +402,10 @@ func updateResourceMappingSQL(id string, attributeValueID string, metadata []byt
sb = sb.Set("terms", terms)
}
+ if groupID != "" {
+ sb = sb.Set("group_id", groupID)
+ }
+
return sb.
Where(sq.Eq{"id": id}).
ToSql()
@@ -238,6 +428,7 @@ func (c PolicyDBClient) UpdateResourceMapping(ctx context.Context, id string, r
r.GetAttributeValueId(),
metadataJSON,
r.GetTerms(),
+ r.GetGroupId(),
)
if db.IsQueryBuilderSetClauseError(err) {
return &policy.ResourceMapping{
diff --git a/service/policy/resourcemapping/resource_mapping.go b/service/policy/resourcemapping/resource_mapping.go
index 07700179e7..efe5ac88b1 100644
--- a/service/policy/resourcemapping/resource_mapping.go
+++ b/service/policy/resourcemapping/resource_mapping.go
@@ -35,6 +35,69 @@ func NewRegistration() serviceregistry.Registration {
}
}
+/*
+ Resource Mapping Groups
+*/
+
+func (s ResourceMappingService) ListResourceMappingGroups(ctx context.Context, req *resourcemapping.ListResourceMappingGroupsRequest) (*resourcemapping.ListResourceMappingGroupsResponse, error) {
+ rmGroups, err := s.dbClient.ListResourceMappingGroups(ctx, req)
+ if err != nil {
+ return nil, db.StatusifyError(err, db.ErrTextListRetrievalFailed)
+ }
+
+ return &resourcemapping.ListResourceMappingGroupsResponse{
+ ResourceMappingGroups: rmGroups,
+ }, nil
+}
+
+func (s ResourceMappingService) GetResourceMappingGroup(ctx context.Context, req *resourcemapping.GetResourceMappingGroupRequest) (*resourcemapping.GetResourceMappingGroupResponse, error) {
+ rmGroup, err := s.dbClient.GetResourceMappingGroup(ctx, req.GetId())
+ if err != nil {
+ return nil, db.StatusifyError(err, db.ErrTextGetRetrievalFailed, slog.String("id", req.GetId()))
+ }
+
+ return &resourcemapping.GetResourceMappingGroupResponse{
+ ResourceMappingGroup: rmGroup,
+ }, nil
+}
+
+func (s ResourceMappingService) CreateResourceMappingGroup(ctx context.Context, req *resourcemapping.CreateResourceMappingGroupRequest) (*resourcemapping.CreateResourceMappingGroupResponse, error) {
+ rmGroup, err := s.dbClient.CreateResourceMappingGroup(ctx, req)
+ if err != nil {
+ return nil, db.StatusifyError(err, db.ErrTextCreationFailed, slog.String("resourceMappingGroup", req.String()))
+ }
+
+ return &resourcemapping.CreateResourceMappingGroupResponse{
+ ResourceMappingGroup: rmGroup,
+ }, nil
+}
+
+func (s ResourceMappingService) UpdateResourceMappingGroup(ctx context.Context, req *resourcemapping.UpdateResourceMappingGroupRequest) (*resourcemapping.UpdateResourceMappingGroupResponse, error) {
+ id := req.GetId()
+
+ rmGroup, err := s.dbClient.UpdateResourceMappingGroup(ctx, id, req)
+ if err != nil {
+ return nil, db.StatusifyError(err, db.ErrTextUpdateFailed, slog.String("id", id), slog.String("resourceMappingGroup", req.String()))
+ }
+
+ return &resourcemapping.UpdateResourceMappingGroupResponse{
+ ResourceMappingGroup: rmGroup,
+ }, nil
+}
+
+func (s ResourceMappingService) DeleteResourceMappingGroup(ctx context.Context, req *resourcemapping.DeleteResourceMappingGroupRequest) (*resourcemapping.DeleteResourceMappingGroupResponse, error) {
+ id := req.GetId()
+
+ rmGroup, err := s.dbClient.DeleteResourceMappingGroup(ctx, id)
+ if err != nil {
+ return nil, db.StatusifyError(err, db.ErrTextDeletionFailed, slog.String("id", id))
+ }
+
+ return &resourcemapping.DeleteResourceMappingGroupResponse{
+ ResourceMappingGroup: rmGroup,
+ }, nil
+}
+
/*
Resource Mappings
*/
@@ -64,9 +127,9 @@ func (s ResourceMappingService) CreateResourceMapping(ctx context.Context,
}
func (s ResourceMappingService) ListResourceMappings(ctx context.Context,
- _ *resourcemapping.ListResourceMappingsRequest,
+ req *resourcemapping.ListResourceMappingsRequest,
) (*resourcemapping.ListResourceMappingsResponse, error) {
- resourceMappings, err := s.dbClient.ListResourceMappings(ctx)
+ resourceMappings, err := s.dbClient.ListResourceMappings(ctx, req)
if err != nil {
return nil, db.StatusifyError(err, db.ErrTextListRetrievalFailed)
}
@@ -76,6 +139,19 @@ func (s ResourceMappingService) ListResourceMappings(ctx context.Context,
}, nil
}
+func (s ResourceMappingService) ListResourceMappingsByGroupFqns(ctx context.Context, req *resourcemapping.ListResourceMappingsByGroupFqnsRequest) (*resourcemapping.ListResourceMappingsByGroupFqnsResponse, error) {
+ fqns := req.GetFqns()
+
+ fqnRmGroupMap, err := s.dbClient.ListResourceMappingsByGroupFqns(ctx, fqns)
+ if err != nil {
+ return nil, db.StatusifyError(err, db.ErrTextListRetrievalFailed, slog.Any("fqns", fqns))
+ }
+
+ return &resourcemapping.ListResourceMappingsByGroupFqnsResponse{
+ FqnResourceMappingGroups: fqnRmGroupMap,
+ }, nil
+}
+
func (s ResourceMappingService) GetResourceMapping(ctx context.Context,
req *resourcemapping.GetResourceMappingRequest,
) (*resourcemapping.GetResourceMappingResponse, error) {
diff --git a/service/policy/resourcemapping/resource_mapping.proto b/service/policy/resourcemapping/resource_mapping.proto
index fa1705dd80..cbfa0151a7 100644
--- a/service/policy/resourcemapping/resource_mapping.proto
+++ b/service/policy/resourcemapping/resource_mapping.proto
@@ -8,17 +8,103 @@ import "google/api/annotations.proto";
import "common/common.proto";
import "policy/objects.proto";
+/*
+ Resource Mapping Groups
+*/
+
+message ListResourceMappingGroupsRequest {
+ // Optional
+ string namespace_id = 1;
+}
+
+message ListResourceMappingGroupsResponse {
+ repeated ResourceMappingGroup resource_mapping_groups = 1;
+}
+
+message GetResourceMappingGroupRequest {
+ // Required
+ string id = 1 [(buf.validate.field).required = true];
+}
+
+message GetResourceMappingGroupResponse {
+ ResourceMappingGroup resource_mapping_group = 1;
+}
+
+message CreateResourceMappingGroupRequest {
+ // Required
+ string namespace_id = 1 [(buf.validate.field).required = true];
+
+ string name = 2 [(buf.validate.field).required = true];
+}
+
+message CreateResourceMappingGroupResponse {
+ ResourceMappingGroup resource_mapping_group = 1;
+}
+
+message UpdateResourceMappingGroupRequest {
+ // Required
+ string id = 1 [(buf.validate.field).required = true];
+
+ // Optional
+ string namespace_id = 2;
+
+ string name = 3;
+}
+
+message UpdateResourceMappingGroupResponse {
+ ResourceMappingGroup resource_mapping_group = 1;
+}
+
+message DeleteResourceMappingGroupRequest {
+ // Required
+ string id = 1 [(buf.validate.field).required = true];
+}
+
+message DeleteResourceMappingGroupResponse {
+ ResourceMappingGroup resource_mapping_group = 1;
+}
+
/*
Resource Mappings
*/
-message ListResourceMappingsRequest {}
+message ListResourceMappingsRequest {
+ // Optional
+ string group_id = 1;
+}
message ListResourceMappingsResponse {
repeated policy.ResourceMapping resource_mappings = 1;
}
+message ListResourceMappingsByGroupFqnsRequest {
+ // Required
+ // Structure of the RM Group FQN is 'https:///resm/'
+ repeated string fqns = 1 [(buf.validate.field).repeated = {
+ min_items: 1,
+ items: {
+ cel: [
+ {
+ id: "resourcemappinggroup_fqn",
+ message: "Resource Mapping Group FQN must be in the format 'https:///resm/'",
+ expression: "this.matches('^https://([a-zA-Z0-9]([a-zA-Z0-9\\\\-]{0,61}[a-zA-Z0-9])?\\\\.)+[a-zA-Z]{2,}/resm/[a-zA-Z0-9](?:[a-zA-Z0-9_-]*[a-zA-Z0-9])?$')"
+ }
+ ]
+ },
+ }];
+}
+
+message ResourceMappingsByGroup {
+ policy.ResourceMappingGroup group = 1;
+ repeated policy.ResourceMapping mappings = 2;
+}
+
+message ListResourceMappingsByGroupFqnsResponse {
+ map fqn_resource_mapping_groups = 1;
+}
+
message GetResourceMappingRequest {
+ // Required
string id = 1 [(buf.validate.field).required = true];
}
@@ -62,6 +148,8 @@ message CreateResourceMappingRequest {
repeated string terms = 2 [(buf.validate.field).required = true];
// Optional
+ string group_id = 3;
+
common.MetadataMutable metadata = 100;
}
message CreateResourceMappingResponse {
@@ -77,6 +165,8 @@ message UpdateResourceMappingRequest {
repeated string terms = 5;
+ string group_id = 6;
+
// Common Metadata
common.MetadataMutable metadata = 100;
common.MetadataUpdateEnum metadata_update_behavior = 101;
@@ -86,6 +176,7 @@ message UpdateResourceMappingResponse {
}
message DeleteResourceMappingRequest {
+ // Required
string id = 1 [(buf.validate.field).required = true];
}
message DeleteResourceMappingResponse {
@@ -93,10 +184,48 @@ message DeleteResourceMappingResponse {
}
service ResourceMappingService {
+ /*
+ Resource Mapping Groups
+ */
+
+ rpc ListResourceMappingGroups(ListResourceMappingGroupsRequest) returns (ListResourceMappingGroupsResponse) {
+ option (google.api.http) = {get: "/resource-mapping-groups"};
+ }
+
+ rpc GetResourceMappingGroup(GetResourceMappingGroupRequest) returns (GetResourceMappingGroupResponse) {
+ option (google.api.http) = {get: "/resource-mapping-groups/{id}"};
+ }
+
+ rpc CreateResourceMappingGroup(CreateResourceMappingGroupRequest) returns (CreateResourceMappingGroupResponse) {
+ option (google.api.http) = {
+ post: "/resource-mapping-groups"
+ body: "*"
+ };
+ }
+
+ rpc UpdateResourceMappingGroup(UpdateResourceMappingGroupRequest) returns (UpdateResourceMappingGroupResponse) {
+ option (google.api.http) = {
+ patch: "/resource-mapping-groups/{id}"
+ body: "*"
+ };
+ }
+
+ rpc DeleteResourceMappingGroup(DeleteResourceMappingGroupRequest) returns (DeleteResourceMappingGroupResponse) {
+ option (google.api.http) = {delete: "/resource-mapping-groups/{id}"};
+ }
+
+ /*
+ Resource Mappings
+ */
+
rpc ListResourceMappings(ListResourceMappingsRequest) returns (ListResourceMappingsResponse) {
option (google.api.http) = {get: "/resource-mappings"};
}
+ rpc ListResourceMappingsByGroupFqns(ListResourceMappingsByGroupFqnsRequest) returns (ListResourceMappingsByGroupFqnsResponse) {
+ option (google.api.http) = {get: "/resource-mappings/group-fqns"};
+ }
+
rpc GetResourceMapping(GetResourceMappingRequest) returns (GetResourceMappingResponse) {
option (google.api.http) = {get: "/resource-mappings/{id}"};
}
diff --git a/service/policy/resourcemapping/resource_mapping_test.go b/service/policy/resourcemapping/resource_mapping_test.go
new file mode 100644
index 0000000000..f01e2d3e9a
--- /dev/null
+++ b/service/policy/resourcemapping/resource_mapping_test.go
@@ -0,0 +1,113 @@
+package resourcemapping
+
+import (
+ "testing"
+
+ "github.com/bufbuild/protovalidate-go"
+ "github.com/opentdf/platform/protocol/go/policy/resourcemapping"
+ "github.com/stretchr/testify/require"
+)
+
+var (
+ validFqns = []string{
+ "https://example.com/resm/group1",
+ "https://scenario.com/resm/group2",
+ "https://hypenated-ns.com/resm/group3",
+ }
+
+ invalidFqns = []string{
+ // empty string
+ "",
+
+ // invalid string
+ "invalid",
+
+ // http protocol
+ "http://example.com/resm/group1",
+
+ // invalid namespace
+ "https://invalid/resm/group1",
+ "https://example.com-/resm/group2",
+ "https://-example.com/resm/group2",
+ "https://example.c/resm-/group3",
+
+ // missing /resm/ qualifier
+ "https://example.com/group1",
+ "https://scenario.com/invalid/group2",
+
+ // invalid group name
+ "https://example.com/resm/-group_1",
+ "https://example.com/resm/group2-",
+ "https://example.com/resm/group!_3",
+ }
+)
+
+func getValidator() *protovalidate.Validator {
+ v, err := protovalidate.New()
+ if err != nil {
+ panic(err)
+ }
+ return v
+}
+
+func runFqnValidator(fqn string) error {
+ req := &resourcemapping.ListResourceMappingsByGroupFqnsRequest{
+ Fqns: []string{fqn},
+ }
+
+ err := getValidator().Validate(req)
+ return err
+}
+
+func Test_ListResourceMappingsByGroupFqnsRequest_Valid_Succeeds(t *testing.T) {
+ for _, fqn := range validFqns {
+ err := runFqnValidator(fqn)
+ require.NoError(t, err, "valid FQN failed: %s", fqn)
+ }
+}
+
+func Test_ListResourceMappingsByGroupFqnsRequest_Invalid_Fails(t *testing.T) {
+ for _, fqn := range invalidFqns {
+ err := runFqnValidator(fqn)
+ require.Error(t, err, "invalid FQN succeeded: %s", fqn)
+ }
+}
+
+func Test_ListResourceMappingsByGroupFqnsRequest_EmptyArray_Fails(t *testing.T) {
+ req := &resourcemapping.ListResourceMappingsByGroupFqnsRequest{
+ Fqns: []string{},
+ }
+
+ err := getValidator().Validate(req)
+ require.Error(t, err)
+}
+
+func Test_ListResourceMappingsByGroupFqnsRequest_NilArray_Fails(t *testing.T) {
+ req := &resourcemapping.ListResourceMappingsByGroupFqnsRequest{
+ Fqns: nil,
+ }
+
+ err := getValidator().Validate(req)
+ require.Error(t, err)
+}
+
+func Test_ListResourceMappingsByGroupFqnsRequest_AnyInvalid_Fails(t *testing.T) {
+ req := &resourcemapping.ListResourceMappingsByGroupFqnsRequest{
+ Fqns: []string{
+ validFqns[0],
+ invalidFqns[0],
+ },
+ }
+
+ err := getValidator().Validate(req)
+ require.Error(t, err)
+}
+
+func Test_ListResourceMappingsByGroupFqnsRequest_AllValid_Succeeds(t *testing.T) {
+ req := &resourcemapping.ListResourceMappingsByGroupFqnsRequest{
+ Fqns: validFqns,
+ }
+
+ err := getValidator().Validate(req)
+ require.NoError(t, err)
+}